mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	 Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Bill Roberts <bill.roberts@foss.arm.com>,
	 linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH] kselftest/arm64: Extend gcs-locking to cover cases where enable is unlocked
Date: Tue, 01 Sep 2026 18:27:06 +0100	[thread overview]
Message-ID: <20260901-arm64-test-gcs-locking-no-enable-v1-1-8335dacb1587@kernel.org> (raw)

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 <broonie@kernel.org>
---
 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)
 {
 }

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260826-arm64-test-gcs-locking-no-enable-c291cdcdf083

Best regards,
--  
Mark Brown <broonie@kernel.org>


             reply	other threads:[~2026-09-01 17:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:27 Mark Brown [this message]
2026-10-06 22:56 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260901-arm64-test-gcs-locking-no-enable-v1-1-8335dacb1587@kernel.org \
    --to=broonie@kernel.org \
    --cc=bill.roberts@foss.arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®