From b08a6a0dea63742313ed3d9577c1e2d83436b196 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Mon, 19 Jun 2017 16:27:25 +0200 Subject: S390: Sync ptrace.h with kernel. [BZ #21539] This patch removes PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS as these requests does not exist on s390 kernel. But the kernel has support for PTRACE_SINGLEBLOCK, PTRACE_SECCOMP_GET_FILTER, PTRACE_PEEKUSR_AREA, PTRACE_POKEUSR_AREA, PTRACE_GET_LAST_BREAK, PTRACE_ENABLE_TE, PTRACE_DISABLE_TE and PTRACE_TE_ABORT_RAND. Thus those are defined now. The current kernel s390 specific ptrace.h file also defines PTRACE_PEEKTEXT_AREA, PTRACE_PEEKDATA_AREA, PTRACE_POKETEXT_AREA, PTRACE_POKEDATA_AREA, PTRACE_PEEK_SYSTEM_CALL, PTRACE_POKE_SYSTEM_CALL and PTRACE_PROT, but those requests are not supported. Thus those defines are skipped in glibc ptrace.h. There were old includes of ptrace.h in sysdeps/s390/fpu/fesetenv.c. The ptrace feature isn't used there anymore, thus I removed the includes. Before this patch, /sysdeps/unix/sysv/linux/s390/sys/ptrace.h uses ptrace-request 12 for PTRACE_GETREGS, but /include/uapi/linux/ptrace.h uses 12 for PTRACE_SINGLEBLOCK. The s390 kernel has never had support for PTRACE_GETREGS! Thus glibc ptrace.h is adjusted to match kernel ptrace.h. The new s390 specific test ensures, that PTRACE_SINGLEBLOCK defined in glibc works as expected. If the kernel would interpret it as PTRACE_GETREGS, then the testcase will not make any progress and will time out. ChangeLog: [BZ #21539] * NEWS: Mention s390 ptrace request changes. * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS): Remove enum constant. (PT_GETREGS, PT_SETREGS, PT_GETFPREGS, T_SETFPREGS): Remove defines. (PTRACE_SINGLEBLOCK): New enum constant. (PT_STEPBLOCK): New define. (PTRACE_PEEKUSR_AREA, PTRACE_POKEUSR_AREA, PTRACE_GET_LAST_BREAK, PTRACE_ENABLE_TE, PTRACE_DISABLE_TE, PTRACE_TE_ABORT_RAND): New enum constant and define. * sysdeps/s390/fpu/fesetenv.c: Remove ptrace.h includes. * sysdeps/unix/sysv/linux/s390/tst-ptrace-singleblock.c: New file. * sysdeps/unix/sysv/linux/s390/Makefile: Add test. --- NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 804c1b9..9ee2218 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,15 @@ Version 2.26 * The tunables feature is now enabled by default. This allows users to tweak behavior of the GNU C Library using the GLIBC_TUNABLES environment variable. +* The s390 specific ptrace requests are adjusted to the kernel ones. Request 12 + is now used for PTRACE_SINGLEBLOCK instead of PTRACE_GETREGS. The requests + PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS were + removed as those are not supported by the s390 kernel. The requests + PTRACE_SINGLEBLOCK, PTRACE_SECCOMP_GET_FILTER, PTRACE_PEEKUSR_AREA, + PTRACE_POKEUSR_AREA, PTRACE_GET_LAST_BREAK, PTRACE_ENABLE_TE, + PTRACE_DISABLE_TE and PTRACE_TE_ABORT_RAND were added as those are supported + by the s390 kernel. + Security related changes: * The DNS stub resolver limits the advertised UDP buffer size to 1200 bytes, -- cgit v1.1