EFI changes for v4.16
Linus,
Please pull the latest efi-core-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-for-linus
# HEAD: a5c03c31af2291f13689d11760c0b59fb70c9a5a x86/efi: Clarify that reset attack mitigation needs appropriate userspace
The biggest change in this cycle was the addition of ARM CPER error decoding when printing EFI errors into the kernel log. There's also misc smaller updates:
documentation update, cleanups and an EFI memory map permissions quirk.
Thanks,
Ingo
------------------>
Ard Biesheuvel (1):
arm64/efi: Ignore EFI_MEMORY_XP attribute if RP and/or WP are set
Arvind Yadav (1):
efi/capsule-loader: Fix pr_err() string to end with newline
Matthew Garrett (1):
x86/efi: Clarify that reset attack mitigation needs appropriate userspace
Tyler Baicar (2):
efi: Move ARM CPER code to new file
efi: Parse ARM error information value
Vasyl Gomonovych (1):
efi: Use PTR_ERR_OR_ZERO()
arch/arm64/kernel/efi.c | 4 +- drivers/firmware/efi/Kconfig | 10 +- drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/capsule-loader.c | 2 +- drivers/firmware/efi/cper-arm.c | 356 ++++++++++++++++++++++++++++++++++ drivers/firmware/efi/cper.c | 122 +----------- drivers/firmware/efi/efi.c | 2 +- include/linux/cper.h | 48 +++++ 8 files changed, 422 insertions(+), 123 deletions(-) create mode 100644 drivers/firmware/efi/cper-arm.c
arch/arm64/kernel/efi.c +3 -1
@@ -48,7 +48,9 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)return pgprot_val (PAGE_KERNEL_ROX );/* RW- */ -if (attr &EFI_MEMORY_XP || type !=EFI_RUNTIME_SERVICES_CODE ) +if (((attr & (EFI_MEMORY_RP |EFI_MEMORY_WP |EFI_MEMORY_XP )) == +EFI_MEMORY_XP ) || + type !=EFI_RUNTIME_SERVICES_CODE )return pgprot_val (PAGE_KERNEL );/* RWX */
drivers/firmware/efi/Kconfig +9 -1
@@ -159,13 +159,21 @@ config RESET_ATTACK_MITIGATION using the TCG Platform Reset Attack Mitigation specification. This protects against an attacker forcibly rebooting the system while it still contains secrets in RAM, booting another OS and extracting the - secrets. + secrets. This should only be enabled when userland is configured to + clear the MemoryOverwriteRequest flag on clean shutdown after secrets + have been evicted, since otherwise it will trigger even on clean + reboots. endmenu config UEFI_CPER bool +config UEFI_CPER_ARM + bool + depends on UEFI_CPER && ( ARM || ARM64 ) + default y + config EFI_DEV_PATH_PARSER bool depends on ACPI
drivers/firmware/efi/Makefile +1 -0
@@ -30,3 +30,4 @@ arm-obj-$(CONFIG_EFI) := arm-init.o arm-runtime.o obj-$(CONFIG_ARM) += $(arm-obj-y) obj-$(CONFIG_ARM64) += $(arm-obj-y) obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-loader.o +obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o
drivers/firmware/efi/capsule-loader.c +1 -1
@@ -45,7 +45,7 @@ int __efi_capsule_setup_info(struct capsule_info *cap_info) pages_needed =ALIGN (cap_info->total_size,PAGE_SIZE ) /PAGE_SIZE ;if (pages_needed ==0 ) { -pr_err ("invalid capsule size" ); +pr_err ("invalid capsule size\n" );return -EINVAL ; }
drivers/firmware/efi/cper-arm.c new file +356 -0
356 lines not on this page · raw message
drivers/firmware/efi/cper.c +3 -119
140 lines not on this page · raw message
drivers/firmware/efi/efi.c +1 -1
@@ -608,7 +608,7 @@ static int __init efi_load_efivars(void)return 0 ; pdev =platform_device_register_simple ("efivars" ,0 ,NULL ,0 ); - return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; + return PTR_ERR_OR_ZERO(pdev); }device_initcall (efi_load_efivars);#endif
include/linux/cper.h +48 -0
65 lines not on this page · raw message