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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,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 11648 invoked from network); 3 Sep 2020 15:41:25 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Sep 2020 15:41:25 -0000 Received: (qmail 5362 invoked by uid 550); 3 Sep 2020 15:41:23 -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 5344 invoked from network); 3 Sep 2020 15:41:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm3; bh=GheYJkkXkrBZukzT448Y0zFo+FJ9V0m Ji699qaTPm5c=; b=Mj0gJ3zZ7hYSUhmNn8sJ0TztfiZqJQpK06Qsb/x9K7OLHfD k7P7tJICFzUoQqh8yjFy8069kSns6+8vw0R1Ma8PpMyBzBi923RUf943eCnLSdDE o7Hqej9iM7JJkYyJwpDEiZTLrgfQhosLVTCOS59C5xy9Omx6DVSAFC5Gl8t0bAPu 9zNMW1bXMllhDlct2K+sDpMOtthG6ZhL2EBHSkoROC2SLzFlm8JW55S8C613EDAI TA5glC6cx/A6S+SzlQ83+ALCVF13V88ln/bNVZjOwtqXcNQD1XrD9kuIkQBas4cN j0zoh1zz4gjjHSkGfxmE+5IxOi1Gaqkvcksb7zQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GheYJk kXkrBZukzT448Y0zFo+FJ9V0mJi699qaTPm5c=; b=qViYD6RM7i+VBy8QocThtv N4qi4D+8OQ2rk5YB8z1Uk5Y90B481pHRvTvbQaICJCVFgXCDU3Pe0IWDE6NDCbGm 7Qs1iZX182lplkpBsdAK3UhJ4zDBiR+Dl0DBJqEmwQlui3avPVBVIu4xjy/X80pm jJpHiDQfQ/N2d3xWucwxvd3pKcleTXoH4AZirzIeRDZEOCUqm8uTWP9sNWHwPA5e wP7Valv9d4JArA115OaRkAP0rxPxszTLSsEamWoiZ2+QR+rHLhiDTjfsTzA3emJj pkXCHymbztN2ymwsXGrUB6Pd43HdUaGoVClTesKUO/VjU60US9UBBOMYTGJ2CfrA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeguddgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfufhtvghfrghnucfqkdftvggrrhdfuceoshhorhgvrghr sehfrghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepieejjeetheeggefftd dvtddvfeevfedukeetgffhleetledvudfhgefgheegiefgnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhorhgvrghrsehfrghsthhmrghilh drtghomh X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-259-g88fbbfa-fm-20200903.003-g88fbbfa3 Mime-Version: 1.0 Message-Id: <994ceaaa-b71c-40b4-a006-48d66a3fbf57@www.fastmail.com> In-Reply-To: References: <20200903112309.102601-1-sorear@fastmail.com> <20200903112309.102601-8-sorear@fastmail.com> <4b00ac55-01ed-400c-89b8-5d7d13f37bc7@www.fastmail.com> Date: Thu, 03 Sep 2020 11:40:50 -0400 From: "Stefan O'Rear" To: musl@lists.openwall.com Content-Type: text/plain Subject: Re: [musl] [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 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