efi: arm64: Wire up BTI annotation in memory attributes table
authorArd Biesheuvel <ardb@kernel.org>
Wed, 1 Feb 2023 08:50:07 +0000 (09:50 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 9 Feb 2023 16:39:16 +0000 (17:39 +0100)
commit1d959312e2f23c8ee6ed9432a6fa4416b267477b
tree0793812274d2871abf8f544b09e39d321391995a
parentcf1d2ffcc6f17b422239f6ab34b078945d07f9aa
efi: arm64: Wire up BTI 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 BTI landing pads, permitting the OS to map these
regions with BTI restrictions enabled.

So let's take this into account on arm64.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/efi.c
arch/arm64/kernel/traps.c