Messages in this thread | | | Date | Thu, 3 Feb 2022 13:11:17 +0100 | From | Gerd Hoffmann <> | Subject | Re: [PATCH v7 4/5] efi: Load efi_secret module if EFI secret area is populated |
| |
Hi,
> >> If we keep only the 'efi.coco_secret != EFI_INVALID_TABLE_ADDR' check, > >> we'll get errors from efi_secret for every VM launch that doesn't > >> undergo LAUNCH_SECRET. I don't think that's good. > > > > Well, if that is a common case the module could either print nothing or > > log KERN_INFO level instead of KERN_ERROR. > > What if the user doesn't inject a secret and doesn't include the > efi_secret module at all in the initrd? request_module("efi_secret") > will fail. > > I can ignore the error code of request_module("efi_secret") but that > feels bad.
Looking at the error code returned by request_module should help to figure what happened (module load failed / no secret present / something else).
But, yes, module load errors are harmless in case there is no secret present in the first place. Hmm, tricky. I don't see a way to solve that without duplicating the checks.
I withdraw my objections.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
take care, Gerd
| |