efi: x86: Wire up IBT annotation in memory attributes table
authorArd Biesheuvel <ardb@kernel.org>
Mon, 6 Feb 2023 12:33:07 +0000 (13:33 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 9 Feb 2023 18:30:54 +0000 (19:30 +0100)
commit93be2859e26c3be847780c65313da1b261833451
tree41b20e79a370172ee3630ab3039c5ffa90c73957
parent1d959312e2f23c8ee6ed9432a6fa4416b267477b
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>
arch/x86/include/asm/efi.h
arch/x86/include/asm/ibt.h
arch/x86/kernel/apm_32.c
arch/x86/kernel/cpu/common.c
arch/x86/platform/efi/efi_64.c