From: Herbert Xu <herbert@gondor.apana.org.au>
To: Usama Arif <usama.arif@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
justinstitt@google.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
morbo@google.com, nathan@kernel.org, ndesaulniers@google.com,
Thomas Graf <tgraf@suug.ch>,
nickolay.lysenko@gmail.com, peterz@infradead.org,
rostedt@goodmis.org, sched-ext@lists.linux.dev, tj@kernel.org,
yatsenko@meta.com
Subject: Re: [PATCH] rhashtable: specialize default comparison for constant parameters
Date: Sat, 26 Sep 2026 09:48:36 +1000 [thread overview]
Message-ID: <arcIVDhPR4TD4VFF@gondor.apana.org.au> (raw)
In-Reply-To: <840c4c37-99a5-44dd-8b33-67057ee23731@linux.dev>
On Fri, Sep 25, 2026 at 10:37:55AM +0100, Usama Arif wrote:
>
> That holds for the params given to rhashtable_init(), but not for the
> params passed to the fast-path helpers. The BPF resizable hashmap
> passes a constant template with no key_len and no obj_cmpfn
> (rhtab_params in kernel/bpf/hashtab.c), and sets key_len only in the
> copy it gives to rhashtable_init(). Without the "?: ht->p.key_len",
> its lookups would memcmp() zero bytes and return the first object in
> the bucket. rht_key_get_hash() has the same fallback for this user,
> see c9429bf56405a. (I added Mykyta the author of that patch in CC.)
That's quite an eyesore but I guess we're stuck with it for now.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2026-09-26 0:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 18:47 [PATCH] rhashtable: specialize default comparison for constant parameters Usama Arif
2026-09-24 19:21 ` Tejun Heo
2026-09-24 21:14 ` David Laight
2026-09-25 9:32 ` Usama Arif
2026-09-25 0:04 ` Herbert Xu
2026-09-25 9:37 ` Usama Arif
2026-09-25 23:48 ` Herbert Xu [this message]
2026-10-02 10:13 ` Herbert Xu
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=arcIVDhPR4TD4VFF@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=akpm@linux-foundation.org \
--cc=justinstitt@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nickolay.lysenko@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=tgraf@suug.ch \
--cc=tj@kernel.org \
--cc=usama.arif@linux.dev \
--cc=yatsenko@meta.com \
/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.