Repository navigation
os: drop the sound modules and refuse unsigned modules in mkimage (#708) - #723
Conversation
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At df18a68b. Built the image at this head, because the new gate could plausibly break every build if modinfo could not read the staged modules:
bash -n os/mini/mkimage.sh / init.sh -> OK
EC_MODULE=skip AMDXDNA_KO=skip LEMONADE=<prebuilt> ./os/mini/mkimage.sh /tmp/osimg723 <engine build>
signer: 108 Build time autogenerated kernel key
signer: 1 strixhalo Secure Boot Kernel
== 1bit-os.efi … == 1bit-os.img … (no UNSIGNED, exit 0)
So the refusal works on this box's staged modules — 109 .ko files read, none unsigned, image assembled — and the signer summary prints as intended. The sound-module removal is consistent on both sides (init.sh's modprobe list and mkimage.sh's mods), and nothing else in the tree loads snd_hda_intel/snd_usb_audio, so dropping them is the whole fix rather than half of it.
One substantive note, and it is the gap between the comment and the code. The comment states the right criterion:
the signers are printed either way, because "the module is signed" is not the question - signed by a key this kernel trusts is.
but the implementation only tests [ -z "$signer" ], i.e. "has a signer". On this box that distinction is not academic: 108 of 109 modules are signed by Build time autogenerated kernel key, not by the strixhalo Secure Boot Kernel MOK that signs amdxdna/ec_su_axb35. Today that is fine — those in-tree modules come from the same kernel build, whose embedded keyring trusts its own signing key — but the gate would pass a module signed by any other key, which is exactly the rejection the PR exists to prevent. If you want the check to match its comment, compare the signer against the image kernel's own module key (or against the MOK list) and refuse on a mismatch; if not, soften the comment to "refuses an unsigned module" and leave the trusted-key question where it is.
Not a blocker for merge: the failure mode it closes (the c18 snd_usbmidi_lib refusal plus eleven Unknown symbol snd_ctl_new1 lines) is real and this closes it, and the gate cannot regress a build that passes today.
tprs-ready applied. Same scope note as its stack neighbours: it inherits #719/#720's two open items and cannot land before them.
03aee78 to
664abc2
Compare
df18a68 to
bd3dac1
Compare
PR Reviewer Guide 🔍(Review updated until commit d37209c)Here are some key observations to aid the review process:
|
664abc2 to
d18ad9b
Compare
bd3dac1 to
d37209c
Compare
|
Persistent review updated to latest commit d37209c |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Re-confirmed at the current head. The author patch is unchanged from the head I reviewed — the delta since then is the rest of this stack arriving through rebases (#719's serial-log fix and its neighbours), which I have reviewed and re-verdicted in their own PRs. So everything in my earlier verdict on this PR applies unchanged at this head, including what I recorded there as not-verified-by-me (the QEMU gate).
tprs-ready stands.
|
Superseded by #742 — the same reviewed content as one commit on |
…ntity (#704) (#720) * os: the banner and the release check read the image's own release identity (#704) * os: the release identity reports the HRX pin, not the engine commit (#704) Review of #720: `git -C third_party/hrx-system rev-parse HEAD` walks up to the parent repository when the submodule is not checked out - the way the release lane builds - so the image shipped 'hrx-system: <engine sha>' and the '|| unknown' fallback never fired. The gitlink recorded in this tree is the pin the release ships: `git ls-tree HEAD third_party/hrx-system`. Measured before/after below. * os: one boot flow - countdown on the choice line, live status while DHCP and Lemonade come up (#705) * os: a 16x32 console font and a full-width selection bar (#707) (#722) Co-authored-by: bong-water-water-bong <[email protected]> * os: drop the sound modules and refuse unsigned modules in mkimage (#708) (#723) * os: a 16x32 console font and a full-width selection bar (#707) * os: drop the sound modules and refuse unsigned modules in mkimage (#708) --------- Co-authored-by: bong-water-water-bong <[email protected]> * os: prepare-stick grows the data partition to the stick's full size (#706) (#724) * os: a 16x32 console font and a full-width selection bar (#707) * os: drop the sound modules and refuse unsigned modules in mkimage (#708) * os: prepare-stick grows the data partition to the stick's full size (#706) --------- Co-authored-by: bong-water-water-bong <[email protected]> --------- Co-authored-by: bong-water-water-bong <[email protected]>
Fixes #708. The c18 boot rejected
snd_usbmidi_lib("Loading of unsigned module is rejected") and then printedeleven
Unknown symbol snd_ctl_new1 (err -2)lines; measured here, those sound modules are signed with"Build time autogenerated kernel key", not the MOK/Kernel key the image's other modules carry.
The appliance has no audio and nothing else loads them, so
snd_hda_intel/snd_usb_audioleave the image andinit's list. mkimage additionally refuses any
.ko/.ko.xz/.ko.zstin the initramfs whosemodinfo -F signeris empty (it names each one), and prints the signer table for the record.
PR-READY.