Re: [PATCH 2/2] kallsyms: Optimise symbol name search
From: David Laight
Date: Thu Oct 01 2026 - 04:25:55 EST
On Thu, 1 Oct 2026 00:45:19 +0000 (UTC)
bot+bpf-ci@xxxxxxxxxx wrote:
> > kallsyms: Optimise symbol name search
>
> TL;DR:
> - kallsyms 24-bit table struct may be padded to 4 bytes on ARM OABI, giving
> wrong offsets and a possible out-of-bounds read
I hate ARM OABI :-)
I think it is the only architecture Linus still supports that aligns
structures on 32bit boundaries.
> - weak table symbols may not read as NULL on relocatable x86-32, so the wrong
> table may be chosen
I'm not entirely happy with that bit of the code.
There is a conditional in every table index.
It is crying out for either a static branch or just compiling the file
(or selecting between two object files) once the symbol table size is known.
Either removes the need for weak symbols.
Anyone know if there is 'prior art' for a late compilation?
David