Skip to content

Commit b8dbf73

Browse files
committed
Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI updates from Ingo Molnar: "The biggest change in this cycle was the addition of ARM CPER error decoding when printing EFI errors into the kernel log. There are also misc smaller updates: documentation update, cleanups and an EFI memory map permissions quirk" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Clarify that reset attack mitigation needs appropriate userspace efi: Parse ARM error information value efi: Move ARM CPER code to new file efi: Use PTR_ERR_OR_ZERO() arm64/efi: Ignore EFI_MEMORY_XP attribute if RP and/or WP are set efi/capsule-loader: Fix pr_err() string to end with newline
2 parents d772794 + a5c03c3 commit b8dbf73

File tree

8 files changed

+422
-123
lines changed

8 files changed

+422
-123
lines changed

arch/arm64/kernel/efi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)
4848
return pgprot_val(PAGE_KERNEL_ROX);
4949

5050
/* RW- */
51-
if (attr & EFI_MEMORY_XP || type != EFI_RUNTIME_SERVICES_CODE)
51+
if (((attr & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP)) ==
52+
EFI_MEMORY_XP) ||
53+
type != EFI_RUNTIME_SERVICES_CODE)
5254
return pgprot_val(PAGE_KERNEL);
5355

5456
/* RWX */

drivers/firmware/efi/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,21 @@ config RESET_ATTACK_MITIGATION
159159
using the TCG Platform Reset Attack Mitigation specification. This
160160
protects against an attacker forcibly rebooting the system while it
161161
still contains secrets in RAM, booting another OS and extracting the
162-
secrets.
162+
secrets. This should only be enabled when userland is configured to
163+
clear the MemoryOverwriteRequest flag on clean shutdown after secrets
164+
have been evicted, since otherwise it will trigger even on clean
165+
reboots.
163166

164167
endmenu
165168

166169
config UEFI_CPER
167170
bool
168171

172+
config UEFI_CPER_ARM
173+
bool
174+
depends on UEFI_CPER && ( ARM || ARM64 )
175+
default y
176+
169177
config EFI_DEV_PATH_PARSER
170178
bool
171179
depends on ACPI

drivers/firmware/efi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ arm-obj-$(CONFIG_EFI) := arm-init.o arm-runtime.o
3030
obj-$(CONFIG_ARM) += $(arm-obj-y)
3131
obj-$(CONFIG_ARM64) += $(arm-obj-y)
3232
obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-loader.o
33+
obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o

drivers/firmware/efi/capsule-loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int __efi_capsule_setup_info(struct capsule_info *cap_info)
4545
pages_needed = ALIGN(cap_info->total_size, PAGE_SIZE) / PAGE_SIZE;
4646

4747
if (pages_needed == 0) {
48-
pr_err("invalid capsule size");
48+
pr_err("invalid capsule size\n");
4949
return -EINVAL;
5050
}
5151

0 commit comments

Comments
 (0)