kernel_optimize_test/arch/m68k
Geert Uytterhoeven e4dc601bf9 m68k: Disable/restore interrupts in hwreg_present()/hwreg_write()
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>
Cc: stable@vger.kernel.org
2014-10-03 10:50:56 +02:00
..
amiga m68k/amiga: Convert printk(foo to pr_foo() 2014-05-28 10:11:54 +02:00
apollo m68k/apollo: Convert printk to pr_foo() 2014-05-28 10:11:55 +02:00
atari m68k/atari - stram: Add missing #include <linux/ioport.h> 2014-09-14 11:51:35 +02:00
bvme6000 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
configs tgt: defconfig cleanup 2014-07-17 22:07:44 +02:00
emu Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block 2014-01-30 11:19:05 -08:00
fpsp040 Fix common misspellings 2011-03-31 11:26:23 -03:00
hp300 m68k/hp300: Convert printk to pr_foo() 2014-05-28 10:11:55 +02:00
ifpsp060 Fix common misspellings 2011-03-31 11:26:23 -03:00
include m68k: Add missing ioport_unmap() 2014-09-28 11:36:33 +02:00
kernel m68k: Wire up memfd_create 2014-09-01 10:28:00 +02:00
lib m68k/uaccess: Fix asm constraints for userspace access 2013-06-24 19:44:19 +02:00
mac m68k: Multi-platform EARLY_PRINTK 2014-05-28 10:10:04 +02: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-03 10:50:56 +02:00
mvme16x m68k/mvme16x: Adopt common boot console 2014-05-28 10:11:53 +02:00
mvme147 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
platform m68knommu: Make everything thats not exported, static. 2014-05-26 13:28:38 +10: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 Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Kconfig kexec: remove CONFIG_KEXEC dependency on crypto 2014-08-29 16:28:16 -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: Multi-platform EARLY_PRINTK 2014-05-28 10:10:04 +02:00
Kconfig.devices m68k: AMIGA_BUILTIN_SERIAL should depend on TTY 2014-09-28 11:36:38 +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