* [PATCH] x86/efi: Do not insert timestamps in efi files
@ 2018-10-24 8:03 Bernhard M. Wiedemann
2018-10-24 8:16 ` Andrew Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Bernhard M. Wiedemann @ 2018-10-24 8:03 UTC (permalink / raw)
To: xen-devel; +Cc: Bernhard M. Wiedemann
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
---
xen/arch/x86/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 162b0b94c0..052bdb1e25 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -158,6 +158,7 @@ note.o: $(TARGET)-syms
EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
+EFI_LDFLAGS += --no-insert-timestamp
EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)
EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] x86/efi: Do not insert timestamps in efi files
2018-10-24 8:03 [PATCH] x86/efi: Do not insert timestamps in efi files Bernhard M. Wiedemann
@ 2018-10-24 8:16 ` Andrew Cooper
2018-10-24 12:49 ` Bernhard M. Wiedemann
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cooper @ 2018-10-24 8:16 UTC (permalink / raw)
To: Bernhard M. Wiedemann, xen-devel; +Cc: Wei Liu, Jan Beulich
On 24/10/2018 09:03, Bernhard M. Wiedemann wrote:
> in order to make builds reproducible.
> See https://reproducible-builds.org/ for why this is good.
>
> Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Please follow the MAINTAINERS file and CC the correct people. I've done
so on this email.
> ---
> xen/arch/x86/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
> index 162b0b94c0..052bdb1e25 100644
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -158,6 +158,7 @@ note.o: $(TARGET)-syms
>
> EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
> EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
> +EFI_LDFLAGS += --no-insert-timestamp
> EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
> EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)
> EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
This change is fine in principle, but do all i386pep compatible versions
of LD support this parameter?
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86/efi: Do not insert timestamps in efi files
2018-10-24 8:16 ` Andrew Cooper
@ 2018-10-24 12:49 ` Bernhard M. Wiedemann
2018-10-24 13:04 ` Wei Liu
2018-10-24 13:45 ` Bernhard M. Wiedemann
0 siblings, 2 replies; 10+ messages in thread
From: Bernhard M. Wiedemann @ 2018-10-24 12:49 UTC (permalink / raw)
To: Andrew Cooper, xen-devel; +Cc: Wei Liu, Jan Beulich
On 24/10/2018 10.16, Andrew Cooper wrote:
> This change is fine in principle, but do all i386pep compatible versions
> of LD support this parameter?
It seems, it was added in 2014 to GNU binutils when the default was
reversed to be unreproducible:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=eeb14e5a5b378450ca2ed139e76f317f491f4613
Don't know about other ld implementations.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86/efi: Do not insert timestamps in efi files
2018-10-24 12:49 ` Bernhard M. Wiedemann
@ 2018-10-24 13:04 ` Wei Liu
2018-10-24 13:45 ` Bernhard M. Wiedemann
1 sibling, 0 replies; 10+ messages in thread
From: Wei Liu @ 2018-10-24 13:04 UTC (permalink / raw)
To: Bernhard M. Wiedemann; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, xen-devel
On Wed, Oct 24, 2018 at 02:49:49PM +0200, Bernhard M. Wiedemann wrote:
> On 24/10/2018 10.16, Andrew Cooper wrote:
> > This change is fine in principle, but do all i386pep compatible versions
> > of LD support this parameter?
>
> It seems, it was added in 2014 to GNU binutils when the default was
> reversed to be unreproducible:
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=eeb14e5a5b378450ca2ed139e76f317f491f4613
I think adding this unconditionally will break older ld? Keep in mind
that our supported binutils dates back to 2005.
Either some sort of filtering is required or we bump the required
binutils version. For the former route see ld-ver-build-id in
Config.mk.
Wei.
>
> Don't know about other ld implementations.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] x86/efi: Do not insert timestamps in efi files
2018-10-24 12:49 ` Bernhard M. Wiedemann
2018-10-24 13:04 ` Wei Liu
@ 2018-10-24 13:45 ` Bernhard M. Wiedemann
2018-10-25 8:02 ` Wei Liu
[not found] ` <108D0A7C020000E4CA4B4E14@prv1-mh.provo.novell.com>
1 sibling, 2 replies; 10+ messages in thread
From: Bernhard M. Wiedemann @ 2018-10-24 13:45 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, Bernhard M. Wiedemann
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.
We only add the option, if ld understands it.
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
---
Config.mk | 8 ++++++++
xen/arch/x86/Makefile | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Config.mk b/Config.mk
index 9b13e75a3e..46b064bcae 100644
--- a/Config.mk
+++ b/Config.mk
@@ -151,6 +151,14 @@ export XEN_HAS_BUILD_ID=y
build_id_linker := --build-id=sha1
endif
+ld-ver-timestamp = $(shell $(1) -mi386pep --no-insert-timestamp 2>&1 | \
+ grep -q no-insert-timestamp && echo n || echo y)
+ifeq ($(call ld-ver-timestamp,$(LD)),n)
+ld_no_insert_timestamp :=
+else
+ld_no_insert_timestamp := --no-insert-timestamp
+endif
+
ifndef XEN_HAS_CHECKPOLICY
CHECKPOLICY ?= checkpolicy
XEN_HAS_CHECKPOLICY := $(shell $(CHECKPOLICY) -h 2>&1 | grep -q xen && echo y || echo n)
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 162b0b94c0..61ca474179 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -157,7 +157,7 @@ note.o: $(TARGET)-syms
rm -f $@.bin
EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
-EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
+EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug $(ld_no_insert_timestamp)
EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)
EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-10-26 11:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 8:03 [PATCH] x86/efi: Do not insert timestamps in efi files Bernhard M. Wiedemann
2018-10-24 8:16 ` Andrew Cooper
2018-10-24 12:49 ` Bernhard M. Wiedemann
2018-10-24 13:04 ` Wei Liu
2018-10-24 13:45 ` Bernhard M. Wiedemann
2018-10-25 8:02 ` Wei Liu
[not found] ` <108D0A7C020000E4CA4B4E14@prv1-mh.provo.novell.com>
[not found] ` <74F2501302000079CA4B4E14@prv1-mh.provo.novell.com>
2018-10-25 12:35 ` Jan Beulich
2018-10-25 14:00 ` Andrew Cooper
2018-10-25 14:08 ` Jan Beulich
2018-10-26 11:11 ` Bernhard M. Wiedemann
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.