Skip to content

Update shim to v15.8#10995

Merged
chalamalasetty merged 22 commits into3.0-devfrom
chrco/shim-15-8-only
Nov 22, 2024
Merged

Update shim to v15.8#10995
chalamalasetty merged 22 commits into3.0-devfrom
chrco/shim-15-8-only

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented Nov 10, 2024

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Update the Azure Linux 3.0 shim to the latest version v15.8.
This change also adds MOK Manager (mm) support for allowing users to enroll their own keys into the system.
We do build fallback.efi as well, but for Azure Linux 3.0, we will not be utilizing it in order to keep consistency with our 3.0 preview and previous offerings. We will re-evaluate bringing in fallback.efi in the next major OS release.
Additionally, this new shim embeds our updated Azure Linux Trusted Base CA certificate.
This update also includes the signed shim and mm binaries into the "shim" package for wider use.
We also deprecate the previous "shim-unsigned" package as it is no longer needed, and we update the references in the ARM64 image definitions to the "shim" package.
Finally, the change bumps the grub package to ensure it gets signed with the newer key and the RPM dependencies are set such that this shim and grub should update together.

Signed-off-by: Chris Co chrco@microsoft.com

Does this affect the toolchain?

NO

Associated issues
Test Methodology
  • Pipeline build id: 672965
  • Image Test build: 673763
    • shim boots as expected when Microsoft UEFI CA is selected as certificate. Expected for grub binary to not boot since it is not signed in test build. On ISO, MOK does not boot as expected since toolkit changes are needed to add mm.efi to the ISO. On standard images, MOK does get verified correctly and boots to allow enrolling keys and hashes.
    • images and ISO boots (and installs in case of ISO) successfully when secure boot is disabled.

ddstreet and others added 20 commits November 10, 2024 00:13
Also include temporary *unsigned* shim efi files to make toolkit
happy...this won't be usable with secure boot until the upstream shim
review(s) are complete
The shim and grub2 need to coordinate their location at %{efidir}
instead of BOOT, so require the proper versions together using
Conflicts:
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
Dropping change for package name to include -%{efiarch} in order to
maintain compatibility with current shim package naming

Will look to update naming in the next major OS release

Signed-off-by: Chris Co <chrco@microsoft.com>
These shimaa64.efi and shimx64.efi binaries are signed with the MS UEFI
CA for general secure boot use

Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
In order to preserve consistency with our Azure Linux 3.0 preview and
prior versions of Azure Linux, keep the locations of the binaries in
EFI\BOOT and do not supply a fallback.efi.

This means we should expect the ESP partition to look like:
.
├── EFI
│   ├── BOOT
│   │   ├── bootx64.efi (which is shimx64.efi)
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi

We will re-evaluate this behavior again for the next major OS release.

Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
@christopherco christopherco marked this pull request as ready for review November 10, 2024 12:21
@christopherco christopherco requested a review from a team as a code owner November 10, 2024 12:21
Signed-off-by: Chris Co <chrco@microsoft.com>
Signed-off-by: Chris Co <chrco@microsoft.com>
%global zdpd 0%{dotpre}.
%endif

%global efidir azurelinux
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a q: Here, for the aarch64 case, we intentionally want azurelinux?

Copy link
Copy Markdown
Contributor

@rlmenge rlmenge Nov 21, 2024

Choose a reason for hiding this comment

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

Both shim-unsigned-x64.spec and shim-unsigned-aarch64.spec use %global efidir azurelinux. Unclear if this is still intentional as it matches how other distros offer shim but does not match our shim.spec now.

Our actual signed shim rpm (from shim.spec) still uses the old file paths /boot/efi/EFI/BOOT/boot{arch}.efi as of commit 93c34aa

Comment thread SPECS/shim-unsigned-aarch64/shim-unsigned-aarch64.spec
Source2: %{dbxfile}
%endif
Source3: sbat.azurelinux.csv
Source4: shim.patches
Copy link
Copy Markdown
Contributor

@manuelh-dev manuelh-dev Nov 12, 2024

Choose a reason for hiding this comment

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

Renders empty to me. Probably want to list the patch files listed above. I know the PR is not ready for review. Just pre-emptively iterating over it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

None of the patches required any more due to version bumps, thus empty?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks to be an artifact from using the fedora spec :) 73c0c00

@chalamalasetty chalamalasetty merged commit 33ddc96 into 3.0-dev Nov 22, 2024
@chalamalasetty chalamalasetty deleted the chrco/shim-15-8-only branch November 22, 2024 21:23
durgajagadeesh pushed a commit to durgajagadeesh/azurelinux_djpalli that referenced this pull request Dec 31, 2024
Signed-off-by: Chris Co <chrco@microsoft.com>
Co-authored-by: Dan Streetman <ddstreet@ieee.org>
Co-authored-by: Dan Streetman <ddstreet@microsoft.com>
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.

7 participants