aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apm_32.c
diff options
context:
space:
mode:
authorGravatar Ard Biesheuvel <ardb@kernel.org> 2023-02-06 13:33:07 +0100
committerGravatar Ard Biesheuvel <ardb@kernel.org> 2023-02-09 19:30:54 +0100
commit93be2859e26c3be847780c65313da1b261833451 (patch)
tree41b20e79a370172ee3630ab3039c5ffa90c73957 /arch/x86/kernel/apm_32.c
parentefi: arm64: Wire up BTI annotation in memory attributes table (diff)
downloadlinux-93be2859e26c3be847780c65313da1b261833451.tar.gz
linux-93be2859e26c3be847780c65313da1b261833451.tar.bz2
linux-93be2859e26c3be847780c65313da1b261833451.zip
efi: x86: Wire up IBT annotation in memory attributes table
UEFI v2.10 extends the EFI memory attributes table with a flag that indicates whether or not all RuntimeServicesCode regions were constructed with ENDBR landing pads, permitting the OS to map these regions with IBT restrictions enabled. So let's take this into account on x86 as well. Suggested-by: Peter Zijlstra <peterz@infradead.org> # ibt_save() changes Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'arch/x86/kernel/apm_32.c')
-rw-r--r--arch/x86/kernel/apm_32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 60e330cdbd17..c6c15ce1952f 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -609,7 +609,7 @@ static long __apm_bios_call(void *_call)
apm_irq_save(flags);
firmware_restrict_branch_speculation_start();
- ibt = ibt_save();
+ ibt = ibt_save(true);
APM_DO_SAVE_SEGS;
apm_bios_call_asm(call->func, call->ebx, call->ecx,
&call->eax, &call->ebx, &call->ecx, &call->edx,
@@ -690,7 +690,7 @@ static long __apm_bios_call_simple(void *_call)
apm_irq_save(flags);
firmware_restrict_branch_speculation_start();
- ibt = ibt_save();
+ ibt = ibt_save(true);
APM_DO_SAVE_SEGS;
error = apm_bios_call_simple_asm(call->func, call->ebx, call->ecx,
&call->eax);