On Wed, Aug 19, 2020 at 3:30 AM Dave Martin <Dave.Martin@xxxxxxx> wrote: > > 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@xxxxxxxxxx> > > --- > > 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. This flag (bit 25) is covered by the comment in include/uapi/asm-generic/signal-defs.h that reads: /* * The following bits are used in architecture-specific SA_* definitions and * should be avoided for new generic flags: 3, 4, 5, 6, 7, 8, 9, 16, 24, 25, 26. */ Peter