linux/tools/testing/selftests/arm64
Thomas Huth 3d1ba5cbfb kselftest/arm64: Fix size of thread_data values for pthread_join()
pthread_join() stores the thread's return value (a "void *", i.e.
8 bytes on 64 bit computers) into the address that is passed as second
parameter. However, the entries of thread_data are only normal "int"s,
i.e. only 4 bytes. The additional 4 bytes of the return value clobber
whatever is adjacent on the stack, i.e. other members of the thread_data
array (which will be re-written in the next iteration of the for-loop,
so that nobody noticed this problem), or another other local variable
on the stack for the last iteration. Use "intptr_t" to declare the
thread_data array entries with the correct size.

Fixes: 29f0808816 ("kselftest/arm64: check GCR_EL1 after context switch")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Will Deacon <will@kernel.org>
2026-09-11 12:48:02 +00:00
..
abi kselftest/arm64: Fix abi test compilation errors 2026-08-06 13:13:00 +00:00
bti kselftest/arm64: Remove extra blank line 2025-09-08 16:01:21 +01:00
fp kselftest/arm64: Don't write to P0 in irritator on SME only systems 2026-08-02 09:54:35 +00:00
gcs selftests/arm64: fix spelling errors in comments 2026-07-02 11:44:43 +01:00
mte kselftest/arm64: Fix size of thread_data values for pthread_join() 2026-09-11 12:48:02 +00:00
pauth selftests/arm64: fix spelling errors in comments 2026-07-02 11:44:43 +01:00
signal kselftest/arm64: Add tests for POR_EL0 save/reset/restore 2026-05-19 11:54:03 +01:00
tags selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
config selftests/arm64: Add MTE test config fragment 2026-08-27 14:18:39 +00:00
Makefile kselftest/arm64: Support FORCE_TARGETS 2026-01-05 21:16:46 +00:00
README kselftest: arm64: extend toplevel skeleton Makefile 2019-11-08 11:10:30 +00:00

KSelfTest ARM64
===============

- These tests are arm64 specific and so not built or run but just skipped
  completely when env-variable ARCH is found to be different than 'arm64'
  and `uname -m` reports other than 'aarch64'.

- Holding true the above, ARM64 KSFT tests can be run within the KSelfTest
  framework using standard Linux top-level-makefile targets:

      $ make TARGETS=arm64 kselftest-clean
      $ make TARGETS=arm64 kselftest

      or

      $ make -C tools/testing/selftests TARGETS=arm64 \
		INSTALL_PATH=<your-installation-path> install

      or, alternatively, only specific arm64/ subtargets can be picked:

      $ make -C tools/testing/selftests TARGETS=arm64 ARM64_SUBTARGETS="tags signal" \
		INSTALL_PATH=<your-installation-path> install

   Further details on building and running KFST can be found in:
     Documentation/dev-tools/kselftest.rst