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.web10.1725.1621646587249797072 for ; Fri, 21 May 2021 18:23:08 -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 ([101.224.112.124]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sat, 22 May 2021 09:23:04 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 101.224.112.124 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Laszlo Ersek'" Cc: "'Hao A Wu'" , "'Jian J Wang'" , "'Kinney, Michael D'" , =?gb2312?B?J1BoaWxpcHBlIE1hdGhpZXUtRGF1ZKimJw==?= References: <20210521204037.11980-1-lersek@redhat.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW0VYVEVSTkFMXSBbZWRrMi1zdGFibGUyMDIxMDUgUEFUQ0hdIE1kZU1vZHVsZVBrZy9WYXJpYWJsZUxvY2s6IGRvd25ncmFkZSBjb21wYXRpYmlsaXR5IHdhcm5pbmdzIHRvIERFQlVHX1dBUk4=?= Date: Sat, 22 May 2021 09:23:05 +0800 Message-ID: <00a401d74ea9$03f70980$0be51c80$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLsUnXzYcER85r9rYce/4rr5cl+8QK9i+HMqK7AluA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_00A5_01D74EEC.121B5AF0" Content-Language: zh-cn ------=_NextPart_000_00A5_01D74EEC.121B5AF0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao =20 I am ok to merge this patch for stable tag 202105.=20 =20 Thanks Liming =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Bret Barkelew via groups.io =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA5=D4=C222=C8=D5 4:43 =CA=D5=BC=FE=C8=CB: Laszlo Ersek ; edk2-devel-groups-io =B3=AD=CB=CD: Hao A Wu ; Jian J Wang ; Liming Gao ; Kinney, Michael D ; Philippe Mathieu-Daud=A8=A6 =D6=F7=CC=E2: Re: [edk2-devel] [EXTERNAL] [edk2-stable202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility warnings to DEBUG_WARN =20 Reviewed-by: Bret Barkelew bret.barkelew@microsoft.com =20 =20 I don=A1=AFt regret making it ERROR at first because now no one can claim = to have not been warned when the interface drops, but I agree that lowering t= o WARN now is prudent. =20 - Bret=20 =20 From: Laszlo Ersek =20 Sent: Friday, May 21, 2021 1:40 PM To: edk2-devel-groups-io =20 Cc: Bret Barkelew ; Hao A Wu ; Jian J Wang ; Liming Gao ; Kinney, Michael D ; Philippe Mathieu-Daud=A8=A6 =20 Subject: [EXTERNAL] [edk2-stable202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility warnings to DEBUG_WARN =20 Commit a18a9bde36d2 ("MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior", 2020-12-15), for bug 3111, added two such sets of debug messages that: (a) are relevant for developers, (b) yet should not necessarily poke end-users, because no functionality suffers in practice. Both message sets are in function VariableLockRequestToLock(): the first is a generic interface deprecation warning; the second is the double-locking situation, which we permit for compatibility (return status EFI_SUCCESS). Both message sets should be emitted with the DEBUG_WARN mask, not the most serious DEBUG_ERROR mask. On some platforms, the serial console carries both terminal traffic, and grave (DEBUG_ERROR-only) log messages. On such platforms, both message sets may be perceived as a nuisance by end-users, as there is nothing they can do, and there's nothing they *should* do -- in practice, nothing malfunctions. (Such a platform is ArmVirtQemu, built with "-D DEBUG_PRINT_ERROR_LEVEL=3D0x80000000".) Cc: Bret Barkelew > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Liming Gao = > Cc: Michael D Kinney > Cc: Philippe Mathieu-Daud=A8=A6 > Ref: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzil= la.t ianocore.org%2Fshow_bug.cgi%3Fid%3D3410 &data=3D04%7C01%7Cbret.barkelew%40microsoft.com%7Ca7ff677adbc34cf62f06= 08d9 1c98b5b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572264482965812%7= CU nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL= CJ XVCI6Mn0%3D%7C1000&sdata=3D2WuJ06k2ViIR6JnQVRmsGdsnYjmOrPUtGD82thYLe%2= FU%3 D&reserved=3D0 Fixes: a18a9bde36d2ffc12df29cdced1efa1f8f9f2021 Signed-off-by: Laszlo Ersek = > --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c | = 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c index 7d87e50efdcd..4e1efef9a7e4 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock= .c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock= .c @@ -48,9 +48,9 @@ VariableLockRequestToLock ( EFI_STATUS Status; VARIABLE_POLICY_ENTRY *NewPolicy; =20 - DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__)); - DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n")); - DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName)); + DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__)); + DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n")); + DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName)); =20 NewPolicy =3D NULL; Status =3D CreateBasicVariablePolicy( @@ -69,13 +69,13 @@ VariableLockRequestToLock ( // // If the error returned is EFI_ALREADY_STARTED, we need to check the // current database for the variable and see whether it's locked. If it's - // locked, we're still fine, but also generate a DEBUG_ERROR message = so the + // locked, we're still fine, but also generate a DEBUG_WARN message s= o the // duplicate lock can be removed. // if (Status =3D=3D EFI_ALREADY_STARTED) { Status =3D ValidateSetVariable (VariableName, VendorGuid, 0, 0, NUL= L); if (Status =3D=3D EFI_WRITE_PROTECTED) { - DEBUG ((DEBUG_ERROR, " Variable: %g %s is already locked!\n", VendorGuid, VariableName)); + DEBUG ((DEBUG_WARN, " Variable: %g %s is already locked!\n", VendorGuid, VariableName)); Status =3D EFI_SUCCESS; } else { DEBUG ((DEBUG_ERROR, " Variable: %g %s can not be locked!\n", VendorGuid, VariableName)); --=20 2.19.1.3.g30247aa5d201 =20 ------=_NextPart_000_00A5_01D74EEC.121B5AF0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

 

I am ok= to merge this patch for stable tag 202105.

 

Thanks

=

Liming

=B7=A2=BC=FE=C8=CB: de= vel@edk2.groups.io <devel@edk2.groups.io> =B4=FA=B1=ED Bret Barkelew via groups.io
=B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA5=D4=C222=C8=D5 4:43
=CA=D5= = =BC=FE=C8=CB: Laszlo Erse= k <lersek@redhat.com>; edk2-devel-groups-io <devel@edk2.groups.io&= gt;
=B3=AD=CB=CD: Hao A Wu <hao.a.wu@intel.com>; Jian J Wang <jian.j.wang@intel= .com>; Liming Gao <gaoliming@byosoft.com.cn>; Kinney, Michael D &l= t;michael.d.kinney@intel.com>; Philippe Mathieu-Daud=A8=A6 <philmd@redhat.com>
=D6=F7=CC=E2: Re: [edk2-devel] [EXTERNAL] [edk2= -stable202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility war= nings to DEBUG_WARN

 

<= span lang=3DEN-US>Reviewed-by: Bret Barkelew bret.barkelew@microsoft.com

 

I don=A1=AFt regret making it ERROR at first be= cause now no one can claim to have not been warned when the interface drops= , but I agree that lowering to WARN now is prudent.

 

- Bret

 

From: Laszlo Ersek
Sent: Friday, May= 21, 2021 1:40 PM
To: edk= 2-devel-groups-io
Cc: Bret Barkelew; Hao A Wu; Jian J Wang; Liming Gao; Kinney, Michael D; Philippe Mathieu-Daud=A8=A6
Subject: [EXTERNAL] [edk2-stab= le202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility warnings= to DEBUG_WARN

 

Commit a18a9bde36d2 ("MdeModulePkg/V= ariable/RuntimeDxe: Restore Variable
Lock Protocol behavior", 2020-= 12-15), for bug 3111, added two such sets of
debug messages that:
(a) are relevant for developers,

(b) yet should not necessarily pok= e end-users, because no functionality
suffers in practice.

Both m= essage sets are in function VariableLockRequestToLock(): the first
is a = generic interface deprecation warning; the second is the
double-locking = situation, which we permit for compatibility (return status
EFI_SUCCESS)= .

Both message sets should be emitted with the DEBUG_WARN mask, not = the most
serious DEBUG_ERROR mask. On some platforms, the serial console= carries
both terminal traffic, and grave (DEBUG_ERROR-only) log message= s. On such
platforms, both message sets may be perceived as a nuisance b= y end-users,
as there is nothing they can do, and there's nothing they *= should* do --
in practice, nothing malfunctions.

(Such a platform= is ArmVirtQemu, built with "-D
DEBUG_PRINT_ERROR_LEVEL=3D0x8000000= 0".)

Cc: Bret Barkelew <bret.barkelew@microsoft.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wa= ng <jian.j.wang@intel.com&g= t;
Cc: Liming Gao <gaolim= ing@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Philipp= e Mathieu-Daud=A8=A6 <philmd@redhat= .com>
Ref: https://nam06.safelinks.protection.o= utlook.com/?url=3Dhttps%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%= 3D3410&amp;data=3D04%7C01%7Cbret.barkelew%40microsoft.com%7Ca7ff677adbc= 34cf62f0608d91c98b5b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63757226= 4482965812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJB= TiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3D2WuJ06k2ViIR6JnQVRmsGdsnY= jmOrPUtGD82thYLe%2FU%3D&amp;reserved=3D0
Fixes: a18a9bde36d2ffc1= 2df29cdced1efa1f8f9f2021
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 MdeModulePk= g/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c | 10 +++++-----=
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git= a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c b= /MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
= index 7d87e50efdcd..4e1efef9a7e4 100644
--- a/MdeModulePkg/Universal/Var= iable/RuntimeDxe/VariableLockRequestToLock.c
+++ b/MdeModulePkg/Universa= l/Variable/RuntimeDxe/VariableLockRequestToLock.c
@@ -48,9 +48,9 @@ Vari= ableLockRequestToLock (
   EFI_STATUS    &= nbsp;        Status;
   VAR= IABLE_POLICY_ENTRY  *NewPolicy;
 
-  DEBUG ((DEBUG_ERR= OR, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __F= UNCTION__));
-  DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE= !!! Please move to use Variable Policy!\n"));
-  DEBUG ((DEBU= G_ERROR, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", Vendor= Guid, VariableName));
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATED I= NTERFACE !!! %a() will go away soon!\n", __FUNCTION__));
+  DE= BUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Var= iable Policy!\n"));
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATE= D INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));
&nb= sp;
   NewPolicy =3D NULL;
   Status =3D CreateBa= sicVariablePolicy(
@@ -69,13 +69,13 @@ VariableLockRequestToLock (
&n= bsp;    //
     // If the error retur= ned is EFI_ALREADY_STARTED, we need to check the
    = ; // current database for the variable and see whether it's locked. If it's=
-    // locked, we're still fine, but also generate a DE= BUG_ERROR message so the
+    // locked, we're still fine= , but also generate a DEBUG_WARN message so the
    = // duplicate lock can be removed.
     //
 =     if (Status =3D=3D EFI_ALREADY_STARTED) {
  =      Status =3D ValidateSetVariable (VariableName, Vend= orGuid, 0, 0, NULL);
       if (Status =3D= = =3D EFI_WRITE_PROTECTED) {
-        = DEBUG ((DEBUG_ERROR, "  Variable: %g %s is already locked!\n"= ;, VendorGuid, VariableName));
+      &nbs= p; DEBUG ((DEBUG_WARN, "  Variable: %g %s is already locked!\n&qu= ot;, VendorGuid, VariableName));
      &nb= sp;  Status =3D EFI_SUCCESS;
       }= else {
         DEBUG ((DEBUG_E= RROR, "  Variable: %g %s can not be locked!\n", VendorGuid, = VariableName));
--
2.19.1.3.g30247aa5d201

 

------=_NextPart_000_00A5_01D74EEC.121B5AF0--