Re: [PATCH v2 00/21] kbuild: significantly speed up kernel builds

From: Arnd Bergmann

Date: Tue Sep 15 2026 - 05:52:22 EST


On Mon, Sep 14, 2026, at 17:53, Linus Torvalds wrote:
> On Mon, 14 Sept 2026 at 08:41, Kees Cook <kees@xxxxxxxxxx> wrote:
>>
>> One area I think might solved via an LLM is the 3-pass kallsyms stuff.
>> If we could get a deterministic kallsyms build in 1 pass, that would be
>> very nice. A lot of people have tried, but it has eluded upstreaming.
>
> Even the three-pass one hasn't apparently always been entirely
> deterministic. We've had random reports over the years of it failing
> in some circumstances.

This tends to break whenever a linker (rather than the compiler) starts
creating a new type of symbols that show up in pass 2.

> Maybe we've fixed it all, or maybe the failures just go imperceptibly
> rare. Regardless, it has definitely been fragile.

The rate seems to be once every few years, looking at the list
of exceptions added to scripts/kallsyms.c (now scripts/mksysmap):

efe6e3068067 ("kallsyms: fix nonconverging kallsyms table with lld")
516d980f8541 ("scripts/kallsyms: skip ppc compiler stub *.long_branch.* / *.plt_branch.*")
b9b74be163a2 ("ARM: 8555/1: kallsyms: ignore ARM mode switching veneers")

I'm sure there are other instances on architectures that get less
build coverage.

Arnd