This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21539] S390: Mismatch between kernel and glibc ptrace.h with request 12: PTRACE_SINGLEBLOCK vs PTRACE_GETREGS.
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 19 Jun 2017 14:29:04 +0000
- Subject: [Bug libc/21539] S390: Mismatch between kernel and glibc ptrace.h with request 12: PTRACE_SINGLEBLOCK vs PTRACE_GETREGS.
- Auto-submitted: auto-generated
- References: <bug-21539-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21539
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via b08a6a0dea63742313ed3d9577c1e2d83436b196 (commit)
from 89f187a40fc0ad4e22838526bfe34d73f758b776 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b08a6a0dea63742313ed3d9577c1e2d83436b196
commit b08a6a0dea63742313ed3d9577c1e2d83436b196
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date: Mon Jun 19 16:27:25 2017 +0200
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, <glibc>/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
uses ptrace-request 12 for PTRACE_GETREGS,
but <kernel>/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.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 19 +++
NEWS | 9 ++
sysdeps/s390/fpu/fesetenv.c | 2 -
sysdeps/unix/sysv/linux/s390/Makefile | 4 +
sysdeps/unix/sysv/linux/s390/sys/ptrace.h | 42 ++++---
.../unix/sysv/linux/s390/tst-ptrace-singleblock.c | 128 ++++++++++++++++++++
6 files changed, 182 insertions(+), 22 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/s390/tst-ptrace-singleblock.c
--
You are receiving this mail because:
You are on the CC list for the bug.