aboutsummaryrefslogtreecommitdiff
path: root/support/Makefile
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2019-09-18 12:40:00 +0200
committerStefan Liebler <stli@linux.ibm.com>2019-09-18 12:42:39 +0200
commit2f9046fb059e94fe254c9a4ff5bcd52182069e44 (patch)
tree87aea58e9ee081f70571cc6daaa8f81ea6df9b37 /support/Makefile
parent87accae3978c77c1a50d19ea8e3da3f0248d2612 (diff)
downloadglibc-2f9046fb059e94fe254c9a4ff5bcd52182069e44.tar
glibc-2f9046fb059e94fe254c9a4ff5bcd52182069e44.tar.gz
glibc-2f9046fb059e94fe254c9a4ff5bcd52182069e44.tar.bz2
glibc-2f9046fb059e94fe254c9a4ff5bcd52182069e44.zip
Add UNSUPPORTED check in elf/tst-pldd.
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.
Diffstat (limited to 'support/Makefile')
-rw-r--r--support/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/support/Makefile b/support/Makefile
index be90043801..ca238ee8b4 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -56,6 +56,7 @@ libsupport-routines = \
support_format_hostent \
support_format_netent \
support_isolate_in_subprocess \
+ support_ptrace \
support_openpty \
support_paths \
support_quote_blob \