From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28610 invoked from network); 3 Sep 2020 18:09:00 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Sep 2020 18:09:00 -0000 Received: (qmail 20247 invoked by uid 550); 3 Sep 2020 18:08:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20229 invoked from network); 3 Sep 2020 18:08:49 -0000 X-Gm-Message-State: AOAM531jrGGPsLPVw2CmtcGDYSe+nmmmlK+B6adCA+yVLqsyAsnDN2JQ GPUbLuNP5f1VfG6d09lpnidU20wz43t831/o5QA= X-Google-Smtp-Source: ABdhPJwFlkbhdTJyZEeVzNIBpOotBVOA0b8wzahJGxHbd6V6ijcLVdrIaZ7M1d8v1uonz+kjuny/KVyAU257Tqv+CDg= X-Received: by 2002:aed:2ce5:: with SMTP id g92mr4675764qtd.204.1599156516089; Thu, 03 Sep 2020 11:08:36 -0700 (PDT) MIME-Version: 1.0 References: <20200903112309.102601-1-sorear@fastmail.com> <20200903112309.102601-8-sorear@fastmail.com> <4b00ac55-01ed-400c-89b8-5d7d13f37bc7@www.fastmail.com> <994ceaaa-b71c-40b4-a006-48d66a3fbf57@www.fastmail.com> In-Reply-To: <994ceaaa-b71c-40b4-a006-48d66a3fbf57@www.fastmail.com> From: Arnd Bergmann Date: Thu, 3 Sep 2020 20:08:19 +0200 X-Gmail-Original-Message-ID: Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K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xNxtABSXOTu3G I8UXQ5FIRj7Ad52oswtlDwUzGJkpKxeUf6mfCUbJXYnGynt3IHMF9gB9BlFTykOWSL3BwJJ Subject: Re: [musl] [PATCH 07/14] Emulate wait4 using waitid On Thu, Sep 3, 2020 at 5:41 PM Stefan O'Rear 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 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