diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-06-27 00:16:17 +0300 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2017-07-20 03:13:15 +0300 |
commit | ea1b75cf9138003eee6389b70e654f5865728525 (patch) | |
tree | 8f211dd50b28dcd7ba73f3e665c1fcacfbb94514 /arch/mips/kernel | |
parent | cc9f72e474a4da365896d0e528da324f205e8b31 (diff) | |
download | linux-ea1b75cf9138003eee6389b70e654f5865728525.tar.xz |
signal/mips: Document a conflict with SI_USER with SIGFPE
Setting si_code to __SI_FAULT results in a userspace seeing
an si_code of 0. This is the same si_code as SI_USER. Posix
and common sense requires that SI_USER not be a signal specific
si_code. As such this use of 0 for the si_code is a pretty
horribly broken ABI.
This use of of __SI_FAULT is only a decade old. Which compared
to the other pieces of kernel code that has made this mistake
is almost yesterday.
This is probably worth fixing but I don't know mips well enough
to know what si_code to would be the proper one to use.
Cc: Ralf Baechle <ralf@linux-mips.org>
Ref: 948a34cf3988 ("[MIPS] Maintain si_code field properly for FP exceptions")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index b68b4d0726d3..6c9cca9c5341 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -735,7 +735,7 @@ void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr, else if (fcr31 & FPU_CSR_INE_X) si.si_code = FPE_FLTRES; else - si.si_code = __SI_FAULT; + si.si_code = FPE_FIXME; force_sig_info(SIGFPE, &si, tsk); } |