All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: acme@kernel.org, andrii.nakryiko@gmail.com,
	dwarves@vger.kernel.org, jolsa@kernel.org, williams@redhat.com,
	kcarcia@redhat.com, dxu@dxuuu.xyz, eddyz87@gmail.com
Subject: Re: [PATCH dwarves] pahole: enable --reproducible_build when SOURCE_DATE_EPOCH is set
Date: Thu, 27 Jun 2024 08:01:20 +0900	[thread overview]
Message-ID: <ZnydwHhgCbUbkm44@codewreck.org> (raw)
In-Reply-To: <c1414fb5-f7a8-4cb4-9c27-9c0c9b431f28@oracle.com>

Thanks for the reply!

Alan Maguire wrote on Wed, Jun 26, 2024 at 03:29:37PM +0100:
> On 26/06/2024 04:22, Dominique Martinet wrote:
> > The SOURCE_DATE_EPOCH environment variable is used in reproducible
> > builds to set build timestamps and is generally synonymous with
> > reproducible builds: instead of making users figure out how to pass
> > pahole flags (e.g. explicitly setting PAHOLE_FLAGS in linux) just assume
> > that the user wants a reproducible build if this variable is set.
> 
> From the kernel perspective it looks like as a result of [1]
> [1] https://patchwork.kernel.org/project/linux-kbuild/patch/1443741332.2730.75.camel@decadent.org.ukOB/
> the setting of SOURCE_DATE_EPOCH will be converted into
> KBUILD_BUILD_TIMESTAMP; I thought the plan was to add the
> BTF feature flag explicitly if KBUILD_BUILD_TIMESTAMP was set?

Hmm, that patch (2015) never got in apparently?...
And I don't see anythiing that'd make pahole output reproducible if
either variables are set in the kernel either right now; we still build
plenty of older kernels so even if such a patch gets in I'd rather this
is checked in pahole than kbuild.

For context, the patch I'm replacing right now is this one in nixpkgs
(2023):
https://github.com/NixOS/nixpkgs/commit/e1daacf987d6064bd7dc65a30e7715990bc1c011

(Where we used to force -j1 if SOURCE_DATE_EPOCH is set, and the new
feature makes it more appropriate for upstreaming so I decided to send
the patch)

> Are you planning for use-cases outside of kernel BTF generation?

From a quick check the only users of pahole in nixpkgs and alpine are
the linux kernel, so as far as I'm concerned if the linux build is
reproducible I'm happy.
OTOH I'm not sure we're actually properly setting KBUILD_BUILD_TIMESTAMP
properly everywhere (for example external modules), whereas
SOURCE_DATE_EPOCH is now universally set by the upper build system --
back in 2015 when that patch was sent the reproducible build efforts
just started and SOURCE_DATE_EPOCH wasn't well supported, but now I
can't imagine it not being set.

So I'd rather keep checking on SOURCE_DATE_EPOCH, but if you're sure
there won't ever be any user other than the kernel for pahole's btf
generation then I can change the patch to KBUILD_BUILD_TIMESTAMP and we
can go hunt users not setting it explicitly our our side.


Thanks,
-- 
Dominique Martinet | Asmadeus

  reply	other threads:[~2024-06-26 23:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  3:22 [PATCH dwarves] pahole: enable --reproducible_build when SOURCE_DATE_EPOCH is set Dominique Martinet
2024-06-26 14:29 ` Alan Maguire
2024-06-26 23:01   ` Dominique Martinet [this message]
2024-06-27 17:25     ` Alan Maguire
2024-06-28  8:31       ` Alan Maguire
2024-06-28 13:59         ` Arnaldo Carvalho de Melo
2024-06-28 19:44         ` Dominique Martinet
2024-07-01 16:44           ` Alan Maguire
2024-07-01 23:35             ` Dominique Martinet

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=ZnydwHhgCbUbkm44@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=dwarves@vger.kernel.org \
    --cc=dxu@dxuuu.xyz \
    --cc=eddyz87@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kcarcia@redhat.com \
    --cc=williams@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.