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/20250305021711.3867874-5-jeffxu@google.com Signed-off-by: Jeff Xu <jeffxu@chromium.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Kees Cook <kees@kernel.org> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org> Cc: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrei Vagin <avagin@gmail.com> Cc: Anna-Maria Behnsen <anna-maria@linutronix.de> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Benjamin Berg <benjamin@sipsolutions.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: David Rientjes <rientjes@google.com> Cc: David S. Miller <davem@davemloft.net> Cc: Elliot Hughes <enh@google.com> Cc: Florian Faineli <f.fainelli@gmail.com> Cc: Greg Ungerer <gerg@kernel.org> Cc: Guenter Roeck <groeck@chromium.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jann Horn <jannh@google.com> Cc: Jason A. Donenfeld <jason@zx2c4.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Jorge Lucangeli Obes <jorgelo@chromium.org> Cc: Linus Waleij <linus.walleij@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Matthew Wilcow (Oracle) <willy@infradead.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Hocko <mhocko@suse.com> Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Mike Rapoport <mike.rapoport@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Cc: Peter Xu <peterx@redhat.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Stephen Röttger <sroettger@google.com> Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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)