all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: The fixed-point project
Date: Thu, 19 Sep 2013 23:24:52 +0200	[thread overview]
Message-ID: <87li2sy063.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3147 bytes --]

Hello!

Our wonderful manual, under “Building the Bootstrap Binaries” [0],
questions when we reach fixed point.  I rebuilt the bootstrap binaries
in an attempt to answer that question.

Basically, after two runs I got the bit-for-bit identical tarball for
Binutils, but the other 4 tarballs differed.  The differences were a
4-byte CRC related to .gnu_debuglink (for files that had that), a
timestamp in Guile, and non-determinism in the way Guile generates
identifiers at macro-expansion time.

I’ve fixed some of that, and the rest should be easy to fix.  Then we
quickly reach fixed point.  Neat, no?  :-)


Actually it’s Christian Grothoff who prompted me to look at this during
the GHM, for several good reasons.

First, when we achieve fixed-point, users can just run ‘guix build
bootstrap-tarballs’ at home and notice that they get tarballs that are
bit-for-bit identical to those referred to in bootstrap.scm.  That tells
them that the recipe they have is really the one that was used to build
those tarballs (whereas currently they have to trust me.)

However, in theory, that doesn’t save us from trusting-trust
attacks [1]: the bootstrap GCC could contain a trap, such that the trap
is always preserved across recompilations of GCC, even if it’s absent
From the GCC source being compiled.

David A. Wheeler’s thesis [2] addresses this topic.  Roughly, it shows
that a compiler can be tested for traps by relying on a “trusted”
compiler [3].

For Guix, though, another variable is time: if the current bootstrap
binary is taken for “trusted”, then it may be enough to build the whole
chain of trust, for the rest of time.  That is: we may be able to show
that we obtain the same bootstrap binaries regardless of whether we use
the current bootstrap binaries (taken for trusted), or those just built
(under test).

Even better, Guix can cross-compile, so we could inject cross-compiled
bootstrap binaries as the input, and use them as the starting point to
rebuild bootstrap binaries.  These should be bit-for-bit identical to
those obtained with other bootstrap binaries.


A next step would be generalized bit-for-bit reproducibility [4].
That’s going to be more work, because each package may have
non-determinism issues of its own that need to be fixed.  This is also
something the Nix people have been looking at [5].


Anyway, that opens up a whole lot of perspectives that seem very useful
now that the (arguably unsurprising) state surveillance has been
exposed.

Thoughts? Comments?

Thanks again to Christian for insisting ;-) and for the enlightening
discussions we’ve had, and to Mark H. Weaver for pushing some more.

Ludo’.

[0] http://www.gnu.org/software/guix/manual/guix.html#Bootstrapping
[1] http://cm.bell-labs.com/who/ken/trust.html
[2] http://www.dwheeler.com/trusting-trust/
[3] https://www.schneier.com/blog/archives/2006/01/countering_trus.html
[4] https://blog.torproject.org/blog/deterministic-builds-part-one-cyberwar-and-global-compromise
[5] https://nixos.org/wiki/Long-term_open_issues:build_determinism

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2013-09-19 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 21:24 Ludovic Courtès [this message]
2013-09-19 22:10 ` The fixed-point project Ludovic Courtès
2013-09-20  8:45   ` Alex Sassmannshausen
2013-09-20 21:29 ` Mark H Weaver
2013-09-20 21:44   ` Ludovic Courtès

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=87li2sy063.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.