Re: [RFC PATCH 0/4] x86/build: Get rid of vmlinux postlink step
From: Ingo Molnar
Date: Sun Mar 09 2025 - 05:48:47 EST
* Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> On Sat, 8 Mar 2025 at 17:17, Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> ...
> > I do not think it is broken.
> > As I mentioned above, I regard vmlinux.relocs as a byproduct
> > of the atomic build rule of vmlinux. This works.
Except when it doesn't work, such as when an intermediate linking step
fails, and intermediate build products are lost and cannot be recreated
easily (or at all without modifying the source)?
And the thing is, there should be no such thing as an 'atomic build
rule of vmlinux' if it means lost information when the build is broken
at an intermediate step. What purpose does it have?
> There is no make rule for vmlinux.relocs, and so
>
> - if it gets deleted, it cannot be rebuilt and even though the build
> does not break, the relocation data is missing from the compressed
> image, and this could potentially break the kaslr startup code,
> - it vmlinux.relocs is older than vmlinux for some reason, make will
> not notice and silently reuse the outdated version,
> - when creating vmlinux.relocs from vmlinux and an error occurs,
> vmlinux is deleted, making it difficult to diagnose the problem.
>
> I think this is badly broken, but if you think this is all working as
> it should, I am not going to debate this further, and you can consider
> the patch series withdrawn.
That's very sad, as both the simplification is substantial:
19 files changed, 52 insertions(+), 87 deletions(-)
and the increase in debuggability is substantial as well.
Thanks,
Ingo