Skip to content

Commit a869b8c

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: enable mseal sysmap for RV64
Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS for RV64, covering the vdso, vvar. Passed sysmap_is_sealed and mseal_test self tests. Passed booting a buildroot rootfs image and a cli debian rootfs image. Signed-off-by: Jisheng Zhang <[email protected]> Cc: Jeff Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Alexandre Ghiti <[email protected]> Signed-off-by: Alexandre Ghiti <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 6093faa commit a869b8c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ config RISCV
7070
# LLD >= 14: https://github.com/llvm/llvm-project/issues/50505
7171
select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
7272
select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
73+
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU
7374
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
7475
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
7576
select ARCH_SUPPORTS_RT

arch/riscv/kernel/vdso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int __setup_additional_pages(struct mm_struct *mm,
136136

137137
ret =
138138
_install_special_mapping(mm, vdso_base, vdso_text_len,
139-
(VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC),
139+
(VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | VM_SEALED_SYSMAP),
140140
vdso_info->cm);
141141

142142
if (IS_ERR(ret))

0 commit comments

Comments
 (0)