Skip to content

Conversation

@poettering
Copy link
Member

A couple of changes:

  1. Clearly name the drop-in entry files "Type build: generate pkg-config files during configure #1", and the unified
    kernel images "Type path-lookup: use secure_getenv() #2", and be clearer that the latter is specific
    to UEFI.

  2. Suffix all directory paths with a trailing "/" to clarify that these
    are directories. Also, enclose them all in ``.

  3. Add introductory paragraph that explains that there is Type build: generate pkg-config files during configure #1 and
    Type path-lookup: use secure_getenv() #2 and what they are about.

  4. Explain that Type path-lookup: use secure_getenv() #2 is about signed UEFI SecureBoot.

  5. Don't claim that $BOOT/loader/ contains really all files defined by
    the spec, because that's not true, Type path-lookup: use secure_getenv() #2 images are not located there
    after all.

Fixes: #10399

A couple of changes:

1. Clearly name the drop-in entry files "Type #1", and the unified
   kernel images "Type #2", and be clearer that the latter is specific
   to UEFI.

2. Suffix all directory paths with a trailing "/" to clarify that these
   are directories. Also, enclose them all in ``.

3. Add introductory paragraph that explains that there is Type #1 and
   Type #2 and what they are about.

4. Explain that Type #2 is about signed UEFI SecureBoot.

5. Don't claim that $BOOT/loader/ contains really all files defined by
   the spec, because that's not true, Type #2 images are not located there
   after all.

Fixes: systemd#10399
This is not what distros use, let's not point users to obsolete stuff.
@poettering poettering force-pushed the boot-loader-spec-tweaks branch from b1dcd3a to 07ec9c8 Compare October 19, 2018 20:52
Copy link

@i-c-o-n i-c-o-n left a comment

Choose a reason for hiding this comment

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

Looks good. I like the clear distinction. Makes it easier to refer to BLS; e.g. a boot loader can document that it implements BLS Type#1.

@poettering
Though, as I'm not involved with (U)EFI, I have some general questions left. You mentioned somewhere else, the PE format would be required for SecureBoot. Is that to allow the EFI firmware to load the Unified Image directly? Or is the signature verification of UEFI SecureBoot offered as some kind of service that the boot loader uses? If the boot loader would implement the signature verification it wouldn't be tied to a specific format, I guess.

And about the file path: Why not place the Unified Images in /loader/entries/ too?

@poettering
Copy link
Member Author

thanks for the review! much appreciated. let's merge.

@poettering
Copy link
Member Author

@poettering
Though, as I'm not involved with (U)EFI, I have some general questions left. You mentioned somewhere else, the PE format would be required for SecureBoot. Is that to allow the EFI firmware to load the Unified Image directly?

Yes, UEFI firmeware executes PE binaries directly, and if SecureBoot is enabled it will check the signature while doing so. Hence, if we create unified images we pack the kernel, the initrd, the cmdline, some metadata and a boot logo to display in one single PE image that hence can be signed as one and hence can be validated directly by the firmware.

Or is the signature verification of UEFI SecureBoot offered as some kind of service that the boot loader uses? If the boot loader would implement the signature verification it wouldn't be tied to a specific format, I guess.

There are other schemes. sd-boot (the EFI boot menu thingy included in systemd for those who care) also has support for the sim/mok EFI protocol, which is an alternative way to do validation. In that case it's not the firmware itself that validates, but it has a much more specific usecase.

And about the file path: Why not place the Unified Images in /loader/entries/ too?

@poettering poettering merged commit a57e48a into systemd:master Oct 22, 2018
@poettering
Copy link
Member Author

And about the file path: Why not place the Unified Images in /loader/entries/ too?

The EFI spec suggests you put your stuff into /EFI/<vendor>, we just follow that advice given that Type #2 is EFI specific anyway (type #1 is not EFI specific, hence let's use a non-EFI path for that). I mean, we just put conforming PE binaries there, hence it sounds perfectly appropriate to follow the EFI spec closely on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

bls: Section about unified kernel image violates the spec itself and seems out of scope

2 participants