public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-kbuild@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH 0/4] x86/build: Get rid of vmlinux postlink step
Date: Sun, 9 Mar 2025 10:48:32 +0100	[thread overview]
Message-ID: <Z81j8EguDyz_uesu@gmail.com> (raw)
In-Reply-To: <CAMj1kXHCia-gQy7fkVC5SgMyFqz6rRgpVbz6_W7e9jk7ENaQxA@mail.gmail.com>


* Ard Biesheuvel <ardb@kernel.org> wrote:

> On Sat, 8 Mar 2025 at 17:17, Masahiro Yamada <masahiroy@kernel.org> 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

  reply	other threads:[~2025-03-09  9:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 13:21 [RFC PATCH 0/4] x86/build: Get rid of vmlinux postlink step Ard Biesheuvel
2025-02-24 13:21 ` [RFC PATCH 1/4] Kbuild/link-vmlinux.sh: Make output file name configurable Ard Biesheuvel
2025-02-24 13:21 ` [RFC PATCH 2/4] Kbuild: Introduce Kconfig symbol for linking vmlinux with relocations Ard Biesheuvel
2025-03-07 18:58   ` Masahiro Yamada
2025-02-24 13:21 ` [RFC PATCH 3/4] Kbuild: Create intermediate vmlinux build with relocations preserved Ard Biesheuvel
2025-03-07 19:04   ` Masahiro Yamada
2025-02-24 13:21 ` [RFC PATCH 4/4] x86: Get rid of Makefile.postlink Ard Biesheuvel
2025-02-24 18:51 ` [RFC PATCH 0/4] x86/build: Get rid of vmlinux postlink step Ingo Molnar
2025-02-24 19:59   ` Linus Torvalds
2025-02-24 21:25     ` Ard Biesheuvel
2025-02-24 21:28   ` Ard Biesheuvel
2025-03-06 16:47 ` Ard Biesheuvel
2025-03-07 18:54   ` Masahiro Yamada
2025-03-08 10:49     ` Ard Biesheuvel
2025-03-08 16:17       ` Masahiro Yamada
2025-03-08 22:42         ` Ard Biesheuvel
2025-03-09  9:48           ` Ingo Molnar [this message]
2025-03-11  2:38             ` Masahiro Yamada
2025-03-11  6:40               ` Ard Biesheuvel
2025-03-11  9:52                 ` Masahiro Yamada
2025-03-11 16:00                 ` Petr Pavlu
2025-03-13 10:31                 ` Masahiro Yamada

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=Z81j8EguDyz_uesu@gmail.com \
    --to=mingo@kernel.org \
    --cc=ardb@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox