From a3fcb14f5673f8127fbb40ce430bb9d1ff61db35 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 1 Sep 2026 18:27:06 +0100 Subject: [PATCH] kselftest/arm64: Extend gcs-locking to cover cases where enable is unlocked The gcs-locking test case currently only covers locking combinations of the various flags that can be set for GCS (enable, write and push) where enable is included in the locked bits. Since it is valid to only lock a combination of write and push while leaving enable user controllable we should also cover those cases, add coverage for them. The new cases pass as expected. Signed-off-by: Mark Brown Signed-off-by: Catalin Marinas --- tools/testing/selftests/arm64/gcs/gcs-locking.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/arm64/gcs/gcs-locking.c b/tools/testing/selftests/arm64/gcs/gcs-locking.c index 1e6abb136ffd..4dd7ab4191f1 100644 --- a/tools/testing/selftests/arm64/gcs/gcs-locking.c +++ b/tools/testing/selftests/arm64/gcs/gcs-locking.c @@ -77,6 +77,21 @@ FIXTURE_VARIANT_ADD(valid_modes, enable_write_push) PR_SHADOW_STACK_PUSH, }; +FIXTURE_VARIANT_ADD(valid_modes, write) +{ + .mode = PR_SHADOW_STACK_WRITE, +}; + +FIXTURE_VARIANT_ADD(valid_modes, push) +{ + .mode = PR_SHADOW_STACK_PUSH, +}; + +FIXTURE_VARIANT_ADD(valid_modes, write_push) +{ + .mode = PR_SHADOW_STACK_WRITE | PR_SHADOW_STACK_PUSH, +}; + FIXTURE_SETUP(valid_modes) { } -- knotmirror 0.0.1