mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: WANG Xuerui <i.musl@xen0n.name>
Cc: musl@lists.openwall.com
Subject: Re: [musl] A question about SA_RESTORER
Date: Mon, 1 Aug 2022 13:06:14 -0400	[thread overview]
Message-ID: <20220801170612.GO7074@brightrain.aerifal.cx> (raw)
In-Reply-To: <94a5c853-995d-8290-6d18-d6f2368622fb@xen0n.name>

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 王洪亮 <wanghongliang@loongson.cn> 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

      reply	other threads:[~2022-08-01 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  9:27 王洪亮
2022-08-01 11:11 ` Dmitry Selyutin
2022-08-01 11:30   ` WANG Xuerui
2022-08-01 17:06     ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220801170612.GO7074@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=i.musl@xen0n.name \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).