linux-stable/arch/mips
Maciej W. Rozycki 5a1aca4469 MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue
Sanitize FCSR Cause bit handling, following a trail of past attempts:

* commit 4249548454 ("MIPS: ptrace: Fix FP context restoration FCSR
regression"),

* commit 443c44032a ("MIPS: Always clear FCSR cause bits after
emulation"),

* commit 64bedffe49 ("MIPS: Clear [MSA]FPE CSR.Cause after
notify_die()"),

* commit b1442d39fa ("MIPS: Prevent user from setting FCSR cause
bits"),

* commit b54d2901517d ("Properly handle branch delay slots in connection
with signals.").

Specifically do not mask these bits out in ptrace(2) processing and send
a SIGFPE signal instead whenever a matching pair of an FCSR Cause and
Enable bit is seen as execution of an affected context is about to
resume.  Only then clear Cause bits, and even then do not clear any bits
that are set but masked with the respective Enable bits.  Adjust Cause
bit clearing throughout code likewise, except within the FPU emulator
proper where they are set according to IEEE 754 exceptions raised as the
operation emulated executed.  Do so so that any IEEE 754 exceptions
subject to their default handling are recorded like with operations
executed by FPU hardware.

Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14460/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-11-04 01:28:41 +01:00
..
alchemy MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
ar7 MIPS: ar7: use gpiochip data pointer 2016-02-19 09:51:43 +01:00
ath25
ath79 MIPS: ath79: Fix test for error return of clk_register_fixed_factor(). 2016-09-13 14:13:26 +02:00
bcm47xx MIPS: BCM47xx: Make serial explicitly non-modular 2016-10-04 16:13:57 +02:00
bcm63xx MIPS: BCM63xx: Let clk_disable() return immediately if clk is NULL 2016-10-04 16:13:57 +02:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: Malta: Fixup reboot 2016-11-04 00:27:27 +01:00
cavium-octeon Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
dec MIPS: DEC: Avoid la pseudo-instruction in delay slots 2016-09-29 18:59:49 +02:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
generic MIPS: generic: Fix KASLR for generic kernel. 2016-11-04 00:32:06 +01:00
include MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue 2016-11-04 01:28:41 +01:00
jazz
jz4740 tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
kernel MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue 2016-11-04 01:28:41 +01:00
kvm KVM: MIPS: Add missing uaccess.h include 2016-10-19 00:37:05 +01:00
lantiq MIPS: Lantiq: Make xrx200_phy_fw explicitly non-modular 2016-10-04 16:13:57 +02:00
lasat mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
lib MIPS: dump_tlb: Fix printk continuations 2016-11-04 01:04:32 +01:00
loongson32 MIPS: Add RTC support for Loongson1C board 2016-10-04 16:13:57 +02:00
loongson64 mips/loongson/smp: Convert to hotplug state machine 2016-09-19 21:44:32 +02:00
math-emu treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
mm Merge branch 'gup_flag-cleanups' 2016-10-19 08:39:47 -07:00
mti-malta MIPS: Print CM error reports upon bus errors 2016-10-06 18:02:18 +02:00
net treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
netlogic dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
oprofile MIPS/Loongson-3: Convert oprofile to hotplug state machine 2016-07-15 10:40:29 +02:00
paravirt
pci MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
pic32 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power
ralink MIPS: ralink: Make timer explicitly non-modular 2016-10-04 16:13:57 +02:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22 rtc: ds1286: move header to linux/rtc 2016-07-08 16:23:11 +02:00
sgi-ip27 MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
sgi-ip32
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: PCI: Reduce stack frame usage 2016-10-04 16:13:57 +02:00
vdso MIPS: VDSO: Drop duplicated -I*/-E* aflags 2016-10-11 15:07:30 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
Kbuild MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Fix build of compressed image 2016-11-04 00:37:15 +01:00