summaryrefslogtreecommitdiffstats
path: root/fs/signalfd.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2021-04-30 17:29:36 -0500
committerEric W. Biederman <ebiederm@xmission.com>2021-05-18 16:20:34 -0500
commit9abcabe3111811aeae0f3a14e159b14248631875 (patch)
treecc6f95ed83d9b4e161b29851b20eb6784bd34ce8 /fs/signalfd.c
parentadd0b32ef9146a8559a60aed54c37692a5f9d34f (diff)
downloadlinux-stable-9abcabe3111811aeae0f3a14e159b14248631875.tar.gz
linux-stable-9abcabe3111811aeae0f3a14e159b14248631875.tar.bz2
linux-stable-9abcabe3111811aeae0f3a14e159b14248631875.zip
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>
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r--fs/signalfd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 040a1142915f..e87e59581653 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -123,15 +123,13 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
*/
case SIL_FAULT:
new.ssi_addr = (long) kinfo->si_addr;
-#ifdef __ARCH_SI_TRAPNO
+ break;
+ case SIL_FAULT_TRAPNO:
+ new.ssi_addr = (long) kinfo->si_addr;
new.ssi_trapno = kinfo->si_trapno;
-#endif
break;
case SIL_FAULT_MCEERR:
new.ssi_addr = (long) kinfo->si_addr;
-#ifdef __ARCH_SI_TRAPNO
- new.ssi_trapno = kinfo->si_trapno;
-#endif
new.ssi_addr_lsb = (short) kinfo->si_addr_lsb;
break;
case SIL_PERF_EVENT: