From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.2289.1634865234668623447 for ; Thu, 21 Oct 2021 18:13:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 22 Oct 2021 09:13:47 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Wu, Hao A'" Cc: "'Samer El-Haj-Mahmoud'" , "'G Edhaya Chandran'" , References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gUmV0dXJuIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBpZiBhdHRyaWJ1dGUgb25seSBoYXMgRUZJX1ZBUklBQkxFX05PTl9WT0xBVElMRSBzZXQ=?= Date: Fri, 22 Oct 2021 09:13:49 +0800 Message-ID: <003c01d7c6e2$120c1810$36244830$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIjP++doeSEz7Z9hy2PxJGNwu+bbKtHQ94A Content-Type: multipart/alternative; boundary="----=_NextPart_000_003D_01D7C725.202FF450" Content-Language: zh-cn ------=_NextPart_000_003D_01D7C725.202FF450 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Sunny: Yes. Only EFI_VARIABLE_NON_VOLATILE attribute can=A1=AFt be used by any mo= dule. So, I also think it is the invalid case.=20 =20 Thanks Liming =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Sunny Wang =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA10=D4=C221=C8=D5 18:19 =CA=D5=BC=FE=C8=CB: Wu, Hao A ; gaoliming ; edk2-devel-groups-io =B3=AD=CB=CD: Samer El-Haj-Mahmoud ; Sunny Wa= ng ; G Edhaya Chandran ; xypron.glpk@gmx.de =D6=F7=CC=E2: [edk2-devel] Return EFI_INVALID_PARAMETER if attribute only h= as EFI_VARIABLE_NON_VOLATILE set =20 Hi Liming, Hao, and all =20 Now we=A1=AFre checking the SCT runtime variable service test case. https://github.com/tianocore/edk2-test/blob/92a0343c1553342c53fae9d9d646b76= 3 add232c0/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices= / BlackBoxTest/VariableServicesBBTestConformance.c#L3401 and have a question below.=20 =20 Is there any use case to call the runtime variable service functions with the Attributes that only has EFI_VARIABLE_NON_VOLATILE set?=20 =20 We checked UEFI spec, documents, and current EDK2 implementation. There is no specific description or any implementation for this. However, there seem= s an implication that EFI_VARIABLE_NON_VOLATILE must be set with at least EFI_VARIABLE_BOOTSERVICE_ACCESS. Actually, it looks like making NO sense t= o have a variable attribute combination that doesn=A1=AFt have any XXXXX_ACCE= SS attribute (BS, RT, or AT) set. =20 Therefore, we think only having EFI_VARIABLE_NON_VOLATILE set may be an invalid case and would like to add a check into the EDK2 variable driver to return EFI_INVALID_PARAMETER. What do you guys think? =20 Best Regards, Sunny =20 =20 =20 =20 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.=20 ------=_NextPart_000_003D_01D7C725.202FF450 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Sunny:

 Yes. Only E= FI_VARIABLE_NON_VOLATILE attribute can=A1=AFt be used by any module. So, I = also think it is the invalid case.

=  

Thanks

Liming

=B7=A2=BC=FE=C8=CB:= devel@edk2.gr= oups.io <devel@edk2.groups.io> =B4=FA=B1=ED Sunny Wang
=B7=A2= =CB=CD=CA=B1=BC=E4: 2021=C4=EA10=D4=C221= =C8=D5 18:19
=CA=D5=BC=FE=C8=CB: Wu, Hao A <hao.a.wu@intel.com&g= t;; gaoliming <gaoliming@byosoft.com.cn>; edk2-devel-groups-io <de= vel@edk2.groups.io>
=B3=AD=CB=CD:= Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.c= om>; Sunny Wang <Sunny.Wang@arm.com>; G Edhaya Chandran <Edhaya= .Chandran@arm.com>; xypron.glpk@gmx.de
=D6=F7=CC=E2: [edk2-devel] Return EFI_INVALID_= PARAMETER if attribute only has EFI_VARIABLE_NON_VOLATILE set

&nb= sp;

Hi Liming, Hao,= and all

=  

Now we=A1=AF= re checking the SCT runtime variable service test case. https://github.com/tianoc= ore/edk2-test/blob/92a0343c1553342c53fae9d9d646b763add232c0/uefi-sct/SctPkg= /TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableSe= rvicesBBTestConformance.c#L3401 and have a question below. <= /span>

 <= /p>

Is there any use case to call th= e runtime variable service functions with the Attributes that only has EFI_= VARIABLE_NON_VOLATILE set?

 

We checked UEFI spec, documents, and current EDK2 implementation. = There is no specific description or any implementation for this. However, t= here seems an implication that EFI_VARIABLE_NON_VOLATILE must be set with a= t least EFI_VARIABLE_BOOTSERVICE_ACCESS.  Actually, it looks like maki= ng NO sense to have a variable attribute combination that doesn=A1=AFt have= any XXXXX_ACCESS attribute (BS, RT, or AT) set.

 

Therefore, we think only having EFI_VARIABLE_NO= N_VOLATILE set may be an invalid case and would like to add a check into th= e EDK2 variable driver to return EFI_INVALID_PARAMETER.  What do you g= uys think?

 

Best Regar= ds,

Sunny=

 <= /span>

 <= /p>

 

 

IMPORTANT NOTICE: The contents of this email a= nd any attachments are confidential and may also be privileged. If you are = not the intended recipient, please notify the sender immediately and do not= disclose the contents to any other person, use it for any purpose, or stor= e or copy the information in any medium. Thank you.

<= div>

------=_NextPart_000_003D_01D7C725.202FF450--