* [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
@ 2021-12-14 12:37 Chris Jones
2021-12-14 14:57 ` Rebecca Cran
2021-12-14 16:08 ` Sami Mujawar
0 siblings, 2 replies; 5+ messages in thread
From: Chris Jones @ 2021-12-14 12:37 UTC (permalink / raw)
To: devel; +Cc: ray.ni, zhichao.gao, rebecca, Sami.Mujawar, nd
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")
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
2021-12-14 12:37 [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Chris Jones
@ 2021-12-14 14:57 ` Rebecca Cran
2021-12-14 16:08 ` Sami Mujawar
1 sibling, 0 replies; 5+ messages in thread
From: Rebecca Cran @ 2021-12-14 14:57 UTC (permalink / raw)
To: Chris Jones, devel; +Cc: ray.ni, zhichao.gao, Sami.Mujawar, nd
Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>
Thanks, I'm now seeing:
ERROR: On Arm based systems, all cache properties must be provided in
the cache
type structure. Missing 'Write Policy Valid' flag.
--
Rebecca Cran
On 12/14/21 5:37 AM, Chris Jones wrote:
> 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
> );
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
2021-12-14 12:37 [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Chris Jones
2021-12-14 14:57 ` Rebecca Cran
@ 2021-12-14 16:08 ` Sami Mujawar
2022-01-31 23:32 ` Rebecca Cran
1 sibling, 1 reply; 5+ messages in thread
From: Sami Mujawar @ 2021-12-14 16:08 UTC (permalink / raw)
To: Christopher Jones, devel@edk2.groups.io
Cc: ray.ni@intel.com, zhichao.gao@intel.com, rebecca@nuviainc.com, nd
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]
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")
[-- Attachment #2: Type: text/html, Size: 5057 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
2021-12-14 16:08 ` Sami Mujawar
@ 2022-01-31 23:32 ` Rebecca Cran
2022-02-07 1:43 ` 回复: [edk2-devel] " gaoliming
0 siblings, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2022-01-31 23:32 UTC (permalink / raw)
To: Sami Mujawar, Christopher Jones, devel@edk2.groups.io
Cc: ray.ni@intel.com, zhichao.gao@intel.com, nd
[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]
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")
>
[-- Attachment #2: Type: text/html, Size: 7285 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
2022-01-31 23:32 ` Rebecca Cran
@ 2022-02-07 1:43 ` gaoliming
0 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2022-02-07 1:43 UTC (permalink / raw)
To: devel, rebecca, 'Sami Mujawar',
'Christopher Jones'
Cc: ray.ni, zhichao.gao, 'nd'
[-- Attachment #1: Type: text/plain, Size: 3093 bytes --]
PR https://github.com/tianocore/edk2/pull/2495 is created for this patch.
Thanks
Liming
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran
发送时间: 2022年2月1日 7:33
收件人: Sami Mujawar <Sami.Mujawar@arm.com>; Christopher Jones <Christopher.Jones@arm.com>; devel@edk2.groups.io
抄送: ray.ni@intel.com; zhichao.gao@intel.com; nd <nd@arm.com>
主题: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference
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 <mailto:sami.mujawar@arm.com> <sami.mujawar@arm.com>
Regards,
Sami Mujawar
From: Chris Jones <mailto:christopher.jones@arm.com> <christopher.jones@arm.com>
Date: Tuesday, 14 December 2021 at 12:38
To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io> <devel@edk2.groups.io>
Cc: ray.ni@intel.com <mailto:ray.ni@intel.com> <mailto:ray.ni@intel.com> <ray.ni@intel.com>, zhichao.gao@intel.com <mailto:zhichao.gao@intel.com> <mailto:zhichao.gao@intel.com> <zhichao.gao@intel.com>, rebecca@nuviainc.com <mailto:rebecca@nuviainc.com> <mailto:rebecca@nuviainc.com> <rebecca@nuviainc.com>, Sami Mujawar <mailto:Sami.Mujawar@arm.com> <Sami.Mujawar@arm.com>, nd <mailto:nd@arm.com> <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 <mailto:christopher.jones@arm.com> <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")
[-- Attachment #2: Type: text/html, Size: 9328 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-07 1:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 12:37 [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Chris Jones
2021-12-14 14:57 ` Rebecca Cran
2021-12-14 16:08 ` Sami Mujawar
2022-01-31 23:32 ` Rebecca Cran
2022-02-07 1:43 ` 回复: [edk2-devel] " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox