linux-stable/drivers/firmware
Ard Biesheuvel 14c43be601 efi/arm*: Drop writable mapping of the UEFI System table
Commit:

  2eec5dedf7 ("efi/arm-init: Use read-only early mappings")

updated the early ARM UEFI init code to create the temporary, early
mapping of the UEFI System table using read-only attributes, as a
hardening measure against inadvertent modification.

However, this still leaves the permanent, writable mapping of the UEFI
System table, which is only ever referenced during invocations of UEFI
Runtime Services, at which time the UEFI virtual mapping is available,
which also covers the system table. (This is guaranteed by the fact that
SetVirtualAddressMap(), which is a runtime service itself, converts
various entries in the table to their virtual equivalents, which implies
that the table must be covered by a RuntimeServicesData region that has
the EFI_MEMORY_RUNTIME attribute.)

So instead of creating this permanent mapping, record the virtual address
of the system table inside the UEFI virtual mapping, and dereference that
when accessing the table. This protects the contents of the system table
from inadvertent (or deliberate) modification when no UEFI Runtime
Services calls are in progress.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1461614832-17633-3-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-28 11:33:47 +02:00
..
broadcom drivers/firmware/broadcom/bcm47xx_nvram.c: fix incorrect __ioread32_copy 2016-03-17 15:09:34 -07:00
efi efi/arm*: Drop writable mapping of the UEFI System table 2016-04-28 11:33:47 +02:00
google
arm_scpi.c firmware: arm_scpi: add support for 64-bit sensor values 2016-02-16 09:26:27 +00:00
dcdbas.c
dcdbas.h
dell_rbu.c
dmi-id.c
dmi-sysfs.c
dmi_scan.c firmware: dmi_scan: Save SMBIOS Type 9 System Slots 2016-01-15 22:08:45 +01:00
edd.c
iscsi_ibft.c iscsi_ibft: Add prefix-len attr and display netmask 2016-03-14 10:30:57 -04:00
iscsi_ibft_find.c
Kconfig firmware: qemu config needs I/O ports 2016-02-11 20:13:35 -08:00
Makefile firmware: introduce sysfs driver for QEMU's fw_cfg device 2016-02-09 17:37:39 -08:00
memmap.c
pcdp.c
pcdp.h
psci.c ARM: 8511/1: ARM64: kernel: PSCI: move PSCI idle management code to drivers/firmware 2016-02-11 15:33:38 +00:00
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg.c: hold ACPI global lock during device access 2016-04-07 15:16:40 +03:00
raspberrypi.c