From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web08.40838.1643671955627375275 for ; Mon, 31 Jan 2022 15:32:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=mi04OlTy; spf=pass (domain: nuviainc.com, ip: 209.85.210.182, mailfrom: rebecca@nuviainc.com) Received: by mail-pf1-f182.google.com with SMTP id n32so14216315pfv.11 for ; Mon, 31 Jan 2022 15:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to; bh=TEjn6EfQFtyiF5GvZ6UQGto2OpfpHQGm14bjQ3ezedk=; b=mi04OlTyXdJ2mBGQCyfSfKuVIl4dZtUOAFziqT3lczIIFNmuYNBEGGE72cZ/3GKKCg SmQUSP7HfKdmbRTK4jvrOUQvssxldZ2WKlFXMODTrrSwcAFdYT09QT8ZFn6Q1yI91Fyt IuSdoRhRXSA3A463OtieZYxJsQ4wXZzKsNpM69ALxEzH4asdllb7oyMYY8uBUUQSNyu1 Q/MMjJu3Kadiec4CWN84UIFZV48dZ4nb8RwII5bjlaxw/CymoucnHZfqfLGQXeQAx1kD J+d1f/pUqYzGWP7yOl6s9uzVK6nQOhg/syywF7AIC6qlMpLZBF+f67eO7PH1aI0udtFT reTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to; bh=TEjn6EfQFtyiF5GvZ6UQGto2OpfpHQGm14bjQ3ezedk=; b=3YW9j+TOiMTc3x/B9TYu/CkjcR7q1i11iwEX+dmg28zokWH5YXi8oXKzOpk8YC1zfd wbZsfwG2N4QwNDBS9dyV6Fq8KlKt79h0LJ3eBZKrjgcjcKTI4Z0GatgfIDVSl6X4Ldj+ JAdpvRVGnMujMhTF7v+6xL2YDqLplXdWQrfln2MyTerjADshxBbowLSxo2IL00cGWQv/ k4OZD0jgx4T9vxpH9f/I54WhRmrAwxTyEEdhcxGV+Oj1U0BwSECu1eN1fkIGuqt7TL+g rUh1N1lv6709ZejmYW0qyDz1A8uKAvrphDn7H5jWsQiaVhDNtdG7xhH2sQvdrant/B1p xOZg== X-Gm-Message-State: AOAM531S68nQdoibQCkH1zang7nViJFrOqbFCg27OcS2xPni1BBgGrUV 4uvzf/GwtSpplzruSUwz2vsHMQ== X-Google-Smtp-Source: ABdhPJwU85ID9aSCwV70xLjcK/5xb+YjLhBED8Fr1gPie4lCHJzElFg/LAALbeuaQVOObrXFXCDyhw== X-Received: by 2002:a63:6807:: with SMTP id d7mr18727005pgc.391.1643671955065; Mon, 31 Jan 2022 15:32:35 -0800 (PST) Return-Path: Received: from ?IPV6:2601:681:4300:69e:9e7b:efff:fe2b:884c? ([2601:681:4300:69e:9e7b:efff:fe2b:884c]) by smtp.gmail.com with ESMTPSA id p17sm15410859pfo.11.2022.01.31.15.32.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jan 2022 15:32:34 -0800 (PST) Message-ID: <3c7731ad-7036-fc92-3c2e-8748b760714f@nuviainc.com> Date: Mon, 31 Jan 2022 16:32:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference To: Sami Mujawar , Christopher Jones , "devel@edk2.groups.io" Cc: "ray.ni@intel.com" , "zhichao.gao@intel.com" , nd References: <20211214123736.10854-1-christopher.jones@arm.com> From: Rebecca Cran In-Reply-To: Content-Type: multipart/alternative; boundary="------------Wb82S7aXhtmf0MDjq0K98FDq" Content-Language: en-US --------------Wb82S7aXhtmf0MDjq0K98FDq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit It looks like this hasn't been committed yet - I still get a crash when running acpiview on my Overdrive 1000 system, and see the original code is still on the latest master. Could someone commit it please? -- Rebecca Cran On 12/14/21 09:08, Sami Mujawar wrote: > > Hi Chris, > > Thanks for fixing this issue. > > Reviewed-by: Sami Mujawar > > Regards, > > Sami Mujawar > > *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.com , > Sami Mujawar , nd > *Subject: *[PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName > dereference > > Bugzilla: 3770 (https://bugzilla.tianocore.org/show_bug.cgi?id=3770) > > 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/PpttParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c > index > 8d52bb5e4811298ddc45cdaef41150f6ee7819af..53777644580e779adab4e8047ea279e1c0de14a3 > 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 >      ); >  } > > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") > --------------Wb82S7aXhtmf0MDjq0K98FDq Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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

Could someone commit it please?


--
Rebecca Cran


On 12/14/21 09:08, Sami Mujawar wrote:

Hi Chris,

 

Thanks for fixing this issue.

 

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

 

Regards,

 

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 <zhichao.gao@intel.com>, rebecca@nuviainc.com <rebecca@nuviainc.com>, Sami Mujawar <Sami.Mujawar@arm.com>, nd <nd@arm.com>
Subject: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference

Bugzilla: 3770 (https://bugzilla.tianocore.org/show_bug.cgi?id=3770)

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 <christopher.jones@arm.com>
---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
index 8d52bb5e4811298ddc45cdaef41150f6ee7819af..53777644580e779adab4e8047ea279e1c0de14a3 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
     );
 }
 
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

--------------Wb82S7aXhtmf0MDjq0K98FDq--