linux/tools/testing/selftests/vDSO
Thomas Weißschuh a22ee38d2e selftests/vDSO: Fix GNU hash table entry size for s390x
Commit 14be4e6f35 ("selftests: vDSO: fix ELF hash table entry size for s390x")
changed the type of the ELF hash table entries to 64bit on s390x.
However the *GNU* hash tables entries are always 32bit.
The "bucket" pointer is shared between both hash algorithms.
On s390, this caused the GNU hash algorithm to access its 32-bit entries as if they
were 64-bit, triggering compiler warnings (assignment between "Elf64_Xword *" and
"Elf64_Word *") and runtime crashes.

Introduce a new dedicated "gnu_bucket" pointer which is used by the GNU hash.

Fixes: e0746bde6f ("selftests/vDSO: support DT_GNU_HASH")
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250217-selftests-vdso-s390-gnu-hash-v2-1-f6c2532ffe2a@linutronix.de
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2025-03-04 17:15:18 +01:00
..
.gitignore selftests/vDSO: add tests for vgetrandom 2024-07-19 20:22:12 +02:00
Makefile selftests: vDSO: unconditionally build getrandom test 2024-10-08 15:21:36 -06:00
parse_vdso.c selftests/vDSO: Fix GNU hash table entry size for s390x 2025-03-04 17:15:18 +01:00
parse_vdso.h selftests: vdso: Use a header file to prototype parse_vdso API 2020-05-22 11:04:10 -06:00
vdso_call.h selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_config.h selftests: vDSO: fix vdso_config for s390 2024-09-13 17:28:36 +02:00
vdso_standalone_test_x86.c selftests: vDSO: align stack for O2-optimized memcpy 2024-09-27 12:17:12 -06:00
vdso_test_abi.c selftests: vDSO: use parse_vdso.h in vdso_test_abi 2024-08-30 15:48:45 +02:00
vdso_test_chacha.c selftests: vDSO: improve getrandom and chacha error messages 2024-10-08 15:21:52 -06:00
vdso_test_clock_getres.c kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined 2023-06-12 16:39:10 -06:00
vdso_test_correctness.c selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_test_getcpu.c selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_test_getrandom.c selftests: vDSO: Explicitly include sched.h 2024-10-08 15:48:09 -06:00
vdso_test_gettimeofday.c selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vgetrandom-chacha.S selftests: vDSO: unconditionally build chacha test 2024-10-08 15:21:29 -06:00