mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: musl@lists.openwall.com
Subject: Re: [musl] [PATCH 07/14] Emulate wait4 using waitid
Date: Thu, 3 Sep 2020 20:08:19 +0200	[thread overview]
Message-ID: <CAK8P3a3BZ1Sn4LE3UP+h8-NMy2UuX3EqU=Frwsx2CfGjPBFCZQ@mail.gmail.com> (raw)
In-Reply-To: <994ceaaa-b71c-40b4-a006-48d66a3fbf57@www.fastmail.com>

On Thu, Sep 3, 2020 at 5:41 PM Stefan O'Rear <sorear@fastmail.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@fastmail.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

  reply	other threads:[~2020-09-03 18:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 11:22 [musl] [PATCH 00/14] riscv32 support Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 01/14] Remove ARMSUBARCH relic from configure Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 02/14] time64: Don't make aliases to nonexistent syscalls Stefan O'Rear
2020-09-03 15:56   ` Rich Felker
2020-09-03 19:36     ` Stefan O'Rear
2020-09-03 21:17       ` Rich Felker
2020-09-03 11:22 ` [musl] [PATCH 03/14] time64: Only getrlimit/setrlimit if they exist Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 04/14] time64: Only gettimeofday/settimeofday if exist Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 05/14] Add src/internal/statx.h Stefan O'Rear
2020-09-03 15:39   ` Arnd Bergmann
2020-09-03 15:51     ` Rich Felker
2020-09-03 18:08       ` Arnd Bergmann
2020-09-03 11:23 ` [musl] [PATCH 06/14] Only call fstatat if defined Stefan O'Rear
2020-09-03 16:05   ` Rich Felker
2020-09-04  1:47     ` Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 07/14] Emulate wait4 using waitid Stefan O'Rear
2020-09-03 14:56   ` Stefan O'Rear
2020-09-03 15:36     ` Arnd Bergmann
2020-09-03 15:40       ` Stefan O'Rear
2020-09-03 18:08         ` Arnd Bergmann [this message]
2020-09-03 15:49   ` Rich Felker
2020-09-03 16:25     ` Stefan O'Rear
2020-09-03 16:38       ` Rich Felker
2020-09-03 11:23 ` [musl] [PATCH 08/14] riscv: Fall back to syscall __riscv_flush_icache Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 09/14] riscv32: Target and subtarget detection Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 10/14] riscv32: add arch headers Stefan O'Rear
2020-09-03 15:49   ` Arnd Bergmann
2020-09-03 11:23 ` [musl] [PATCH 11/14] riscv32: Add fenv and math Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 12/14] riscv32: Add dlsym Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 13/14] riscv32: Add jmp_buf and sigreturn Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 14/14] riscv32: Add thread support Stefan O'Rear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a3BZ1Sn4LE3UP+h8-NMy2UuX3EqU=Frwsx2CfGjPBFCZQ@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).