[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220203121117.aedtaxspnm5mbqhj@sirius.home.kraxel.org>
Date: Thu, 3 Feb 2022 13:11:17 +0100
From: Gerd Hoffmann <kraxel@...hat.com>
To: Dov Murik <dovmurik@...ux.ibm.com>
Cc: linux-efi@...r.kernel.org, Borislav Petkov <bp@...e.de>,
Ashish Kalra <ashish.kalra@....com>,
Brijesh Singh <brijesh.singh@....com>,
Tom Lendacky <thomas.lendacky@....com>,
Ard Biesheuvel <ardb@...nel.org>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Andi Kleen <ak@...ux.intel.com>,
Greg KH <gregkh@...uxfoundation.org>,
Andrew Scull <ascull@...gle.com>,
Dave Hansen <dave.hansen@...el.com>,
"Dr. David Alan Gilbert" <dgilbert@...hat.com>,
Lenny Szubowicz <lszubowi@...hat.com>,
Peter Gonda <pgonda@...gle.com>,
James Bottomley <jejb@...ux.ibm.com>,
Tobin Feldman-Fitzthum <tobin@...ux.ibm.com>,
Jim Cadden <jcadden@....com>,
Daniele Buono <dbuono@...ux.vnet.ibm.com>,
linux-coco@...ts.linux.dev, linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org
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@...hat.com>
take care,
Gerd
Powered by blists - more mailing lists