From: Dave Martin <Dave.Martin@arm.com>
To: Peter Collingbourne <pcc@google.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-parisc@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Kevin Brodsky <kevin.brodsky@arm.com>,
Oleg Nesterov <oleg@redhat.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Kostya Serebryany <kcc@google.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andrey Konovalov <andreyknvl@google.com>,
David Spickett <david.spickett@linaro.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Will Deacon <will@kernel.org>,
Evgenii Stepanov <eugenis@google.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v9 2/6] arch: move SA_* definitions to generic headers
Date: Wed, 19 Aug 2020 11:30:00 +0100 [thread overview]
Message-ID: <20200819103000.GE6642@arm.com> (raw)
In-Reply-To: <691510496a422023a2934d42b068493ed2d60ccc.1597720138.git.pcc@google.com>
On Mon, Aug 17, 2020 at 08:33:47PM -0700, Peter Collingbourne wrote:
> Most architectures with the exception of alpha, mips, parisc and
> sparc use the same values for these flags. Move their definitions into
> asm-generic/signal-defs.h and allow the architectures with non-standard
> values to override them. Also, document the non-standard flag values
> in order to make it easier to add new generic flags in the future.
>
> Signed-off-by: Peter Collingbourne <pcc@google.com>
> ---
> View this change in Gerrit: https://linux-review.googlesource.com/q/Ia3849f18b8009bf41faca374e701cdca36974528
>
> arch/alpha/include/uapi/asm/signal.h | 14 --------
> arch/arm/include/uapi/asm/signal.h | 28 ++-------------
> arch/h8300/include/uapi/asm/signal.h | 24 -------------
> arch/ia64/include/uapi/asm/signal.h | 24 -------------
> arch/m68k/include/uapi/asm/signal.h | 24 -------------
> arch/mips/include/uapi/asm/signal.h | 12 -------
> arch/parisc/include/uapi/asm/signal.h | 13 -------
> arch/powerpc/include/uapi/asm/signal.h | 24 -------------
> arch/s390/include/uapi/asm/signal.h | 24 -------------
> arch/sparc/include/uapi/asm/signal.h | 4 +--
> arch/x86/include/uapi/asm/signal.h | 24 -------------
> arch/xtensa/include/uapi/asm/signal.h | 24 -------------
> include/uapi/asm-generic/signal-defs.h | 47 ++++++++++++++++++++++++++
> include/uapi/asm-generic/signal.h | 29 ----------------
> 14 files changed, 51 insertions(+), 264 deletions(-)
Nice diffstat!
>
> diff --git a/arch/alpha/include/uapi/asm/signal.h b/arch/alpha/include/uapi/asm/signal.h
> index 74c750bf1c1a..a69dd8d080a8 100644
> --- a/arch/alpha/include/uapi/asm/signal.h
> +++ b/arch/alpha/include/uapi/asm/signal.h
> @@ -60,20 +60,6 @@ typedef unsigned long sigset_t;
> #define SIGRTMIN 32
> #define SIGRTMAX _NSIG
>
> -/*
> - * SA_FLAGS values:
> - *
> - * SA_ONSTACK indicates that a registered stack_t will be used.
> - * SA_RESTART flag to get restarting signals (which were the default long ago)
> - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
> - * SA_RESETHAND clears the handler when the signal is delivered.
> - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
> - * SA_NODEFER prevents the current signal from being masked in the handler.
> - *
> - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
> - * Unix names RESETHAND and NODEFER respectively.
> - */
> -
> #define SA_ONSTACK 0x00000001
> #define SA_RESTART 0x00000002
> #define SA_NOCLDSTOP 0x00000004
> diff --git a/arch/arm/include/uapi/asm/signal.h b/arch/arm/include/uapi/asm/signal.h
> index 9b4185ba4f8a..7727f0984d26 100644
> --- a/arch/arm/include/uapi/asm/signal.h
> +++ b/arch/arm/include/uapi/asm/signal.h
> @@ -60,33 +60,11 @@ typedef unsigned long sigset_t;
> #define SIGSWI 32
>
> /*
> - * SA_FLAGS values:
> - *
> - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
> - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
> - * SA_SIGINFO deliver the signal with SIGINFO structs
> - * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task
> - * is running in 26-bit.
> - * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
> - * SA_RESTART flag to get restarting signals (which were the default long ago)
> - * SA_NODEFER prevents the current signal from being masked in the handler.
> - * SA_RESETHAND clears the handler when the signal is delivered.
> - *
> - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
> - * Unix names RESETHAND and NODEFER respectively.
> + * SA_THIRTYTWO historically meant deliver the signal in 32-bit mode, even if
> + * the task is running in 26-bit. But since the kernel no longer supports
> + * 26-bit mode, the flag has no effect.
> */
> -#define SA_NOCLDSTOP 0x00000001
> -#define SA_NOCLDWAIT 0x00000002
> -#define SA_SIGINFO 0x00000004
> #define SA_THIRTYTWO 0x02000000
Can we add a placeholder for this in the common header? We don't want
people accidentally defining a new generic flag that clashes with this.
> -#define SA_RESTORER 0x04000000
> -#define SA_ONSTACK 0x08000000
> -#define SA_RESTART 0x10000000
> -#define SA_NODEFER 0x40000000
> -#define SA_RESETHAND 0x80000000
> -
> -#define SA_NOMASK SA_NODEFER
> -#define SA_ONESHOT SA_RESETHAND
>
> #define MINSIGSTKSZ 2048
> #define SIGSTKSZ 8192
[...]
Otherwise, looks like a sensible cleanup.
Cheers
---Dave
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-19 10:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 3:33 [PATCH v9 0/6] arm64: expose FAR_EL1 tag bits in siginfo Peter Collingbourne
2020-08-18 3:33 ` [PATCH v9 1/6] parisc: start using signal-defs.h Peter Collingbourne
2020-08-18 3:33 ` [PATCH v9 2/6] arch: move SA_* definitions to generic headers Peter Collingbourne
2020-08-19 7:13 ` Geert Uytterhoeven
2020-08-19 22:44 ` Peter Collingbourne
2020-08-19 10:30 ` Dave Martin [this message]
2020-08-19 21:35 ` Peter Collingbourne
2020-08-18 3:33 ` [PATCH v9 3/6] signal: clear non-uapi flag bits when passing/returning sa_flags Peter Collingbourne
2020-08-19 10:39 ` Dave Martin
2020-08-19 23:39 ` Peter Collingbourne
2020-08-24 13:40 ` Dave Martin
2020-08-25 0:51 ` Peter Collingbourne
2020-08-25 14:25 ` Dave Martin
2020-08-18 3:33 ` [PATCH v9 4/6] signal: define the SA_UNSUPPORTED bit in sa_flags Peter Collingbourne
2020-08-19 14:51 ` Dave Martin
2020-08-20 0:23 ` Peter Collingbourne
2020-08-24 13:41 ` Dave Martin
2020-08-18 3:33 ` [PATCH v9 5/6] signal: define the field siginfo.si_xflags Peter Collingbourne
2020-08-19 15:40 ` Dave Martin
2020-08-20 1:37 ` Peter Collingbourne
2020-08-24 14:03 ` Dave Martin
2020-08-25 1:27 ` Peter Collingbourne
2020-08-25 14:47 ` Dave Martin
2020-08-25 20:08 ` Peter Collingbourne
2020-08-26 16:15 ` Dave Martin
2020-08-18 3:33 ` [PATCH v9 6/6] arm64: expose FAR_EL1 tag bits in siginfo Peter Collingbourne
2020-08-19 15:56 ` Dave Martin
2020-08-20 1:49 ` Peter Collingbourne
2020-08-24 14:23 ` Dave Martin
2020-08-25 2:18 ` Peter Collingbourne
2020-08-25 15:02 ` Dave Martin
2020-08-25 22:06 ` Peter Collingbourne
2020-08-26 15:32 ` Dave Martin
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=20200819103000.GE6642@arm.com \
--to=dave.martin@arm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=andreyknvl@google.com \
--cc=catalin.marinas@arm.com \
--cc=david.spickett@linaro.org \
--cc=ebiederm@xmission.com \
--cc=eugenis@google.com \
--cc=kcc@google.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-parisc@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pcc@google.com \
--cc=rth@twiddle.net \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
/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.
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).