signal: Implement SIL_FAULT_TRAPNO
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 30 Apr 2021 22:29:36 +0000 (17:29 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 18 May 2021 21:20:34 +0000 (16:20 -0500)
commit9abcabe3111811aeae0f3a14e159b14248631875
treecc6f95ed83d9b4e161b29851b20eb6784bd34ce8
parentadd0b32ef9146a8559a60aed54c37692a5f9d34f
signal: Implement SIL_FAULT_TRAPNO

Now that si_trapno is part of the union in _si_fault and available on
all architectures, add SIL_FAULT_TRAPNO and update siginfo_layout to
return SIL_FAULT_TRAPNO when the code assumes si_trapno is valid.

There is room for future changes to reduce when si_trapno is valid but
this is all that is needed to make si_trapno and the other members of
the the union in _sigfault mutually exclusive.

Update the code that uses siginfo_layout to deal with SIL_FAULT_TRAPNO
and have the same code ignore si_trapno in in all other cases.

v1: https://lkml.kernel.org/r/m1o8dvs7s7.fsf_-_@fess.ebiederm.org
v2: https://lkml.kernel.org/r/20210505141101.11519-6-ebiederm@xmission.com
Link: https://lkml.kernel.org/r/20210517195748.8880-2-ebiederm@xmission.com
Reviewed-by: Marco Elver <elver@google.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/signalfd.c
include/linux/signal.h
kernel/signal.c