linux/tools/testing/selftests/arm64/mte
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
..
.gitignore kselftest/arm64: Add missing file in .gitignore 2026-01-26 14:29:06 +00:00
check_buffer_fill.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
check_child_memory.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
check_gcr_el1_cswitch.c kselftest/arm64: Fix size of thread_data values for pthread_join() 2026-09-11 12:48:02 +00:00
check_hugetlb_options.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
check_ksm_options.c selftests/arm64: Treat KSM merge_across_nodes as optional 2026-08-27 14:18:39 +00:00
check_mmap_options.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
check_prctl.c selftests/arm64: Fix MTE prctl TAP plan 2026-08-27 14:18:39 +00:00
check_tags_inclusion.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
check_user_mem.c selftests/arm64: Print missing MTE TAP headers 2026-08-27 14:18:39 +00:00
Makefile kselftest/arm64: Remove spurious comment from MTE test Makefile 2023-01-20 14:30:46 +00:00
mte_common_util.c kselftest/arm64/mte: Preparation for mte store only test 2025-07-02 18:50:53 +01:00
mte_common_util.h kselftest/arm64/mte: Preparation for mte store only test 2025-07-02 18:50:53 +01:00
mte_def.h kselftest/arm64/mte: Add address tag related macro and function 2025-07-02 17:55:20 +01:00
mte_helper.S kselftest/arm64: Don't enable v8.5 for MTE selftest builds 2022-09-29 17:34:40 +01:00