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=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10291 invoked from network); 6 Feb 2023 16:51:42 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 6 Feb 2023 16:51:42 -0000 Received: (qmail 24187 invoked by uid 550); 6 Feb 2023 16:51:38 -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 24152 invoked from network); 6 Feb 2023 16:51:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FdTVBx/gD3oBrPbOXWsmiuoCCfiRDDuRoJ0CS/hTvdo=; b=ebdCU539tvYE2kIE3uFBu0eLT3dnWe1WTE50K6GNo/5lOGH+nvo2fQlhlobWpIizKZ BSETk32JfbaLs/5iz2j/ZYV+Tbp7zKypHQK0ib4qInI++sOjRX9W9bD38CP8evbzRfDn pHrJHg6uIZ2+tg016uyPTXv0Rd7Weme4/fPzBC0kMvDsb2I0gR6ImX/X/eeXmyqXm8KA /bsukR5+st0amVt5ldxfV0hIkM749ioVzEuiO17zDpmLUfVbLaY5F1psWpdy4Vua26DA PauBhaCM5Ye4bdPUb/jQtNADYGh+REmi945G18k3Lzb29KYfWQClTv35Ib+eOBXFivnc HHtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FdTVBx/gD3oBrPbOXWsmiuoCCfiRDDuRoJ0CS/hTvdo=; b=ElyoXGAfRPhqeQD6kfzWiernFFpkheSJEBzXpXGWIPrmHrCi+z94Ab1PZacUi4ICI+ TTwDv57ZUWj0UIortEnABGKKDNzRXGcbftN2iD2ODqk/Iw2dXBHWwUIdV/e+dQyKUu4i d+B8UIXgYBWffH3zuHyvMNr4cbsTkOkcZLq7SoglL3BcHy+lSPHYD2LXTdXnbzXlU9bc Y/gohxM5A6tV8xRjhCaouhF0aO0UM4KlQT9wwTI0+ntJ/A0tLYb6LtMkqdCkei3V8MJk irEu0MOOaaIqSijC3IT7uvxM9yPHtbG/yRiqnERTtybM3yH9jEP3Mw7G2BxOkuuD5jxj qdSg== X-Gm-Message-State: AO0yUKVxclKtVOoVUHZUIrn9oYb9sZsERVCtiLauzjfNgiGhf2yPW2ka j9N0atpUrosZQ3WLrG2xLd1E1pTI6iARUCDBuV4mmw== X-Google-Smtp-Source: AK7set/fFleAsg2I7lsemwMV/pl3azUqEzNcNl0UNckP4qklb1LwWahDGXakr+aG/nrpBT6i/s4WLc/DDqd2OWqeZzs= X-Received: by 2002:ac8:58cf:0:b0:3b8:6bb5:664c with SMTP id u15-20020ac858cf000000b003b86bb5664cmr1769163qta.191.1675702285214; Mon, 06 Feb 2023 08:51:25 -0800 (PST) MIME-Version: 1.0 References: <20221110171858.GJ29905@brightrain.aerifal.cx> <20230205235426.GO4163@brightrain.aerifal.cx> In-Reply-To: <20230205235426.GO4163@brightrain.aerifal.cx> From: enh Date: Mon, 6 Feb 2023 08:51:13 -0800 Message-ID: To: Rich Felker Cc: Khem Raj , musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] SA_RESTORER for rv64? On Sun, Feb 5, 2023 at 3:54 PM Rich Felker wrote: > > 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... yeah, bionic just uses the kernel uapi headers directly, and they look like this: struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; #ifdef SA_RESTORER __sigrestore_t sa_restorer; #endif sigset_t sa_mask; }; > Rich