]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kselftest/arm64: Add test coverage for GCS mode locking
authorMark Brown <broonie@kernel.org>
Tue, 1 Oct 2024 22:59:15 +0000 (23:59 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Oct 2024 11:04:45 +0000 (12:04 +0100)
commit58d69a3e35825698b5daddc1a074e9ea19cb0c51
tree175bdb69b0e8638267ded1385e4f14461eb6fe27
parenta505a52b4e292f5e031a01eb3d4e203eb18acb7d
kselftest/arm64: Add test coverage for GCS mode locking

Verify that we can lock individual GCS mode bits, that other modes
aren't affected and as a side effect also that every combination of
modes can be enabled.

Normally the inability to reenable GCS after disabling it would be an
issue with testing but fortunately the kselftest_harness runs each test
within a fork()ed child.  This can be inconvenient for some kinds of
testing but here it means that each test is in a separate thread and
therefore won't be affected by other tests in the suite.

Once we get toolchains with support for enabling GCS by default we will
need to take care to not do that in the build system but there are no
such toolchains yet so it is not yet an issue.

Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-36-222b78d87eee@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/gcs/.gitignore
tools/testing/selftests/arm64/gcs/Makefile
tools/testing/selftests/arm64/gcs/gcs-locking.c [new file with mode: 0644]