[PATCH v13 1/8] parisc: Drop parisc special case for __sighandler_t

Dave Martin Dave.Martin at arm.com
Wed Nov 4 13:00:26 EST 2020


On Wed, Nov 04, 2020 at 05:24:48PM +0000, Catalin Marinas wrote:
> On Wed, Nov 04, 2020 at 10:54:34AM -0600, Eric W. Biederman wrote:
> > Peter Collingbourne <pcc at google.com> writes:
> > > From: Helge Deller <deller at gmx.de>
> > >
> > > I believe we can and *should* drop this parisc-specific typedef for
> > > __sighandler_t when compiling a 64-bit kernel. The reasons:
> > >
> > > 1. We don't have a 64-bit userspace yet, so nothing (on userspace side)
> > > can break.
> > >
> > > 2. Inside the Linux kernel, this is only used in kernel/signal.c, in
> > > function kernel_sigaction() where the signal handler is compared against
> > > SIG_IGN.  SIG_IGN is defined as (__sighandler_t)1), so only the pointers
> > > are compared.
> > >
> > > 3. Even when a 64-bit userspace gets added at some point, I think
> > > __sighandler_t should be defined what it is: a function pointer struct.
> > >
> > > I compiled kernel/signal.c with and without the patch, and the produced code
> > > is identical in both cases.
> > >
> > > Signed-off-by: Helge Deller <deller at gmx.de>
> > > Reviewed-by: Peter Collingbourne <pcc at google.com>
> > > Link:
> > > https://linux-review.googlesource.com/id/I21c43f21b264f339e3aa395626af838646f62d97
> > 
> > Peter as you have sent this, this also needs your Signed-off-by.
> > 
> > Otherwise this looks reasonable to me.
> > Acked-by: "Eric W. Biederman" <ebiederm at xmission.com>
> > 
> > While the final bits look like they are still under discussion it looks
> > like the preceding cleanups are pretty solid at this point.
> 
> Minor nits, unless you nak the whole approach of SA_FAULTFLAGS and
> SA_UNSUPPORTED ;) (it looks a bit complicated to me but I don't have a
> better idea for a generic implementation).

It is a bit complicated, but we didn't come up with anything better so
far that can cope with the various historical quirks in the signal API.

A bigger overhaul of the whole interface might be a good idea at some
point, but it would probably be a mistake to rush that.


It may be possible to make the SA_UNSUPPORTED stuff a bit more
digestible via libc.  I'll try to get a discussion started on that.

[...]

Cheers
---Dave



More information about the linux-arm-kernel mailing list