Skip to content

Commit 0061b6e

Browse files
peaktocreekakpm00
authored andcommitted
mseal sysmap: enable arm64
Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on arm64, covering the vdso, vvar, and compat-mode vectors and sigpage mappings. Production release testing passes on Android and Chrome OS. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jeff Xu <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Reviewed-by: Liam R. Howlett <[email protected]> Reviewed-by: Kees Cook <[email protected]> Cc: Adhemerval Zanella <[email protected]> Cc: Alexander Mikhalitsyn <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Andrei Vagin <[email protected]> Cc: Anna-Maria Behnsen <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Benjamin Berg <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Rientjes <[email protected]> Cc: David S. Miller <[email protected]> Cc: Elliot Hughes <[email protected]> Cc: Florian Faineli <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: Hyeonggon Yoo <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jann Horn <[email protected]> Cc: Jason A. Donenfeld <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Jorge Lucangeli Obes <[email protected]> Cc: Linus Waleij <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Matthew Wilcow (Oracle) <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Pedro Falcato <[email protected]> Cc: Peter Xu <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Stephen Röttger <[email protected]> Cc: Thomas Weißschuh <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3049def commit 0061b6e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ config ARM64
3838
select ARCH_HAS_KEEPINITRD
3939
select ARCH_HAS_MEMBARRIER_SYNC_CORE
4040
select ARCH_HAS_MEM_ENCRYPT
41+
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
4142
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
4243
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
4344
select ARCH_HAS_NONLEAF_PMD_YOUNG if ARM64_HAFT

arch/arm64/kernel/vdso.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ static int __setup_additional_pages(enum vdso_abi abi,
130130
mm->context.vdso = (void *)vdso_base;
131131
ret = _install_special_mapping(mm, vdso_base, vdso_text_len,
132132
VM_READ|VM_EXEC|gp_flags|
133-
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
133+
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
134+
VM_SEALED_SYSMAP,
134135
vdso_info[abi].cm);
135136
if (IS_ERR(ret))
136137
goto up_fail;
@@ -256,7 +257,8 @@ static int aarch32_kuser_helpers_setup(struct mm_struct *mm)
256257
*/
257258
ret = _install_special_mapping(mm, AARCH32_VECTORS_BASE, PAGE_SIZE,
258259
VM_READ | VM_EXEC |
259-
VM_MAYREAD | VM_MAYEXEC,
260+
VM_MAYREAD | VM_MAYEXEC |
261+
VM_SEALED_SYSMAP,
260262
&aarch32_vdso_maps[AA32_MAP_VECTORS]);
261263

262264
return PTR_ERR_OR_ZERO(ret);
@@ -279,7 +281,8 @@ static int aarch32_sigreturn_setup(struct mm_struct *mm)
279281
*/
280282
ret = _install_special_mapping(mm, addr, PAGE_SIZE,
281283
VM_READ | VM_EXEC | VM_MAYREAD |
282-
VM_MAYWRITE | VM_MAYEXEC,
284+
VM_MAYWRITE | VM_MAYEXEC |
285+
VM_SEALED_SYSMAP,
283286
&aarch32_vdso_maps[AA32_MAP_SIGPAGE]);
284287
if (IS_ERR(ret))
285288
goto out;

0 commit comments

Comments
 (0)