Re: Speed up KConfig - fix hashtable confusion
From: Nicolas Schier
Date: Mon Nov 02 2026 - 08:48:29 EST
On Mon, Nov 02, 2026 at 05:26:27AM -0500, Sasha Levin wrote:
> On Sun, Nov 01, 2026 at 12:08:15PM -0800, Linus Torvalds wrote:
> > The reason is that it's called just a lot, but it *really* doesn't
> > help that the scripting versions of the hashtable functions has not
> > understood the subtler issues of the hashing code that it took from
> > the kernel side, and in the process got things very very wrong.
>
> I'm not sure why we have a copy of include/linux/hashtable.h in
> scripts/, but it's silly that it has diverged slightly from what we do
> in-kernel, and now we're chasing bugs caused by that divergence.
>
> Can we instead align both back to be the same, or even use
> include/linux/hashtable.h directly from scripts/?
I think that matches Julian's proposal. For include/linux/hashtable.h,
it may be a good idea to use it directly from include/linux/, but in
general we should be careful when re-using kernel internal header files
for host tooling. I am afraid we may put a burden on changes on these
if we (mis)use them in a non-kernel context. But yes, we should
consider at least regular syncing in some way to prevent repeating
mistakes.
--
Nicolas