This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S390: Sync ptrace.h with kernel. [BZ #21539]


On Tue, 2017-07-18 at 16:28 +0200, Mark Wielaard wrote:
> On Tue, 2017-07-18 at 10:11 -0400, Carlos O'Donell wrote:
> > On 07/18/2017 09:39 AM, Dmitry V. Levin wrote:
> > > On Tue, Jul 18, 2017 at 09:31:49AM -0400, Carlos O'Donell wrote:
> > >> On 07/18/2017 06:20 AM, Dmitry V. Levin wrote:
> > >>> The following change fixes this and similar compilation issues that arise
> > >>> when sys/ptrace.h is included after linux/ptrace.h:
> > >>  
> > >> This is a known conflict, and needs to be fixed properly using libc-compat.h
> > >> on the kernel side and the appropriate defines on the glibc side.
> > > 
> > > No, there was no conflict between asm/ptrace.h and sys/ptrace.h on s390
> > > in glibc-2.25, and we should avoid introducing new conflicts.
> >  
> > I have not verified that inclusion worked on both orders, if it did, then
> > this is indeed a regression.
> 
> It used to work either way. We used asm/ptrace.h then sys/ptrace.h on
> s390[x] in elfutils. That broke with 2.26 in fedora rawhide. So we
> changed it to sys/ptrace.h then asm/ptrace.h. I verified that order
> works on both old and new glibc/kernel headers (aka on RHEL7 s390[x] and
> fedora rawhide s390x).

One more note. This really is only an issue for s390x since asm/ptrace.h
provides ptrace_area which is needed to use PTRACE_PEEKUSR_AREA. On
other architectures you only need sys/ptrace.h so it doesn't really
matter whether you can include them both.

See also the glibc testcase
sysdeps/unix/sysv/linux/s390/tst-ptrace-singleblock.c which also needs
to include both.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]