From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.47]) by mx.groups.io with SMTP id smtpd.web12.27976.1639498136680883146 for ; Tue, 14 Dec 2021 08:08:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=lXeXjQDp; spf=pass (domain: arm.com, ip: 40.107.0.47, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nm5ArY8375V3vGVXg3KiOlGfVCG+2LSa3jfZF9s7sIk=; b=lXeXjQDpQgG8NntnWNtajlGInglvHTgJ4rIUJC6Xp8voTztqSLfyzn4Iq5InA4/6tvu2fzGs3DKCXFAt72pKohq+wZN2OV+ktPF0seOJJuQPC69g2srvboPp82lBh9bvcXi3L1FY74943f8MfNgcyy67+9r8v928SiEdWkrscok= Received: from DB6P193CA0023.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::33) by PAXPR08MB6621.eurprd08.prod.outlook.com (2603:10a6:102:dc::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.16; Tue, 14 Dec 2021 16:08:53 +0000 Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::7f) by DB6P193CA0023.outlook.office365.com (2603:10a6:6:29::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Tue, 14 Dec 2021 16:08:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Tue, 14 Dec 2021 16:08:53 +0000 Received: ("Tessian outbound 1cd1a01725a6:v110"); Tue, 14 Dec 2021 16:08:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e7a3977759979823 X-CR-MTA-TID: 64aa7808 Received: from d7235e0e116d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2E9B6426-AC01-402C-9F07-61A3987DA7E5.1; Tue, 14 Dec 2021 16:08:45 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d7235e0e116d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 14 Dec 2021 16:08:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GvVR0qJoTmAbWMISsZz0Zdte6PH/DZvNgxbdMFB/z7c6zNhVhTdDlLJ8K2abpiz6wQpie7BP5g5RPoJ0kPn7G+sf9Wyg1aGOOh3C3+u787tuT7sqeqjsuz5OxNQV3k2EOfSW6DIeIB85ftZjEsvD8yasitzXa9HMsdVmFjvpnLj/X5yVCshh668fiBLnHUPh6gUYxnzI2B+uyYDkYf+NM+mduH5GOyUfYm+dMfh1VAo9Amj90QjH0JC/VLhdTfxJUa6t89zraryOmDMs/ONq6ZCUeLXr8E3RMHcR/EtJsoa4RqtYgeZBvdoytBIdfUOHmzCiQpRiG75zXv3p9/iWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nm5ArY8375V3vGVXg3KiOlGfVCG+2LSa3jfZF9s7sIk=; b=j78BzdWNaNJj0DgkEZKQx0EP3xMkh8ryfusLt7QQ201I/TkPA8IwbOjQnUTvPthK16+tPUDq9q3pUf7niGJbaEkxS8W9kJQHVCKV6gTtc37dMjEoUEzlpdNb2u6NKm9kMNkxNOeQpdTMzmwSrSjj2gUvGFi+w/H4JUJkEXIFNPL/3OxdPZFqYN0cBLHc8lQiuv7Kct6RGx82dy+C/zOLi7J7cmVG1+SHYt3V1XdiGAwuXa8sOCEABaV6ehdmv2DEpaN/Y+koiwKufKG3JYy5IuAMusRNlpih+maawIzZZCCXf3uTSW6Bl9KzO3hvksJqui27EORkd4O+idKEa4zEfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nm5ArY8375V3vGVXg3KiOlGfVCG+2LSa3jfZF9s7sIk=; b=lXeXjQDpQgG8NntnWNtajlGInglvHTgJ4rIUJC6Xp8voTztqSLfyzn4Iq5InA4/6tvu2fzGs3DKCXFAt72pKohq+wZN2OV+ktPF0seOJJuQPC69g2srvboPp82lBh9bvcXi3L1FY74943f8MfNgcyy67+9r8v928SiEdWkrscok= Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB5080.eurprd08.prod.outlook.com (2603:10a6:20b:e2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.13; Tue, 14 Dec 2021 16:08:35 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::bdcf:cfa6:b2bb:38ac]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::bdcf:cfa6:b2bb:38ac%6]) with mapi id 15.20.4755.021; Tue, 14 Dec 2021 16:08:35 +0000 From: "Sami Mujawar" To: Christopher Jones , "devel@edk2.groups.io" CC: "ray.ni@intel.com" , "zhichao.gao@intel.com" , "rebecca@nuviainc.com" , nd Subject: Re: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Thread-Topic: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference Thread-Index: AQHX8Od0aFj9FdgmqEq+8LBp71EAbqwyJ5Ta Date: Tue, 14 Dec 2021 16:08:35 +0000 Message-ID: References: <20211214123736.10854-1-christopher.jones@arm.com> In-Reply-To: <20211214123736.10854-1-christopher.jones@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: cefa194c-fb17-4278-61ef-08d9bf1c0638 x-ms-traffictypediagnostic: AM6PR08MB5080:EE_|DB5EUR03FT014:EE_|PAXPR08MB6621:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2043;OLM:2043; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ZVc/JlVOnw35H0u4TeUgJ8oGzxFxEk7x8OEt9h+fAFwutbdyGnxe3dHKQwIpN4xwlPJ+5H2+/nc0LySUjgQzcZ8EiVcs+nV1kWodiRp4sQWJHKFIyX5GUlIZSP5XAb9A5ZyG06zRXyPW4st21tVl9PVoHsYwsVn6TgFa2habSFMKr4yfgCbgoLVRBH/az9Dr94UZQzSC4EMWg0aYkpJD+uxvZXlpe76/QHiYEIgaTIlMoA4ngFHM5IkkLg4Eco3ntPZM34Vj3UHnOiOCubj2pirY0KPfEzDXAZ9iQ+ag5/hv8avZ8BOepJ3RvwygB4TqMS2fMGdQWxMxIjNPt9yNryL4SZ8pWfk42cUlXkfST9q5p47IioSksd3Xs43qLzpVniEhhZzeBSXrRn5r7/wLxNLDbfXKqV+pl6BQMxD8CODO/PVUe1dXWQvZrrS8IIflkeDrHBrLGb4LF061k7Xw+dPQ4sxb+hV+jqxRHjwWmESHJGs6/aSJVDqT5Y6kLhPxeDh7yCa67dkkp03sh2jEJWQ589W0CNMSxJ4+MOnq0ni/hDl1D1N8715brkSdK0R6bQ3L1ZDV5YyuUntePPSCrgaf4ZY0UXh2PPKW6mvAO8vRHDaxt76YTtIQSI+Q3Cx6GwXyzOOndGJjbjB+UOtCW/W59/K/9yOtTpolb9ph8Qc7ubBJkCjyIvA9v92i6c7u1bcNV1e4Mi2D3WeME+w7pUN5w99fgydALeDnV/SbJNQFc7ZuG31RU/UHV8i8cw/wpoaSwaxpIRMjevVIPcRAWFgDopBOeZiaWH7JqPFn9Q4= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(9686003)(26005)(52536014)(186003)(8936002)(2906002)(86362001)(5660300002)(508600001)(33656002)(55016003)(8676002)(66556008)(66446008)(38070700005)(91956017)(53546011)(66946007)(38100700002)(83380400001)(166002)(316002)(4326008)(64756008)(9326002)(66476007)(54906003)(122000001)(110136005)(7696005)(76116006)(71200400001)(6506007);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5080 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a36f3c05-36e3-4293-6978-08d9bf1bfb9f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sIGXveFpbLxLSKwbw/hvOCbLYlg/rIlz5wsM/v9GafVXNGA0NFNMXwKcZ4q5HwXNxiW7tO/gzuo5CqR+ZHX099K+p60+udjs78yQ3xAh7LyRUpDRwA5glVpB255m0rgV55qW5DWILtWl0qPSxzNaF/tFpA3/uPMEV9/ibNOnHn2pbBn90WFlBKCbMiJdTab+a2hxSoaegB/YGzvNpoYhi6mmccSl2IQNnzgUoxLUFTeeeE0I93RisjJk3R3kRXJeCM5mopE1cTjSdq7o3hHDO+B9etgjSIE/2lsVWGUFx73IqX3b/jxMTYc/LbzWP5mMxGbuZOpynG85MjaR4+0Zk2Lpylr7r7WCQjnjddAvNs3P0vdcXIEP26olKzjd+cJL3bmFcdSvy3Rs7PUlEWJoeEpQKYxz4gGjm3KoTqiVnBK0gtKx8ZUynASayJv+pLdyhVIikSuh4Wqbkh/YlAATEjs4LkQ85/jHGOdFz9iqOnfT+MDTMpmqRmlkQJ+olsrvczBGksYuH0R/YVaU9AhtMpzFl28K6yBcbsVY4s6VeU5aNsxiQXx+/WL/ntpLLXqtpqCtCMDGWEQReFdXNInzb/cHUGX9+UGbwxK2VPJo0H34EO+VfK00psxuuzJTeTJD6NxbD+swMBq+WTQuiwBtqJfsR6lyPLFglet9gzZJ2EQbBsGlldu+KBjo0CQbUr21XO+/k2QGWgaroX6Yszsp2sF1gdGNFrOpDYruUNFVhWTDxqY0kgQsnyse0auZZRHHJYJSQasXd5Lfp/yCX7vA6l6D+H8WGNg4SdamCqm4PiELCGi6O+v3GvyDd9A9ApOdcixJhc//C5zms9KZGLBY4I2THgDBaj/xiJG8LRpkbTk= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(2906002)(52536014)(9326002)(9686003)(82310400004)(110136005)(4326008)(336012)(70586007)(55016003)(8936002)(86362001)(54906003)(26005)(40460700001)(7696005)(33656002)(36860700001)(166002)(8676002)(6506007)(186003)(81166007)(53546011)(83380400001)(47076005)(316002)(356005)(508600001)(5660300002)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2021 16:08:53.3983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cefa194c-fb17-4278-61ef-08d9bf1c0638 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6621 Content-Language: en-GB Content-Type: multipart/alternative; boundary="_000_AS8PR08MB6806D60EDD808D6A56C86EB084759AS8PR08MB6806eurp_" --_000_AS8PR08MB6806D60EDD808D6A56C86EB084759AS8PR08MB6806eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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=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 ); } -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") --_000_AS8PR08MB6806D60EDD808D6A56C86EB084759AS8PR08MB6806eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Chris,

 

Thanks for fixing this issue.

 

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

 

Regards,

 

Sami Mujawar

 

From: Chris Jones <chr= istopher.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.c= om>, Sami Mujawar <Sami.Mujawar@arm.com>, nd <nd@arm.com> Subject: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName derefe= rence

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 <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/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 pr= operties 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")

--_000_AS8PR08MB6806D60EDD808D6A56C86EB084759AS8PR08MB6806eurp_--