From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92A8D21B02822 for ; Tue, 20 Nov 2018 07:20:08 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD011C056795; Tue, 20 Nov 2018 15:20:07 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-171.rdu2.redhat.com [10.10.120.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D16A7B5FD; Tue, 20 Nov 2018 15:20:04 +0000 (UTC) To: Ming Huang , Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, michael.d.kinney@intel.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, zhangfeng56@huawei.com References: <20181120090150.1102-1-ming.huang@linaro.org> <20181120090150.1102-2-ming.huang@linaro.org> <20181120121309.mwsoxljgjwy4yv7i@bivouac.eciton.net> <20181120125805.jn6xfxbg47izxwo2@bivouac.eciton.net> <1e4db632-9c2c-79e0-2bbe-cdc7913aa0c5@linaro.org> <20181120143912.p7jeqwjgtqsgmf75@bivouac.eciton.net> <067f13ef-f03e-327e-685f-f4d5516fb6a4@linaro.org> From: Laszlo Ersek Message-ID: <6cbf8e93-6435-0c48-8f1e-19c1329ae963@redhat.com> Date: Tue, 20 Nov 2018 16:20:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <067f13ef-f03e-327e-685f-f4d5516fb6a4@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 20 Nov 2018 15:20:08 +0000 (UTC) Subject: Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 15:20:08 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 11/20/18 16:00, Ming Huang wrote: > > > On 11/20/2018 10:39 PM, Leif Lindholm wrote: >> On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote: >>>>>> And all Hisilicon platforms still use >>>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf >>>>>> regardless of Secure Boot setting. >>>>>> >>>>>> So what problem does this patch solve? A runtime one? >>>>> >>>>> This patch solve bug in FlashFvbDxe. >>>> >>>> Yes, but what bug? What is the symptom? What _specific_ problem goes >>>> away by adding this patch? That information should have been in the >>>> original commit message. I have no information available to me as I >>>> now build -rc1 to suggest that this patch should be included. >>> >>> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe, >>> not gEfiVariableGuid when enable secure boot. >> >> OK, I will ask a third time: what _problem_ does this solve? >> What is the symptom? >> When someone uses the buggy firmware, what does not work for them? >> This information _always_ needs to be in the commit message. > > This patch is using with series v1 patch 'Hisilicon/D06: Fix SBBR-SCT AuthVar issue' > to fix the SCT issue: > RT.SetVariable - Set Invalid Time Base Auth Variable – FAILURE; > RT.SetVariable - Create one Time Base Auth Variable, the expect return > status should be EFI_SUCCESS – FAILURE. Side comment (because the main comment is Ard's): regarding the Signature GUID in VARIABLE_STORE_HEADER, commit d92eaabefbe0 ("OvmfPkg: simplify VARIABLE_STORE_HEADER generation", 2016-02-15) might provide some background. Thanks, Laszlo >>>>> Should I add a patch before this patch >>>>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4? >>>> >>>> That would require a sane implementation of PlatformSecureLib, >>>> implementing a real UserPhysicalPresent(). >>>> Can you turn that around within the next few hours? >>> >>> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib. >>> There is not enough time to implement a real UserPhysicalPresent. >> >> If there is not enough time to implement a real PlatformSecureLib, >> there is no need to have Secure Boot at all. Same thing goes for >> secure variable store (to hardware devices that are not accessible >> from Non-secure world). >> >>> This patch will add when we implement real secure boot in future. >> >> That sounds like the best thing to do. >> >> Meanwhile, could you create a patch to get rid of the SECURE_BOOT >> options completely from the .dsc/.fdf please? I don't like having it >> in there when we know it doesn't build. >> >> / >> Leif >>