Date: Thu, 3 Sep 2020 20:08:19 +0200 From: Arnd Bergmann <arnd@...db.de> To: musl@...ts.openwall.com Subject: Re: [PATCH 07/14] Emulate wait4 using waitid On Thu, Sep 3, 2020 at 5:41 PM Stefan O'Rear <sorear@...tmail.com> wrote: > > On Thu, Sep 3, 2020, at 11:36 AM, Arnd Bergmann wrote: > > On Thu, Sep 3, 2020 at 4:56 PM Stefan O'Rear <sorear@...tmail.com> wrote: > > > > > > On Thu, Sep 3, 2020, at 7:23 AM, Stefan O'Rear wrote: > > > > + case CLD_STOPPED: > > > > + case CLD_TRAPPED: > > > > + sw = ((info.si_status&0xff) << 8) + 0x7f; > > > > + break; > > > > > > This is trying to be defensive but it is the cause of the strace issue > > > in the cover letter since the ptrace interface generates si_status > > > greater than 8 bits which must be visible in WSTOPSIG; the v2 will not > > > mask here. > > > > Ah, I was trying to find out what exactly the masking was for since > > I did not have that in my original version of the same function for Arm: > > Where is this coming from? I didn't want to blindly copy code from glibc > and I couldn't find any documentation of how the mapping is supposed > to work other than the POSIX descriptions of the wait and waitid functions > (which is why I missed the non-POSIX ptrace cases). > > If there's an authoritative description of the mapping I would like to match > it exactly. I did this prototype implementation to test the syscall changes before I submitted them into the mainline kernel: https://git.linaro.org/people/arnd.bergmann/musl-y2038.git/ This was never meant to get merged, but I made sure that I could get LTP to pass just using the new minimum set of syscalls. Arnd
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.