All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: "Shuah Khan" <shuah@kernel.org>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Fangrui Song <i@maskray.me>, Xi Ruoyao <xry111@xry111.site>,
	Heiko Carstens <hca@linux.ibm.com>,
	Jens Remus <jremus@linux.ibm.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] selftests/vDSO: fix GNU hash table entry size for s390x
Date: Tue, 18 Feb 2025 00:52:26 +0100	[thread overview]
Message-ID: <your-ad-here.call-01739836346-ext-7522@work.hours> (raw)
In-Reply-To: <20250217-selftests-vdso-s390-gnu-hash-v2-1-f6c2532ffe2a@linutronix.de>

On Mon, Feb 17, 2025 at 02:04:18PM +0100, 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 pointer to a
> 64bit value as a pointer to a 32bit value, leading to compiler warnings and
> runtime crashes.

I would rephrase it as follows:

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.

And take it via s390 tree.

Shuah, if you don't mind, may I get your Acked-by?

Thank you!

> Introduce a new dedicated "gnu_bucket" pointer which is used by the GNU hash.
> 
> Fixes: e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH")
> Reviewed-by: Jens Remus <jremus@linux.ibm.com>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> Changes in v2:
> - Fix wording around the width of pointers vs the pointed-to values
> - Link to v1: https://lore.kernel.org/r/20250213-selftests-vdso-s390-gnu-hash-v1-1-ace3bcc940a3@linutronix.de
> ---
>  tools/testing/selftests/vDSO/parse_vdso.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

  reply	other threads:[~2025-02-17 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 13:04 [PATCH v2] selftests/vDSO: fix GNU hash table entry size for s390x Thomas Weißschuh
2025-02-17 23:52 ` Vasily Gorbik [this message]
2025-02-26 19:37   ` Vasily Gorbik
2025-02-26 21:14     ` Shuah Khan

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=your-ad-here.call-01739836346-ext-7522@work.hours \
    --to=gor@linux.ibm.com \
    --cc=Jason@zx2c4.com \
    --cc=hca@linux.ibm.com \
    --cc=i@maskray.me \
    --cc=jremus@linux.ibm.com \
    --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.