Commit bb9ae1a6 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas
Browse files

kselftest/arm64: Enable GCS for the FP stress tests



While it's a bit off topic for them the floating point stress tests do give
us some coverage of context thrashing cases, and also of active signal
delivery separate to the relatively complicated framework in the actual
signals tests. Have the tests enable GCS on startup, ignoring failures so
they continue to work as before on systems without GCS.

Reviewed-by: default avatarThiago Jung Bauermann <thiago.bauermann@linaro.org>
Tested-by: default avatarThiago Jung Bauermann <thiago.bauermann@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-39-222b78d87eee@kernel.org


Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 05e6cfff
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -65,4 +65,19 @@ endfunction
	bl	puts
.endm

#define PR_SET_SHADOW_STACK_STATUS      75
# define PR_SHADOW_STACK_ENABLE         (1UL << 0)

.macro enable_gcs
	// Run with GCS
	mov	x0, PR_SET_SHADOW_STACK_STATUS
	mov	x1, PR_SHADOW_STACK_ENABLE
	mov	x2, xzr
	mov	x3, xzr
	mov	x4, xzr
	mov	x5, xzr
	mov	x8, #__NR_prctl
	svc	#0
.endm

#endif /* ! ASSEMBLER_H */
+2 −0
Original line number Diff line number Diff line
@@ -215,6 +215,8 @@ endfunction
// Main program entry point
.globl _start
function _start
	enable_gcs

	mov	x23, #0		// signal count

	mov	w0, #SIGINT
+2 −0
Original line number Diff line number Diff line
@@ -378,6 +378,8 @@ endfunction
// Main program entry point
.globl _start
function _start
	enable_gcs

	mov	x23, #0		// Irritation signal count

	mov	w0, #SIGINT
+2 −0
Original line number Diff line number Diff line
@@ -231,6 +231,8 @@ endfunction
// Main program entry point
.globl _start
function _start
	enable_gcs

	mov	x23, #0		// signal count

	mov	w0, #SIGINT
+2 −0
Original line number Diff line number Diff line
@@ -200,6 +200,8 @@ endfunction
// Main program entry point
.globl _start
function _start
	enable_gcs

	mov	x23, #0		// signal count

	mov	w0, #SIGINT