Skip to content

Commit

Permalink
mm: Define VM_SHADOW_STACK for arm64 when we support GCS
Browse files Browse the repository at this point in the history
Use VM_HIGH_ARCH_5 for guarded control stack pages.

Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-14-222b78d87eee@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Mark Brown authored and Catalin Marinas committed Oct 4, 2024

Unverified

No user is associated with the committer email.
1 parent 092055f commit ae80e16
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/filesystems/proc.rst
Original file line number Diff line number Diff line change
@@ -579,7 +579,7 @@ encoded manner. The codes are the following:
mt arm64 MTE allocation tags are enabled
um userfaultfd missing tracking
uw userfaultfd wr-protect tracking
ss shadow stack page
ss shadow/guarded control stack page
sl sealed
== =======================================

12 changes: 11 additions & 1 deletion include/linux/mm.h
Original file line number Diff line number Diff line change
@@ -367,7 +367,17 @@ extern unsigned int kobjsize(const void *objp);
* for more details on the guard size.
*/
# define VM_SHADOW_STACK VM_HIGH_ARCH_5
#else
#endif

#if defined(CONFIG_ARM64_GCS)
/*
* arm64's Guarded Control Stack implements similar functionality and
* has similar constraints to shadow stacks.
*/
# define VM_SHADOW_STACK VM_HIGH_ARCH_6
#endif

#ifndef VM_SHADOW_STACK
# define VM_SHADOW_STACK VM_NONE
#endif

0 comments on commit ae80e16

Please sign in to comment.