Skip to content

Commit 5d8b172

Browse files
brooniectmarinas
authored andcommitted
arm64: Add Kconfig for Guarded Control Stack (GCS)
Provide a Kconfig option allowing the user to select if GCS support is built into the kernel. Reviewed-by: Thiago Jung Bauermann <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 7ec3b57 commit 5d8b172

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

arch/arm64/Kconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,6 +2178,27 @@ config ARCH_PKEY_BITS
21782178

21792179
endmenu # "ARMv8.9 architectural features"
21802180

2181+
menu "v9.4 architectural features"
2182+
2183+
config ARM64_GCS
2184+
bool "Enable support for Guarded Control Stack (GCS)"
2185+
default y
2186+
select ARCH_HAS_USER_SHADOW_STACK
2187+
select ARCH_USES_HIGH_VMA_FLAGS
2188+
depends on !UPROBES
2189+
help
2190+
Guarded Control Stack (GCS) provides support for a separate
2191+
stack with restricted access which contains only return
2192+
addresses. This can be used to harden against some attacks
2193+
by comparing return address used by the program with what is
2194+
stored in the GCS, and may also be used to efficiently obtain
2195+
the call stack for applications such as profiling.
2196+
2197+
The feature is detected at runtime, and will remain disabled
2198+
if the system does not implement the feature.
2199+
2200+
endmenu # "v9.4 architectural features"
2201+
21812202
config ARM64_SVE
21822203
bool "ARM Scalable Vector Extension support"
21832204
default y

0 commit comments

Comments
 (0)