Page MenuHomeFreeBSD

Create the GELIBOOT GEOM_ELI flag

Authored by allanjude on Apr 6 2016, 9:32 PM.



This flag indicates that the user wishes to use the GELIBOOT feature, to boot from a fully encrypted root file system.
Currently, GELIBOOT does not support key files, and when it does, they will be done a bit differently.

Due to the design of GELI, and the desire for secrecy, the GELI metadata does not know if key files are used or not, it just adds the key material (if it exists) to the HMAC before the optional user password, so there is no way to tell if a GELI partition has key files or not.
Since the GELIBOOT code in boot2 and the loader do not support keys, they will only attempt to attach if this flag is set

This will stop GELIBOOT from prompting for passwords to GELIs that it cannot decrypt, disrupting the boot process

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

allanjude retitled this revision from to Create the GELIBOOT GEOM_ELI flag.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: pjd, oshogbo, ed, gnn, emaste.

Small comment.

937 ↗(On Diff #14950)

md.md_flags & G_ELI_FLAG_GELIBOOT is not a boolean equation you should compare it. Ideal would be:

Sometimes good enough version would be:
(md.md_flags & G_ELI_FLAG_GELIBOOT) != 0

940 ↗(On Diff #14950)


485 ↗(On Diff #14950)


489 ↗(On Diff #14950)


Ah I see now that all in the file is done the same comparison so not sure if you should change that.

wblock added inline comments.
297 ↗(On Diff #14950)

Couldn't this just be:

Enable booting from encrypted root filesystem.
298 ↗(On Diff #14950)

This does not seem necessary, and "unencrypted" combined with the earlier "encrypted" makes for a confusing logical "not".

299 ↗(On Diff #14950)

Simplify, passive -> active, and avoid "you" and "your":

The the boot loader prompts for the passphrase and loads
.Xr loader 8
from the encrypted partition.
496 ↗(On Diff #14950)

Repeating this identically here does not seem too helpful.

503 ↗(On Diff #14950)

Let's define what it does so the user does not need to know a new term:

Deactivate booting from an encrypted partition.

If you think it is worth it to fix these, I'll do it as a separate review after this one

allanjude marked 3 inline comments as done.
allanjude edited edge metadata.

Address manpage feedback from wblock

1001 ↗(On Diff #14956)

It seems like we're proliferating tri-state options: yes, no and unspecified. Would it make sense to just come up with an enum somewhere at the top of this file and use those values instead of -1, 0 and 1?

1001 ↗(On Diff #14956)

Probably a good idea. I can do this as a separate commit after.

oshogbo edited edge metadata.
This revision is now accepted and ready to land.Apr 7 2016, 4:29 PM
ed edited edge metadata.
This revision was automatically updated to reflect the committed changes.