lkml.org 
[lkml]   [2022]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-02-03 13:11    [W:0.300 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site