Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Nondeterminism in Stub #261

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Remove Nondeterminism in Stub #261

merged 1 commit into from
Nov 14, 2023

Conversation

blitz
Copy link
Member

@blitz blitz commented Nov 14, 2023

The linker embeds a timestamp into our UEFI stub. objdump -p reports:

Time/Date               Mon Nov 13 20:02:35 2023

With /Brepro we get the following instead:

Time/Date		d597e888	(This is a reproducible build file hash, not a timestamp)

Fixes #260

The linker embeds a timestamp into our UEFI stub. objdump -p
reports:

Time/Date               Mon Nov 13 20:02:35 2023

With /Brepro we get the following instead:

Time/Date		d597e888	(This is a reproducible build file hash, not a timestamp)

Fixes #260
@@ -1,2 +1,4 @@
[build]
target = "x86_64-unknown-uefi"
# Strip timestamps from binaries.
rustflags = ["-C", "link-args=/Brepro"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, I was so close 😂 Thanks!

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

/nix/store/x1qch1dlqgwzczqmx1wxh3ssr2ya6fsl-lanzaboote-stub-0.3.0/bin/lanzaboote_stub.efi:     file format pei-x86-64

Characteristics 0x22e
        executable
        line numbers stripped
        symbols stripped
        large address aware
        debugging information removed

Time/Date               7d8622be        (This is a reproducible build file hash, not a timestamp)
Magic                   020b    (PE32+)
MajorLinkerVersion      14
MinorLinkerVersion      0
SizeOfCode              0000000000016800
SizeOfInitializedData   0000000000005800
SizeOfUninitializedData 0000000000000000
AddressOfEntryPoint     000000000000ddac

@blitz blitz added this pull request to the merge queue Nov 14, 2023
Merged via the queue into master with commit 2123d3a Nov 14, 2023
24 checks passed
@blitz blitz deleted the reproducible-stub branch November 14, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uefi stub contains timestamp of compilation
2 participants