On Wed, Nov 4, 2020 at 10:48 AM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote: > > Peter Collingbourne <pcc@xxxxxxxxxx> writes: > > > 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. > > > > A consequence of this change is that on powerpc and x86, the constants' > > values aside from SA_RESETHAND change signedness from unsigned > > to signed. This is not expected to impact realistic use of these > > constants. In particular the typical use of the constants where they > > are or'ed together and assigned to sa_flags (or another int variable) > > would not be affected. > > Except for the removal of SA_RESTORER on arm (see below). > Acked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Thanks for the review. > > > > Signed-off-by: Peter Collingbourne <pcc@xxxxxxxxxx> > > Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > > Reviewed-by: Dave Martin <Dave.Martin@xxxxxxx> > > Link: https://linux-review.googlesource.com/id/Ia3849f18b8009bf41faca374e701cdca36974528 > > --- > > v11: > > - tweak the commit message to point out the change from unsigned > > to signed > > > > v10: > > - move the comments around and add one for SA_SIGINFO > > > > > 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 > > > -#define SA_RESTORER 0x04000000 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Was removing SA_RESTOER from arm a typo? > If not it is probably better to move the removal into a separate patch. Yes, that was a mistake, thanks for the catch. I'll fix it in v14. Peter