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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7582 invoked from network); 5 Feb 2023 23:54:42 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Feb 2023 23:54:42 -0000 Received: (qmail 20027 invoked by uid 550); 5 Feb 2023 23:54:39 -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 19989 invoked from network); 5 Feb 2023 23:54:39 -0000 Date: Sun, 5 Feb 2023 18:54:26 -0500 From: Rich Felker To: enh Cc: Khem Raj , musl@lists.openwall.com Message-ID: <20230205235426.GO4163@brightrain.aerifal.cx> References: <20221110171858.GJ29905@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] SA_RESTORER for rv64? On Fri, Feb 03, 2023 at 10:44:56AM -0800, enh wrote: > oops, never actually sent the patch. attached... > > On Thu, Nov 10, 2022 at 9:31 AM Khem Raj wrote: > > > > On Thu, Nov 10, 2022 at 9:19 AM Rich Felker wrote: > > > > > > On Thu, Nov 10, 2022 at 07:44:23AM -0800, enh wrote: > > > > arch/riscv64/bits/signal.h has contained a definition for SA_RESTORER since > > > > the initial commit, but i think that's just copy & paste from whichever > > > > architecture the rv64 headers were based on? the linux kernel itself > > > > doesn't have SA_RESTORER for rv64, unless i'm missing something? > > > > > > I suspect this is just a mistake. Have you seen any ill effects from > > > it? If riscv folks can confirm it's wrong, I'll remove it. > > > > Yeah I think it should be removed. Perhaps mips is in same boat. > > > > > > > > Rich > From 6413de6d9f785c98e5bc0cf40be947f1169d2fd7 Mon Sep 17 00:00:00 2001 > From: Elliott Hughes > Date: Fri, 3 Feb 2023 10:42:55 -0800 > Subject: [PATCH] risc-v does not have SA_RESTORER. > > The kernel's include/uapi/asm-generic/signal-defs.h explicitly calls > this out as obsolete. New architectures like risc-v do not define it. > --- > arch/riscv64/bits/signal.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h > index 287367db..fd6157a3 100644 > --- a/arch/riscv64/bits/signal.h > +++ b/arch/riscv64/bits/signal.h > @@ -76,7 +76,6 @@ typedef struct __ucontext > #define SA_RESTART 0x10000000 > #define SA_NODEFER 0x40000000 > #define SA_RESETHAND 0x80000000 > -#define SA_RESTORER 0x04000000 > > #endif > > -- > 2.39.1.519.gcb327c4b5f-goog > I don't think this patch works as-is, since musl unconditionally uses SA_RESTORER. We probably need to make that conditional on its presence, and it looks like there's also a wrong-struct-layout issue on archs where it's absent... Rich