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 16639 invoked from network); 1 Aug 2022 17:06:32 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 1 Aug 2022 17:06:32 -0000 Received: (qmail 23860 invoked by uid 550); 1 Aug 2022 17:06:28 -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 23819 invoked from network); 1 Aug 2022 17:06:27 -0000 Date: Mon, 1 Aug 2022 13:06:14 -0400 From: Rich Felker To: WANG Xuerui Cc: musl@lists.openwall.com Message-ID: <20220801170612.GO7074@brightrain.aerifal.cx> References: <41f29835-b94f-ccfb-e437-b0bb48785aab@loongson.cn> <94a5c853-995d-8290-6d18-d6f2368622fb@xen0n.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <94a5c853-995d-8290-6d18-d6f2368622fb@xen0n.name> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] A question about SA_RESTORER On Mon, Aug 01, 2022 at 07:30:39PM +0800, WANG Xuerui wrote: > On 2022/8/1 19:11, Dmitry Selyutin wrote: > >On Mon, Aug 1, 2022 at 12:27 PM 王洪亮 wrote: > >>LoongArch does not support SA_RESTORER,but must be define the macro > >>of SA_RESTORER in LoongArch,otherwise a build error will occur. > >>I want to ask if could consider the unsupported case about the > >>reference of SA_RESTORER in architecture independent code? > >Perhaps you could just `#define SA_RESTORER 0` in the corresponding > >bits/signal.h? > > > Actually, I don't know if any app is going to check whether > SA_RESTORER is defined and take different codepaths accordingly; if > any such app exists, it could be broken if SA_RESTORER is defined > but in fact not needed/supported by the kernel. Otherwise defining > it as 0 should be okay. Applications really should not be using SA_RESTORER at all. It does not do anything at the application level; libc ignores any restorer provided by the application. But if you really don't want to expose SA_RESTORER, I think the definition as 0 could be in the arch's ksigaction.h rather than the public signal.h bits. Does that work? Rich