linux-stable/drivers/firmware/efi
Ard Biesheuvel 38fb665222 efi/libstub/arm: Don't randomize runtime regions when CONFIG_HIBERNATION=y
Commit:

  e69176d68d ("ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region")

implemented randomization of the virtual mapping that the OS chooses for
the UEFI runtime services. This was motivated by the fact that UEFI usually
does not bother to specify any permission restrictions for those regions,
making them prime real estate for exploitation now that the OS is getting
more and more careful not to leave any R+W+X mapped regions lying around.

However, this randomization breaks assumptions in the resume from
hibernation code, which expects all memory regions populated by UEFI to
remain in the same place, including their virtual mapping into the OS
memory space. While this assumption may not be entirely reasonable in the
first place, breaking it deliberately does not make a lot of sense either.
So let's refrain from this randomization pass if CONFIG_HIBERNATION=y.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: James Morse <james.morse@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20171025100448.26056-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 12:10:59 +02:00
..
libstub efi/libstub/arm: Don't randomize runtime regions when CONFIG_HIBERNATION=y 2017-10-25 12:10:59 +02:00
test efi/efi_test: Prevent an Oops in efi_runtime_query_capsulecaps() 2017-10-25 12:10:59 +02:00
apple-properties.c treewide: Consolidate Apple DMI checks 2017-08-03 23:26:22 +02:00
arm-init.c efi/arm/arm64: Add missing assignment of efi.config_table 2017-08-21 09:43:49 +02:00
arm-runtime.c efi/arm: Enable DMI/SMBIOS 2017-06-05 17:50:44 +02:00
capsule-loader.c efi/capsule-loader: Use page addresses rather than struct page pointers 2017-06-05 17:50:41 +02:00
capsule.c efi/capsule-loader: Use page addresses rather than struct page pointers 2017-06-05 17:50:41 +02:00
cper.c Just a single conversion to the new UUID API for this merge window. 2017-09-12 13:27:21 -07:00
dev-path-parser.c efi: Add device path parser 2016-11-13 08:23:15 +01:00
efi-bgrt.c efi/bgrt: Use efi_mem_type() 2017-08-26 09:20:33 +02:00
efi-pstore.c pstore: Populate pstore record->time field 2017-05-31 10:13:44 -07:00
efi.c efi: Move efi_mem_type() to common code 2017-08-26 09:20:33 +02:00
efibc.c efibc: Report more information in the error messages 2016-06-27 13:06:54 +02:00
efivars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00
esrt.c firmware/efi/esrt: Constify attribute_group structures 2017-08-21 09:43:51 +02:00
fake_mem.c x86/efi: Don't allocate memmap through memblock after mm_init() 2017-01-07 08:58:07 +01:00
Kconfig efi/libstub: Enable reset attack mitigation 2017-08-26 09:20:33 +02:00
Makefile x86/efi/bgrt: Move efi-bgrt handling out of arch/x86 2017-04-05 12:27:24 +02:00
memattr.c x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE 2017-02-01 08:45:44 +01:00
memmap.c x86/efi: Don't allocate memmap through memblock after mm_init() 2017-01-07 08:58:07 +01:00
reboot.c efi/reboot: Make function pointer orig_pm_power_off static 2017-08-26 09:20:33 +02:00
runtime-map.c efi/runtime-map: Use efi.memmap directly instead of a copy 2016-09-09 16:08:36 +01:00
runtime-wrappers.c efi: Replace runtime services spinlock with semaphore 2016-09-09 16:08:43 +01:00
vars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00