From: Jens Remus <jremus@linux.ibm.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Shuah Khan" <shuah@kernel.org>, "Fangrui Song" <i@maskray.me>,
"Xi Ruoyao" <xry111@xry111.site>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
Heiko Carstens <hca@linux.ibm.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/vDSO: fix GNU hash table entry size for s390x
Date: Thu, 13 Feb 2025 13:47:26 +0100 [thread overview]
Message-ID: <008b57f5-96d3-4aca-b304-19ced4fa1efd@linux.ibm.com> (raw)
In-Reply-To: <20250213-selftests-vdso-s390-gnu-hash-v1-1-ace3bcc940a3@linutronix.de>
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@linutronix.de>
> ---
> tools/testing/selftests/vDSO/parse_vdso.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Thanks for taking care!
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.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/
next prev parent reply other threads:[~2025-02-13 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 9:41 [PATCH] selftests/vDSO: fix GNU hash table entry size for s390x Thomas Weißschuh
2025-02-13 12:47 ` Jens Remus [this message]
2025-02-13 14:05 ` Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=008b57f5-96d3-4aca-b304-19ced4fa1efd@linux.ibm.com \
--to=jremus@linux.ibm.com \
--cc=Jason@zx2c4.com \
--cc=hca@linux.ibm.com \
--cc=i@maskray.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=xry111@xry111.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.