summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-02-01 11:48:12 +0300
committerArd Biesheuvel <ardb@kernel.org>2023-02-04 11:19:02 +0300
commitcf1d2ffcc6f17b422239f6ab34b078945d07f9aa (patch)
treea42d8efe5cc90616ea052bbbe84dfaad91b9f5a1 /arch/riscv/kernel
parentb0048092f7d3921d56f2c5bfa32062fac5e7500b (diff)
downloadlinux-cf1d2ffcc6f17b422239f6ab34b078945d07f9aa.tar.xz
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>
Diffstat (limited to 'arch/riscv/kernel')
-rw-r--r--arch/riscv/kernel/efi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/kernel/efi.c b/arch/riscv/kernel/efi.c
index 1aa540350abd..aa6209a74c83 100644
--- a/arch/riscv/kernel/efi.c
+++ b/arch/riscv/kernel/efi.c
@@ -78,7 +78,8 @@ static int __init set_permissions(pte_t *ptep, unsigned long addr, void *data)
}
int __init efi_set_mapping_permissions(struct mm_struct *mm,
- efi_memory_desc_t *md)
+ efi_memory_desc_t *md,
+ bool ignored)
{
BUG_ON(md->type != EFI_RUNTIME_SERVICES_CODE &&
md->type != EFI_RUNTIME_SERVICES_DATA);