linux/arch/m68k
Geert Uytterhoeven c3e1d75a1b m68k: Disable/restore interrupts in hwreg_present()/hwreg_write()
commit e4dc601bf9 upstream.

hwreg_present() and hwreg_write() temporarily change the VBR register to
another vector table. This table contains a valid bus error handler
only, all other entries point to arbitrary addresses.

If an interrupt comes in while the temporary table is active, the
processor will start executing at such an arbitrary address, and the
kernel will crash.

While most callers run early, before interrupts are enabled, or
explicitly disable interrupts, Finn Thain pointed out that macsonic has
one callsite that doesn't, causing intermittent boot crashes.
There's another unsafe callsite in hilkbd.

Fix this for good by disabling and restoring interrupts inside
hwreg_present() and hwreg_write().

Explicitly disabling interrupts can be removed from the callsites later.

Reported-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 09:38:21 -07:00
..
amiga m68k/amiga,atari: Fix specifying multiple debug= parameters 2013-12-08 11:03:21 +01:00
apollo m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
atari m68k/irq - Use polled IRQ flag for MFP timer cascaded interrupts 2014-01-13 09:29:10 +01:00
bvme6000 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
configs m68k: Update defconfigs for v3.13-rc1 2013-12-30 21:29:05 +01:00
emu Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block 2014-01-30 11:19:05 -08:00
fpsp040
hp300 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
ifpsp060
include m68k: Wire up sched_setattr and sched_getattr 2014-02-10 20:10:20 +01:00
kernel m68k: Wire up sched_setattr and sched_getattr 2014-02-10 20:10:20 +01:00
lib m68k/uaccess: Fix asm constraints for userspace access 2013-06-24 19:44:19 +02:00
mac m68k: Remove superfluous inclusions of <asm/bootinfo.h> 2013-11-26 11:09:22 +01:00
math-emu m68k/math-emu: unsigned issue, 'unsigned long' will never be less than zero 2013-06-24 19:44:19 +02:00
mm m68k: Disable/restore interrupts in hwreg_present()/hwreg_write() 2014-10-30 09:38:21 -07:00
mvme16x m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
mvme147 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
platform m68k: Simplify low level interrupt handling code 2013-11-13 20:21:46 +01:00
q40 m68k: Mark functions only called from setup_arch() __init 2013-11-26 11:08:54 +01:00
sun3 m68k/sun3: Dynamically allocate the table to track IOMMU use 2013-11-26 11:08:59 +01:00
sun3x m68k: Remove superfluous inclusions of <asm/bootinfo.h> 2013-11-26 11:09:22 +01:00
tools/amiga
Kconfig m68k: Skip futex_atomic_cmpxchg_inatomic() test 2014-04-14 06:50:05 -07:00
Kconfig.bus m68k/atari: ROM port ISA adapter support 2013-04-16 21:08:11 +02:00
Kconfig.cpu Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2013-05-10 07:22:35 -07:00
Kconfig.debug m68k: remove CONFIG_EARLY_PRINTK dependency on CONFIG_EMBEDDED, default to n 2013-06-24 19:44:18 +02:00
Kconfig.devices m68k/atari: EtherNEC - add platform device support 2013-04-16 21:20:14 +02:00
Kconfig.machine m68k: remove 16 unused boards in Kconfig.machine 2013-08-26 16:51:14 +10:00
Makefile m68knommu: add support for the ColdFire 537x family of CPUs 2013-04-29 09:17:58 +10:00
install.sh