Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 1 Aug 2022 13:06:14 -0400
From: Rich Felker <>
To: WANG Xuerui <>
Subject: Re: 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?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.