efi: Discover BTI support in runtime services regions
authorArd Biesheuvel <ardb@kernel.org>
Wed, 1 Feb 2023 08:48:12 +0000 (09:48 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 4 Feb 2023 08:19:02 +0000 (09:19 +0100)
commitcf1d2ffcc6f17b422239f6ab34b078945d07f9aa
treea42d8efe5cc90616ea052bbbe84dfaad91b9f5a1
parentb0048092f7d3921d56f2c5bfa32062fac5e7500b
efi: Discover BTI support in runtime services regions

Add the generic plumbing to detect whether or not the runtime code
regions were constructed with BTI/IBT landing pads by the firmware,
permitting the OS to enable enforcement when mapping these regions into
the OS's address space.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
arch/arm/include/asm/efi.h
arch/arm/kernel/efi.c
arch/arm64/include/asm/efi.h
arch/arm64/kernel/efi.c
arch/riscv/include/asm/efi.h
arch/riscv/kernel/efi.c
arch/x86/platform/efi/efi_64.c
drivers/firmware/efi/memattr.c
include/linux/efi.h