mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH REPOST] lib/build_OID_registry: do not embed full $0
@ 2024-08-05  9:09 Giuliano Procida
  2024-08-05  9:12 ` Giuliano Procida
  0 siblings, 1 reply; 3+ messages in thread
From: Giuliano Procida @ 2024-08-05  9:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kbuild, kernel-team, elsk, Giuliano Procida

Using $0 makes the output of this file sensitive to the Linux build
directory path. This is problematic for reproducible builds as it can
affect vmlinux's .debug_lines' section and vmlinux's build ID.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 lib/build_OID_registry | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/build_OID_registry b/lib/build_OID_registry
index d7fc32ea8ac2..06f242202036 100755
--- a/lib/build_OID_registry
+++ b/lib/build_OID_registry
@@ -35,7 +35,7 @@ close IN_FILE || die;
 #
 open C_FILE, ">$ARGV[1]" or die;
 print C_FILE "/*\n";
-print C_FILE " * Automatically generated by ", $0, ".  Do not edit\n";
+print C_FILE " * Automatically generated by build_OID_registry.  Do not edit\n";
 print C_FILE " */\n";
 
 #
-- 
2.45.2.741.gdbec12cfda-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH REPOST] lib/build_OID_registry: do not embed full $0
  2024-08-05  9:09 [PATCH REPOST] lib/build_OID_registry: do not embed full $0 Giuliano Procida
@ 2024-08-05  9:12 ` Giuliano Procida
  2024-08-06  5:21   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Giuliano Procida @ 2024-08-05  9:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kbuild, kernel-team, elsk

Please ignore this. I see other people have already posted different
fixes achieving much the same goal.

Though my change was much simpler!

On Mon, 5 Aug 2024 at 10:09, Giuliano Procida <gprocida@google.com> wrote:
>
> Using $0 makes the output of this file sensitive to the Linux build
> directory path. This is problematic for reproducible builds as it can
> affect vmlinux's .debug_lines' section and vmlinux's build ID.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>
> ---
>  lib/build_OID_registry | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/build_OID_registry b/lib/build_OID_registry
> index d7fc32ea8ac2..06f242202036 100755
> --- a/lib/build_OID_registry
> +++ b/lib/build_OID_registry
> @@ -35,7 +35,7 @@ close IN_FILE || die;
>  #
>  open C_FILE, ">$ARGV[1]" or die;
>  print C_FILE "/*\n";
> -print C_FILE " * Automatically generated by ", $0, ".  Do not edit\n";
> +print C_FILE " * Automatically generated by build_OID_registry.  Do not edit\n";
>  print C_FILE " */\n";
>
>  #
> --
> 2.45.2.741.gdbec12cfda-goog
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH REPOST] lib/build_OID_registry: do not embed full $0
  2024-08-05  9:12 ` Giuliano Procida
@ 2024-08-06  5:21   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2024-08-06  5:21 UTC (permalink / raw)
  To: Giuliano Procida; +Cc: linux-kernel, linux-kbuild, kernel-team, elsk

On Mon, Aug 5, 2024 at 6:13 PM Giuliano Procida <gprocida@google.com> wrote:
>
> Please ignore this. I see other people have already posted different
> fixes achieving much the same goal.
>
> Though my change was much simpler!


True.

There were suggestions to replace this with a fixed string:


https://lore.kernel.org/linux-kbuild/CAK7LNASa-KedA_CTww6unckAGkJCQTctdbk0d-MUsN7wQpM=kQ@mail.gmail.com/
https://lore.kernel.org/linux-kbuild/ZfP1xdcYlUawm3uV@bergen.fjasle.eu/



A needlessly complex patch was applied, unfortunately.










>
> On Mon, 5 Aug 2024 at 10:09, Giuliano Procida <gprocida@google.com> wrote:
> >
> > Using $0 makes the output of this file sensitive to the Linux build
> > directory path. This is problematic for reproducible builds as it can
> > affect vmlinux's .debug_lines' section and vmlinux's build ID.
> >
> > Signed-off-by: Giuliano Procida <gprocida@google.com>
> > ---
> >  lib/build_OID_registry | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/build_OID_registry b/lib/build_OID_registry
> > index d7fc32ea8ac2..06f242202036 100755
> > --- a/lib/build_OID_registry
> > +++ b/lib/build_OID_registry
> > @@ -35,7 +35,7 @@ close IN_FILE || die;
> >  #
> >  open C_FILE, ">$ARGV[1]" or die;
> >  print C_FILE "/*\n";
> > -print C_FILE " * Automatically generated by ", $0, ".  Do not edit\n";
> > +print C_FILE " * Automatically generated by build_OID_registry.  Do not edit\n";
> >  print C_FILE " */\n";
> >




--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-06  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05  9:09 [PATCH REPOST] lib/build_OID_registry: do not embed full $0 Giuliano Procida
2024-08-05  9:12 ` Giuliano Procida
2024-08-06  5:21   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®