about summary refs log tree commit diff
path: root/support/support_ptrace.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Fix building support_ptrace.c on i686-gnu.Stefan Liebler2019-09-191-1/+0
| | | | | | | | | | | | | On i686-gnu the build is broken: In file included from support_ptrace.c:22: ../include/sys/prctl.h:2:15: fatal error: sys/prctl.h: No such file or directory #include_next <sys/prctl.h> This patch just removes the unused prctl.h inclusion. ChangeLog: * support/support_ptrace.c: Remove inclusion of sys/prctl.h.
* Add UNSUPPORTED check in elf/tst-pldd.Stefan Liebler2019-09-181-0/+44
The testcase forks a child process and runs pldd with PID of this child. On systems where /proc/sys/kernel/yama/ptrace_scope differs from zero, pldd will fail with /usr/bin/pldd: cannot attach to process 3: Operation not permitted This patch checks if ptrace_scope exists, is zero "classic ptrace permissions" or one "restricted ptrace". If ptrace_scope exists and has a higher restriction, then the test is marked as UNSUPPORTED. The case "restricted ptrace" is handled by rearranging the processes involved during the test. Now we have the following process tree: -parent: do_test (performs output checks) --subprocess 1: pldd_process (becomes pldd via execve) ---subprocess 2: target_process (ptraced via pldd) ChangeLog: * elf/tst-pldd.c (do_test): Add UNSUPPORTED check. Rearrange subprocesses. (pldd_process): New function. * support/Makefile (libsupport-routines): Add support_ptrace. * support/xptrace.h: New file. * support/support_ptrace.c: Likewise.