mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
allow reproducible builds of xen.gz
The mkelf32 executable was using an uninitialized stack buffer for padding after the ehdr and phdr are written to the xen file, which leads to non-deterministic bytes in the binary and prevented Xen hypervisors from being reproducibly built. Additionally, the file was then compressed with gzip -9 without the -n | --no-name flag, which lead to the xen.gz file having non-deterministric bytes (the timestamp) in the compressed file. Signed-off-by: Trammell Hudson <trammell.hudson@twosigma.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
e8864a4b9d
commit
1d6569a74b
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -121,7 +121,7 @@ _distclean: clean
|
||||
rm -f tags TAGS cscope.files cscope.in.out cscope.out cscope.po.out GTAGS GPATH GRTAGS GSYMS .config
|
||||
|
||||
$(TARGET).gz: $(TARGET)
|
||||
gzip -f -9 < $< > $@.new
|
||||
gzip -n -f -9 < $< > $@.new
|
||||
mv $@.new $@
|
||||
|
||||
$(TARGET): delete-unfresh-files
|
||||
|
||||
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
|
||||
u32 loadbase, dat_siz, mem_siz, note_base, note_sz, offset;
|
||||
char *inimage, *outimage;
|
||||
int infd, outfd;
|
||||
char buffer[1024];
|
||||
char buffer[1024] = {};
|
||||
int bytes, todo, i = 1;
|
||||
int num_phdrs = 1;
|
||||
|
||||
|
||||