Skip to content

Commit b37981c

Browse files
Avenger-285714chenhuacai
authored andcommitted
LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on LoongArch, covering the vdso. Link: https://lore.kernel.org/all/25bad37f-273e-4626-999c-e1890be96182@lucifer.local/ Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com> Acked-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Jeff Xu <jeffxu@chromium.org> Tested-by: Yuli Wang <wangyuli@uniontech.com> Signed-off-by: Yuli Wang <wangyuli@uniontech.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 93f4373 commit b37981c

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Documentation/features/core/mseal_sys_mappings/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| arm64: | ok |
1313
| csky: | N/A |
1414
| hexagon: | N/A |
15-
| loongarch: | TODO |
15+
| loongarch: | ok |
1616
| m68k: | N/A |
1717
| microblaze: | N/A |
1818
| mips: | TODO |

Documentation/userspace-api/mseal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Use cases
144144
architecture.
145145

146146
The following architectures currently support this feature: x86-64, arm64,
147-
and s390.
147+
loongarch and s390.
148148

149149
WARNING: This feature breaks programs which rely on relocating
150150
or unmapping system mappings. Known broken software at the time

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ config LOONGARCH
6969
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
7070
select ARCH_SUPPORTS_LTO_CLANG
7171
select ARCH_SUPPORTS_LTO_CLANG_THIN
72+
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
7273
select ARCH_SUPPORTS_NUMA_BALANCING
7374
select ARCH_SUPPORTS_RT
7475
select ARCH_USE_BUILTIN_BSWAP

arch/loongarch/kernel/vdso.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
105105

106106
vdso_addr = data_addr + VVAR_SIZE;
107107
vma = _install_special_mapping(mm, vdso_addr, info->size,
108-
VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
108+
VM_READ | VM_EXEC |
109+
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC |
110+
VM_SEALED_SYSMAP,
109111
&info->code_mapping);
110112
if (IS_ERR(vma)) {
111113
ret = PTR_ERR(vma);

0 commit comments

Comments
 (0)