[PATCH v7 4/5] efi: Load efi_secret module if EFI secret area is populated

Gerd Hoffmann kraxel at redhat.com
Thu Feb 3 12:11:17 UTC 2022


  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 at redhat.com>

take care,
  Gerd



More information about the Linux-security-module-archive mailing list