[PATCH v2 0/5] mm: arch/shstk: Common shadow stack mapping helper and VM_NOHUGEPAGE

Catalin Marinas catalin.marinas at arm.com
Wed Feb 25 08:13:57 PST 2026


This is v2 of the series extracting the common shadow stack mmap into a
separate helper for arm64, riscv and x86. Thanks for the review.

Andrew, if you are happy with this, I think taking the patches through
the mm tree makes most sense.

Minor changes since v1:

- Removed #ifdef from the helper function declaration
- Used two tabs for the alignment of multi-line function arguments
- Added "There is no functional change" to the arch patches log
- Collected ack/review/test tags

v1:

https://lore.kernel.org/r/20260224175800.2500729-1-catalin.marinas@arm.com

Catalin Marinas (5):
  mm: Introduce vm_mmap_shadow_stack() as a helper for VM_SHADOW_STACK
    mappings
  arm64: gcs: Use the new common vm_mmap_shadow_stack() helper
  riscv: shstk: Use the new common vm_mmap_shadow_stack() helper
  x86: shstk: Use the new common vm_mmap_shadow_stack() helper
  mm: Do not map the shadow stack as THP

 arch/arm64/mm/gcs.c         | 14 +-------------
 arch/riscv/kernel/usercfi.c | 12 +-----------
 arch/x86/kernel/shstk.c     | 12 ++----------
 include/linux/mm.h          |  2 ++
 mm/util.c                   | 29 +++++++++++++++++++++++++++++
 5 files changed, 35 insertions(+), 34 deletions(-)




More information about the linux-arm-kernel mailing list