linux_old1/drivers/firmware/efi/libstub
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
..
Makefile efi/libstub: Enable reset attack mitigation 2017-08-26 09:20:33 +02:00
arm-stub.c efi/libstub/arm: Don't randomize runtime regions when CONFIG_HIBERNATION=y 2017-10-25 12:10:59 +02:00
arm32-stub.c efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg 2017-04-05 12:27:28 +02:00
arm64-stub.c Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-07 09:42:35 -07:00
efi-stub-helper.c efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor 2017-08-17 10:50:57 +02:00
efistub.h efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg 2017-04-05 12:27:28 +02:00
fdt.c arm64 updates for 4.12: 2017-05-05 12:11:37 -07:00
gop.c efi/libstub: Skip GOP with PIXEL_BLT_ONLY format 2017-04-05 09:20:18 +02:00
random.c efi/random: Increase size of firmware supplied randomness 2017-08-26 09:20:33 +02:00
secureboot.c efi: Remove duplicate 'const' specifiers 2017-05-28 11:06:16 +02:00
string.c arm64/efi: isolate EFI stub from the kernel proper 2015-10-12 16:20:12 +01:00
tpm.c efi/libstub: Enable reset attack mitigation 2017-08-26 09:20:33 +02:00