[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <008b57f5-96d3-4aca-b304-19ced4fa1efd@linux.ibm.com>
Date: Thu, 13 Feb 2025 13:47:26 +0100
From: Jens Remus <jremus@...ux.ibm.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Shuah Khan <shuah@...nel.org>, Fangrui Song <i@...kray.me>,
Xi Ruoyao <xry111@...111.site>
Cc: Shuah Khan <skhan@...uxfoundation.org>,
Heiko Carstens
<hca@...ux.ibm.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/vDSO: fix GNU hash table entry size for s390x
On 13.02.2025 10:41, Thomas Weißschuh wrote:
> Commit 14be4e6f3522 ("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 s390x the GNU algorithm assigns and dereferences this 64bit pointer as a
> 32bit pointer, leading to compiler warnings and runtime crashes.
Nit: The compiler complains about assignments between incompatible pointer
types (e.g. "Elf64_Xword *" and "Elf64_Word *"). The size of the pointers
themselves is not different, as it is usually defined by the architecture
regardless of the type of data pointed at. The real issue is that the
32-bit GNU hash entries are erroneously accessed as if they were 64-bit
entries via "bucket" on s390x.
> Introduce a new dedicated "gnu_bucket" pointer which is used by the GNU hash.
>
> Fixes: e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
> tools/testing/selftests/vDSO/parse_vdso.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Jens Remus <jremus@...ux.ibm.com>
Thanks for taking care!
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@...ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
Powered by blists - more mailing lists