public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Naman Jain <namjain@linux.microsoft.com>
To: "Nathan Chancellor" <nathan@kernel.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Nicolas Schier <nsc@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>,
	Tamir Duberstein <tamird@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>, Kees Cook <kees@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Saurabh Singh Sengar <ssengar@linux.microsoft.com>
Subject: Re: [RFC PATCH] kbuild: Make --build-id linker flag configurable
Date: Tue, 3 Feb 2026 11:58:51 +0530	[thread overview]
Message-ID: <cd0e4ca5-542c-42db-bd7c-c63f5df85fc5@linux.microsoft.com> (raw)
In-Reply-To: <20260202231508.GB2319189@ax162>



On 2/3/2026 4:45 AM, Nathan Chancellor wrote:
> On Mon, Feb 02, 2026 at 03:15:30PM +0100, Thomas Weißschuh wrote:
>> On Mon, Feb 02, 2026 at 11:06:31AM +0000, Naman Jain wrote:
>>> I am trying to implement reproducible builds for one of my product
>>> kernel. I referred https://reproducible-builds.org/docs/build-path/
>>> and tried to use both -fdebug-prefix-map=OLD=NEW and
>>> -fmacro-prefix-map=OLD=NEW, but still could not achieve bit by bit
>>> binary reproducibility without overwriting build-id to none.
>>> If I move the kernel to same path in other setup, I was able to create
>>> same binary hash, however, without it, there is some difference in
>>> build-id hash values.
>>
>> Can you force the same build path during package building?
>> That should avoid this issue.
> 
> Yeah, I think that it would be better to document this in
> Documentation/kbuild/reproducible-builds.rst, as opposed to adding a
> hack to disable the build ID altogether. It seems easy enough to make
> the paths consistent between machines and environments by using a
> container or such. The new scripts/container in -next could help there.
> 
> Cheers,
> Nathan

Thank you Nathan for your inputs.

I'll plan to ensure same path for my kernel build, and send a patch to 
add this in reproducible builds documentation.

--- a/Documentation/kbuild/reproducible-builds.rst
+++ b/Documentation/kbuild/reproducible-builds.rst
@@ -58,6 +58,9 @@ to an absolute filename in an out-of-tree build. 
Kbuild automatically
  uses the ``-fmacro-prefix-map`` option to prevent this, if it is
  supported.

+If it still does not work, ensure that the kernel is built in the same
+directory, using containers or such.
+
  The Reproducible Builds web site has more information about these
  `prefix-map options`_.



Regards,
Naman


  reply	other threads:[~2026-02-03  6:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 11:06 [RFC PATCH] kbuild: Make --build-id linker flag configurable Naman Jain
2026-02-02 14:15 ` Thomas Weißschuh
2026-02-02 23:15   ` Nathan Chancellor
2026-02-03  6:28     ` Naman Jain [this message]
2026-02-03  6:28   ` Naman Jain
2026-02-03  7:01     ` Thomas Weißschuh
2026-02-04  4:49       ` Naman Jain

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=cd0e4ca5-542c-42db-bd7c-c63f5df85fc5@linux.microsoft.com \
    --to=namjain@linux.microsoft.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kees@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=ssengar@linux.microsoft.com \
    --cc=tamird@gmail.com \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=will@kernel.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