Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250822140550.GG1827@brightrain.aerifal.cx>
Date: Fri, 22 Aug 2025 10:05:50 -0400
From: Rich Felker <dalias@...c.org>
To: tombo <hulata@...art.tech>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH v2] vdso: add support for GNU hash tables

On Fri, Aug 22, 2025 at 01:57:32PM +0200, tombo wrote:
> The previous submission had formatting issues, sorry.
> 
> On some kernels (e.g. AWS Ubuntu's Graviton official AMIs) the arm64 vDSO
> exports symbols with DT_GNU_HASH but omits DT_HASH.  musl's
> __vdsosym resolver only understands SysV hash, so vDSO symbols
> fail to resolve and clock_gettime falls back to syscalls.
> 
> This patch adds a minimal GNU hash lookup implementation to
> __vdsosym, fixing vDSO usage on affected systems.

One immediate comment I have: it's not minimal. This is code that
needs to be linked into every single (static linked) program, and
that's searching for at most a couple symbols in a symbol table that
has at most 10 or so symbols in it. There's no need to waste space on
checking a bloom filter. Simply go straight to gnu_lookup without the
gnu_lookup_filtered wrapper, which is taking up space and not
providing anything of value.

Also, it looks like for the sysv hash table we skipped the hash
entirely and just did a linear search over the hash table. This should
be possible with the gnu hash table too, and doing that should allow
folding all of the code into just one copy of the logic rather than
duplicating it in two codepaths.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.