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.web09.16937.1644198208184706540 for ; Sun, 06 Feb 2022 17:43:29 -0800 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 ; Mon, 07 Feb 2022 09:43:20 +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: , , "'Sami Mujawar'" , "'Christopher Jones'" Cc: , , "'nd'" References: <20211214123736.10854-1-christopher.jones@arm.com> <3c7731ad-7036-fc92-3c2e-8748b760714f@nuviainc.com> In-Reply-To: <3c7731ad-7036-fc92-3c2e-8748b760714f@nuviainc.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDEvMV0gU2hlbGxQa2c6IEZpeCBpbmNvcnJlY3QgUFBUVCBGbGFnTmFtZSBkZXJlZmVyZW5jZQ==?= Date: Mon, 7 Feb 2022 09:43:22 +0800 Message-ID: <004801d81bc4$176785b0$46369110$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQD0EHuZomzRXoAuM2yRE5sYfBacBQGZy+cUAUBULw6uOJYlMA== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0049_01D81C07.258CE890" Content-Language: zh-cn ------=_NextPart_000_0049_01D81C07.258CE890 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable PR https://github.com/tianocore/edk2/pull/2495 is created for this patch.= =20 =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Rebecca Cran =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B42=E6=9C=881=E6=97=A5 7:3= 3 =E6=94=B6=E4=BB=B6=E4=BA=BA: Sami Mujawar ; Christoph= er Jones ; devel@edk2.groups.io =E6=8A=84=E9=80=81: ray.ni@intel.com; zhichao.gao@intel.com; nd =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect= PPTT FlagName dereference =20 It looks like this hasn't been committed yet - I still get a crash when run= ning acpiview on my Overdrive 1000 system, and see the original code is sti= ll on the latest master. Could someone commit it please? =20 --=20 Rebecca Cran =20 On 12/14/21 09:08, Sami Mujawar wrote: Hi Chris, =20 Thanks for fixing this issue. =20 Reviewed-by: Sami Mujawar =20 Regards, =20 Sami Mujawar =20 From: Chris Jones Date: Tuesday, 14 December 2021 at 12:38 To: devel@edk2.groups.io Cc: ray.ni@intel.com = , zhichao.gao@intel.com = , rebecca@nuviainc.co= m , Sami Mujawar , nd Subject: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Bugzilla: 3770 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3770) The PPTT parser in AcpiView incorrectly dereferences a pointer to FlagName when trying to log an error with the PPTT cache flags, which can lead to random crashes and other errors. Also fix some spacing in the error message to ensure the message is printed cleanly. Signed-off-by: Chris Jones --- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 6= +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/Pptt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttPa= rser.c index 8d52bb5e4811298ddc45cdaef41150f6ee7819af..53777644580e779adab4e8047ea= 279e1c0de14a3 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.= c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.= c @@ -40,9 +40,9 @@ LogCacheFlagError ( IncrementErrorCount (); Print ( L"\nERROR: On Arm based systems, all cache properties must be" - L"provided in the cache type structure." - L"Missing '%s' flag.", - *FlagName + L" provided in the cache type structure." + L" Missing '%s' flag.", + FlagName ); } =20 --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") ------=_NextPart_000_0049_01D81C07.258CE890 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

PR https://github.com/tianocore/edk2/pull/2495 is created for this patch.=

 

<= p class=3DMsoNormal>Thanks

Li= ming

=E5=8F=91=E4=BB=B6=E4= =BA=BA: devel@edk2.groups.io <dev= el@edk2.groups.io> =E4=BB=A3=E8=A1=A8 Rebecca Cran
=E5=8F= =91=E9=80=81=E6=97=B6=E9=97=B4: 2022= =E5= =B9=B42=E6=9C=881=E6=97= =A5 7:33
=E6=94=B6=E4=BB=B6=E4=BA=BA: Sami Mujawar <Sami.Mujawar@a= rm.com>; Christopher Jones <Christopher.Jones@arm.com>; devel@edk2= .groups.io
=E6=8A=84=E9=80=81: ray.ni@intel.com; zhichao.gao@intel.com; nd <nd@arm.co= m>
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT F= lagName dereference

 

It looks like this hasn't been committe= d yet - I still get a crash when running acpiview on my Overdrive 1000 syst= em, and see the original code is still on the latest master.

Could someone commit it please?

 

--
Rebecca Cran

&nb= sp;

On 12/14/2= 1 09:08, Sami Mujawar wrote:

Hi Chris,

 

Thanks for f= ixing this issue.

 

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

 

Regards,

 <= /p>

Sami Mujawar

 

From: Chris Jones <christopher.jones@arm.com>
= Date: Tuesday, 14 December 2021 at 12:38
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ray.ni@intel.com <ray.ni@intel.com>, zhichao.gao@intel.com <z= hichao.gao@intel.com>, rebec= ca@nuviainc.com <rebecca@nuv= iainc.com>, Sami Mujawar <= ;Sami.Mujawar@arm.com>, nd <nd@arm.= com>
Subject: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT = FlagName dereference

<= div>

Bugzilla: 3770 (https://bugzilla.tianocore.org/show_bug.c= gi?id=3D3770)

The PPTT parser in AcpiView incorrectly dereferenc= es a pointer to
FlagName when trying to log an error with the PPTT cache= flags, which
can lead to random crashes and other errors.

Also f= ix some spacing in the error message to ensure the message is
printed cl= eanly.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
---
 ShellPkg/L= ibrary/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 6 +++---
=  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/S= hellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c b/She= llPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
inde= x 8d52bb5e4811298ddc45cdaef41150f6ee7819af..53777644580e779adab4e8047ea279e= 1c0de14a3 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Pars= ers/Pptt/PpttParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib= /Parsers/Pptt/PpttParser.c
@@ -40,9 +40,9 @@ LogCacheFlagError (
&nbs= p;  IncrementErrorCount ();
   Print (
  &nb= sp;  L"\nERROR: On Arm based systems, all cache properties must b= e"
-    L"provided in the cache type structure.= "
-    L"Missing '%s' flag.",
- &n= bsp;  *FlagName
+    L" provided in the cache t= ype structure."
+    L" Missing '%s' flag."= ;,
+    FlagName
     );
 = }
 
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759"= )

------=_NextPart_000_0049_01D81C07.258CE890--