Repository navigation
container: Move .vmlinuz.hmac along with the kernel in split-kernel-and-rootfs - #21
Closed
cgwalters-bot wants to merge 1 commit into
Closed
cgwalters-bot wants to merge 1 commit into
cgwalters-bot wants to merge 1 commit into
Conversation
cgwalters
approved these changes
Sep 25, 2026
…nd-rootfs Kernels built for FIPS ship /usr/lib/modules/<kver>/.vmlinuz.hmac, which ostree and kernel-install copy next to vmlinuz when installing it. split-kernel-and-rootfs moved vmlinuz and the initramfs out but left the HMAC behind, orphaned in the rootfs of a sealed image. Move it into the output directory next to vmlinuz, under the same name, so it goes wherever the kernel goes. While here, move the logic into kernel.rs as a cap-std based function so it can be unit tested. Generated-by: AI Signed-off-by: Colin Walters <[email protected]>
Collaborator
Author
|
Signed off 1 commit(s) with |
cgwalters-bot
force-pushed
the
bot/split-kernel-hmac
branch
from
September 25, 2026 15:32
0f05c9c to
43b9a99
Compare
Collaborator
Author
|
Opened upstream as bootc-dev#2499. Closing this review draft. |
Collaborator
Author
|
Signed off 1 commit(s) with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bootc container split-kernel-and-rootfsmovesvmlinuzandinitramfs.imgout of/usr/lib/modules/<kver>/, but it left the kernel's FIPS HMAC (.vmlinuz.hmac) behind, orphaned in the rootfs of a sealed image. This moves it into<output>/<kver>/next tovmlinuz, under the same name, which is the layout ostree reads it from (it installs it as/boot/.vmlinuz-<kver>.hmac). The split logic moves intokernel.rsso it can be unit tested.Found while building the rhel-bootc-examples sealing example.
Testing, on a 16-core devspace:
just unit-testspassed, including the newkernel::tests::test_split_kernel{,_uki};just validateandjust buildpassed.bootc container ukify --kernel-dirin a tools stage, following the rhel-bootc-examples sealing Containerfile). With the stock bootc 1.16.13,/usr/lib/modules/6.12.0-269.el10.x86_64/.vmlinuz.hmacstayed in the final image. With this change it lands in/kernel/<kver>/next tovmlinuz, nothing is left in/usr/lib/modules, and ukify still builds the UKI.Caveat: in a UKI boot, dracut's FIPS check verifies
/boot/EFI/Linux/.<uki>.hmacand not the vmlinuz HMAC. So the moved file is for consumers of the split kernel directory. Sealed images still don't get a UKI HMAC.Generated-by: https://github.com/cgwalters/#llms
Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.
bootc-dev/bootc, basemainPVTI_lAHOAQ_SPs4Bj2Gizg8q1QwTo review:
/promoteon a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.Signed-off-by: Colin Walters <[email protected]>to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer./draftline (in the same comment or before) to open it upstream as a draft (/readyundoes that).