This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/22433] linux x86/x86_64 <sys/ptrace.h> does not provide PTRACE_GET_THREAD_AREA (and more)
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 27 Nov 2017 22:37:48 +0000
- Subject: [Bug libc/22433] linux x86/x86_64 <sys/ptrace.h> does not provide PTRACE_GET_THREAD_AREA (and more)
- Auto-submitted: auto-generated
- References: <bug-22433-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22433
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Mark Mentovai from comment #0)
> PTRACE_GET_THREAD_AREA is missing from <sys/ptrace.h> on x86 and x86_64
> Linux.
>
> It’s provided by the kernel’s <asm/ptrace-abi.h>, and in turn by
> <linux/ptrace.h>, but these are incompatible with glibc’s <sys/ptrace.h>.
> <asm/ptrace-abi.h> offers:
>
> #define PTRACE_GET_THREAD_AREA 25
>
> Others missing (strictly Linux x86/x86_64-specific):
>
> #define PTRACE_SET_THREAD_AREA 26
>
> #ifdef __x86_64__
> # define PTRACE_ARCH_PRCTL 30
> #endif
>
> #define PTRACE_SYSEMU 31
> #define PTRACE_SYSEMU_SINGLESTEP 32
>
> #define PTRACE_SINGLEBLOCK 33 /* resume execution until next
> branch */
If the constants are present in a published upstream kernel, then what's left
is for someone to update the glibc headers to match the kernel values.
The last update was in July to remove PTRACE_SEIZE_DEVEL
(60e2846e2633a990bdf474004a373bde54c0bc5f), and before that in February to add
PTRACE_EVENT_STOP (3f67d1a7021ed3184830511636a0867faec730fe).
I don't see anything "incompatible" with the kernel and glibc headers. Work
just has to be done to synchronize them.
If the constants are machine dependent then there needs to be a split up where
the machine-dependent ptrace.h has to be provided to override the default.
Right now, nobody has done the work.
--
You are receiving this mail because:
You are on the CC list for the bug.