Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mseal sysmap: generic vdso vvar mapping

With the introduction of the generic vdso data storage the VM_SEALED_SYSMAP
vm flag must be moved from the architecture specific
_install_special_mapping() call [1] [2] which maps the vvar mapping to
generic code.

[1] https://lkml.kernel.org/r/20250305021711.3867874-4-jeffxu@google.com
[2] https://lkml.kernel.org/r/20250305021711.3867874-5-jeffxu@google.com

Link: https://lkml.kernel.org/r/20250311123326.2686682-2-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Heiko Carstens and committed by
Andrew Morton
1d6fad7b 7b0141da

+2 -1
+2 -1
lib/vdso/datastore.c
··· 99 99 struct vm_area_struct *vdso_install_vvar_mapping(struct mm_struct *mm, unsigned long addr) 100 100 { 101 101 return _install_special_mapping(mm, addr, VDSO_NR_PAGES * PAGE_SIZE, 102 - VM_READ | VM_MAYREAD | VM_IO | VM_DONTDUMP | VM_PFNMAP, 102 + VM_READ | VM_MAYREAD | VM_IO | VM_DONTDUMP | 103 + VM_PFNMAP | VM_SEALED_SYSMAP, 103 104 &vdso_vvar_mapping); 104 105 } 105 106