diff options
author | 2024-10-01 23:58:53 +0100 | |
---|---|---|
committer | 2024-10-04 12:04:36 +0100 | |
commit | ae80e1629aeaf5be726a9ea94eb7345b1a44b00d (patch) | |
tree | de3e0d1a1206cdcbe7c97e69cfc8101b0651ef45 /include/linux/mm.h | |
parent | arm64/mm: Allocate PIE slots for EL0 guarded control stack (diff) | |
download | wireguard-linux-ae80e1629aeaf5be726a9ea94eb7345b1a44b00d.tar.xz wireguard-linux-ae80e1629aeaf5be726a9ea94eb7345b1a44b00d.zip |
mm: Define VM_SHADOW_STACK for arm64 when we support GCS
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>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 56654306a832..8852c39c7695 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -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 |