From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.52263.1683212911361165417 for ; Thu, 04 May 2023 08:08:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fR71IMyZ; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683212909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pW6wYTqJf4cwxEAvf7AntZN7p4GBGqaLi7DQDZgriDA=; b=fR71IMyZHduhqyl+ssH2lprSuQP7xYaPNEUfvhHF+9hLYjqMXBqSPzr9jhTrMhNhQurbEM Y6KQIG4kaBib1jXhWk5XYsc1LiQOG6JKVAKqXUSbRr/XR3NJi+teWFMNrrTXjO9xr5ZwfK hTYrcZLRbpy8CiHTWfQ+mwp9PHShVqM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-531-3m2fPG9uP46KACSRlZUq-Q-1; Thu, 04 May 2023 11:08:24 -0400 X-MC-Unique: 3m2fPG9uP46KACSRlZUq-Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E0C788B7A8; Thu, 4 May 2023 15:08:23 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B69B7492C13; Thu, 4 May 2023 15:08:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 33E16180061F; Thu, 4 May 2023 17:08:21 +0200 (CEST) Date: Thu, 4 May 2023 17:08:21 +0200 From: "Gerd Hoffmann" To: James Bottomley Cc: devel@edk2.groups.io, Jiewen Yao , Erdem Aktas , Min Xu , Tom Lendacky , Jordan Justen , Stefan Berger , Julien Grall , Anthony Perard , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Ard Biesheuvel , Oliver Steffen , Pawel Polawski , Michael Roth Subject: Re: [PATCH 2/3] OvmfPkg/AmdSev: stop using PlatformBootManagerLibGrub Message-ID: References: <20230504133251.1031341-1-kraxel@redhat.com> <20230504133251.1031341-3-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, May 04, 2023 at 10:16:05AM -0400, James Bottomley wrote: > On Thu, 2023-05-04 at 15:32 +0200, Gerd Hoffmann wrote: > > Use PlatformBootManagerLib with PcdBootRestrictToFirmware > > set to TRUE instead. > > > > Signed-off-by: Gerd Hoffmann > > --- > >  OvmfPkg/AmdSev/AmdSevX64.dsc | 10 ++++++++-- > >  1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc > > b/OvmfPkg/AmdSev/AmdSevX64.dsc > > index 943c4eed9831..b32049194d39 100644 > > --- a/OvmfPkg/AmdSev/AmdSevX64.dsc > > +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc > > @@ -153,6 +153,7 @@ [LibraryClasses] > >    > > UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEn > > tryPoint.inf > >    > > UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/Ue > > fiApplicationEntryPoint.inf > >    > > DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/Uefi > > DevicePathLibDevicePathProtocol.inf > > +  NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf > > All additions apart from this look fine, but this one is a security > risk: EFI variables represent an unmeasured configuration for SEV boot > and, as such, can be used to influence the boot and potentially reveal > boot secrets, so the AmdSevPkg was designed to have read only EFI > variables that couldn't be subject to outside influence. NvVarsFileLib gets disabled already case PcdSecureBootSupported is set. Is that good enough? If not I can extend that to also check PcdBootRestrictToFirmware. take care, Gerd