Re: [PATCH v8 4/4] kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification

From: Coiby Xu
Date: Wed Jun 15 2022 - 21:50:56 EST


Hi Mimi,

>
> This patch set could probably go through KEYS/KEYRINGS_INTEGRITY, but
> it's kind of late to be asking. Has it been in linux-next? Should I
> assume this patch set has been fully tested or can we get some "tags"?

[...]

IIRC, Coiby has tested it on x86_64/arm64, not sure if he took test on
s390. No, this hasn't been in linux-next.

For arm64, recently I did a new round of test and the patches works as
expected,
1. Build 5.19.0-rc2
2. generate keys and add them to .secondary_trusted_keys, MOK, UEFI
db; 3. sign different kernel images with different keys including keys
from .builtin_trusted_key, .secondary_trusted_keys keyring, UEFI db
key and MOK key 4. Without lockdown, all kernel images can be kexec'ed; with lockdown
enabled, only the kernel image signed by the key from
.builtin_trusted_key can be kexec'ed

Then I build a new kernel with the patches applied and confirm all
kernel images can be kexec'ed.


I used the s390 code on powerpc and there it did not work because the
built-in key was needed to verify the kernel.

I did not really run this on s390, only ported the fix I needed on
powerpc back to s390.

For 390, I commented out the code that skips signature verification
when secure boot is not enabled since I couldn't find a machine that
supports secure boot and confirm before applying the patch, kernel
images signed by keys from .builtin_trusted_key, .secondary_trusted_keys
couldn't be kexec'ed when lockdown is enabled; after applying the
patch, those kernel images could be kexec'ed.

Thanks

Michal


--
Best regards,
Coiby