alistair23-linux/arch/x86/platform
Ard Biesheuvel 83a0a2ea0b efi/x86: Prevent reentrant firmware calls in mixed mode
The UEFI spec does not permit runtime services to be called
reentrantly, and so it is up to the OS to provide proper locking
around such calls.

For the native case, this was fixed a long time ago, but for the
mixed mode case, no locking is done whatsoever. Note that the calls
are made with preemption and interrupts disabled, so only SMP
configurations are affected by this issue.

So add a spinlock and grab it when invoking a UEFI runtime service
in mixed mode. We will also need to provide non-blocking versions
of SetVariable() and QueryVariableInfo(), so add those as well.

Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180720014726.24031-2-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-07-22 14:13:42 +02:00
..
atom x86/platform/atom: Re-use DEFINE_SHOW_ATTRIBUTE() macro 2018-02-16 10:10:14 +01:00
ce4100 x86/init: Remove i8042_detect() from platform ops 2016-12-19 11:34:15 +01:00
efi efi/x86: Prevent reentrant firmware calls in mixed mode 2018-07-22 14:13:42 +02:00
geode
goldfish x86/platform/goldfish: Prevent unconditional loading 2017-02-15 08:49:58 -08:00
intel x86/platform/intel/iosf_mbi: Add unlocked PMIC bus access notifier unregister 2017-11-10 13:14:02 +01:00
intel-mid x86: Convert x86_platform_ops to timespec64 2018-05-19 14:03:14 +02:00
intel-quark x86/platform/quark: Re-use DEFINE_SHOW_ATTRIBUTE() macro 2018-02-16 10:10:14 +01:00
iris
olpc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scx200
sfi
ts5500 x86/platform: Delete extraneous MODULE_* tags fromm ts5500 2016-07-16 22:41:00 +02:00
uv treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00