On 16/10/2026 14:42, James Le Cuirot wrote:
> On Fri, 2026-10-16 at 12:17 +0200, Nowa Ammerlaan wrote:
>>>       > On 15. Oct 2026, at 23:33, James Le Cuirot <che…@gentoo.org >>>      <mailto:che…@gentoo.org>> wrote: >>>       > >>>       > On Thu, 2026-10-15 at 13:20 +0100, James Le Cuirot wrote: >>>       >> Gentoo must therefore publish its own kernel and bootloader >>>      builds signed with >>>       >> its own key that Epic has agreed to trust. Signed UKIs are >>>      probably not an >>>       >> option as the kernel command line is baked in. >>>       >> >>>       >> From here, there are 3 options: >>>       >> >>>       >> a) Users enroll this key into their firmware db and boot without >>>      the shim. >>>       >> >>>       >> b) Users install Fedora's signed shim (already packaged in >>>      Gentoo) and enroll >>>       >> this key into the MOK database. >>>       >> >>>       >> c) Gentoo approaches Microsoft to get a signed certificate so >>>      that Gentoo can >>>       >> be booted (via the shim) with Secure Boot enabled out of the box >>>      on regular >>>       >> PCs. This is obviously a great benefit by itself. >>>       > >>>       > I only remembered shortly after writing this and heading out the >>>      door that >>>       > Gentoo *already* publishes signed kernels and even UKIs. No >>>      bootloader, but if >>>       > the UKIs are usable, despite not being able to customise the >>>      kernel command >>>       > line, then you don't need one. >>>       > >>>       > So for (a) and (b), all Gentoo would need to do is ask Epic to >>>      trust the >>>       > existing key. I don't maintain the distribution kernels though, >>>      so I'll leave >>>       > that team to decide whether we should do this. >>> >>> >>> Option C sounds like it would have a lot of benefit to releng as well. >>> So should likely be considered as our end goal.
>> >> Getting Microsoft to sign our kernels is a really bad idea IMO. First of >> all, it will be a lot of (paper) work to prove that we can be trusted. >> Microsoft won't just sign anything we send to them. Second of all, it >> will delay the releasing of new kernels as we need to wait for Microsoft >> to verify and then sign what we build. And thirdly because we would be >> dependent on Microsoft for our kernel release workflow which goes >> against our philosophy of being as independent as feasible/possible. So >> from my perspective option C is a no-go.
> > That's not how this works. Microsoft wouldn't want to do that any more than > you would. That's why the shim exists. Gentoo builds the shim with its own key > baked in, Microsoft signs the build and sends it back. Repeat for each new > shim release. Those only occur about once or twice a year, and there's > generally no great rush with them. There is no change to how you build and > publish the kernel.
Right, yes, I misinterpreted option C, my bad.
> The bulk of the effort is very much up front with the questionnaire I > mentioned earlier. You can see it at https://github.com/rhboot/shim-review, > but it basically amounts to "Do you know what you're doing, and is it secure?"
I suppose this will require that we take the SBAT stuff more seriously, currently our kernels/UKIs have none. For the UKI the default one is inherited from the systemd-stub. I'm personally more fond of the approach I have seen in Bazzite. They borrow the Fedora shim like we do but have a super simpel script to deploy their certificate in the MOK. (Easy enough that my non-tech savvy partner could do it)
>> Getting epic to trust our certificate is another story, but we would >> need to know exactly what their criteria and expectations are. I'd >> imagine they won't just trust everything that is sent their way, there >> must be some sort of vetting otherwise there would be no point.
> > I imagine they would ask similar set of questions. Just a guess, but getting a > shim signed by Microsoft might get you a free pass.
Well, after reading through the blogpost in the OP, I doubt it. E.g. Red Hat/Fedora has a signed shim, but they also enable kexec which appears to be a disqualifier if I am interpreting this correctly. Though AFAIK you can get the kernel to enforce the same signature check that shim does (CONFIG_KEXEC_SIG_FORCE: which we currently enable in gentoo-kernel[secureboot] but not in gentoo-kernel-bin) so idk why it has to be a disqualifier. Best regards, Nowa