Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <994ceaaa-b71c-40b4-a006-48d66a3fbf57@www.fastmail.com>
Date: Thu, 03 Sep 2020 11:40:50 -0400
From: "Stefan O'Rear" <sorear@...tmail.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 07/14] Emulate wait4 using waitid

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.
 
-s

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.