From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web08.2536.1659985404316641101 for ; Mon, 08 Aug 2022 12:03:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=h+/vz4Kk; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659985404; x=1691521404; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=fgHWZpFpw3AAygMaVXfpv5X+XGba8uuNHBRmt0q85I0=; b=h+/vz4KkZifeTj6FymQHH3PDglhivoIek7Hw0yyR5Tl1ADtc0z9bqYU6 kbNOOyragqMDIn7e5kd1RQf8T00XYX07g8THrN6GDwlqlyQ1IxDGSHVSB QvV95bAYcaScc13uz7COvo4hkLxWSVYtBgpCbqzZw5bO+Of1PTMOcqY2w qIsf16fU0t75hbsKQbJguyNoFEq3LWjnPYbKgcAh7JI7shv7XFaUoCf5P BSFNlkSLAD60L2xNI7VZ7xTxyHIWMPT5KxAbwnKxWtt9D9+TM8IX402/M F6uOnk0SZQdH7T19Y3ehcoh5xHkODY+MKWH3OCWtHm99pukk4TmgDY7E9 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10433"; a="291909465" X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="291909465" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2022 12:03:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="580478719" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 08 Aug 2022 12:03:03 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 8 Aug 2022 12:03:01 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 8 Aug 2022 12:03:01 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Mon, 8 Aug 2022 12:03:01 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Mon, 8 Aug 2022 12:02:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kATVULQavVpC2QJQh7Nx4V+S1ueTFZYDHUwU2D+oj4s9ZGrXwknBWQ4ZBZO80rcmYUFNXo3PfXQrpsYVyTbIGZaSGMM+mtHJMxXatiHpXdPhnssjSXmtRICK9BUmpOtzb03/sQVzKaM7Z2Rk83nXbrzSneiF4DAvxj2MvFZkFMBKFk7ok3h5fKSBz/D0h7k53kU/nAobqplOGXMxZgg1D/OdIT3xAHt4EUXWyo3fw7TWJl6Oi3sDVwwD/5qz4KJ74EJqonrRkRhwzaH6EcU0yMbdzEeH+CFdEHnh1OilTj+mCVq3in2tDho+Kiwh28Tx+WtkQtYMcfrNQFlsOjFmww== 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=2Pn5pbzpuz5d6qZC2WgP/JmQLof4tdfecUsS1TBrYvg=; b=aJE8TdSy/CPUExN25kJ1Ev4cdIEMDoDr7c6DHADmWwE7g1bMhxD7ZQ9xTs9h+ZGVvEi9MXPRn7UzENqOJERzMsLVqJ80wmBFWWRa+2PhZX59/lN9NnVyQYx2VRh+4lKFvrJCPKswdqHJeRfW9J0Kvf6SvJf1xYr6MlyhhSLRZI1cJhRUlE4JxWAL6ntZgstVcQmjiNyrnbjJdNPbiUED8b8dgztgXPlqlVzQgzRjPJmgVKvONDnLVkcTS1QUXGK1+U1t8wTTV2dBx+vNnvEcdzcHFnbcAuau3Hn96NXSCcAoOG8IBaDD0LNO4Yinh6qHSGM6cbu/AudDNFRhqrWKYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SA1PR11MB5801.namprd11.prod.outlook.com (2603:10b6:806:23d::13) by DM4PR11MB5309.namprd11.prod.outlook.com (2603:10b6:5:390::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Mon, 8 Aug 2022 19:02:43 +0000 Received: from SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::203f:2686:96f2:f8fe]) by SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::203f:2686:96f2:f8fe%9]) with mapi id 15.20.5504.016; Mon, 8 Aug 2022 19:02:42 +0000 From: "Oram, Isaac W" To: "devel@edk2.groups.io" , "Oram, Isaac W" , "mikuback@linux.microsoft.com" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "Gao, Liming" , "Dong, Eric" Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Prevent modification of HOB data Thread-Topic: [edk2-devel] [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Prevent modification of HOB data Thread-Index: AQHYqO8JjIW9Tck1902b5IeJ6Z5fja2gwjPQgASevlA= Date: Mon, 8 Aug 2022 19:02:42 +0000 Message-ID: References: <20220805171532.868-1-mikuback@linux.microsoft.com> <17088CED31060862.21918@groups.io> In-Reply-To: <17088CED31060862.21918@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0bafeec1-40e6-4a9d-bcd7-08da79709291 x-ms-traffictypediagnostic: DM4PR11MB5309:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pPEREs22yyv0BWaSDmG6vZmlIlIaKZwhvFSVv3PLusZn8y0oBXiut98Qts6K5nYw9sZyfcSAW2gHY14onyLa5e3/MFBX0urzZUErlqUKXIaTZWdsmnEXybDn06wbCkFDjgfBe1uL4Pg49K9yKlHSd2PLQmHMa6YBY6sFftuzB8cpwQYQfGhBedxfu4JK9atUP9+cqO5TFVfELj/SIO4DAsjKfBeniMPol15UBZl2uPAgboGav2G3HCfRcb795hNHgJVOHZ9CMzBz5B8g5HQBo0iDl5jhFuCF32wuIYHA3qFcVqml0HLrhQuZ4xItI/7kT6Id9qaRmNFiTEjPjK36fqaqiHvaiR1btIqJv9qpSgwuBRJ5DlXTXlZ67G3FyxoI2XeG2PNIqyuc36T5x35SGNxthyBm+J16xdBigDbiaJJVWYd6sp6NI2SAZ28sTbLfNSd8zy4aPnzhLjFp+wdKklALRRtERmUXtZl/wheoc/5ruovM9w+xd0lxb9bq0OoMlvMtKApxSpr7nEBgh27dpf7AoXpbjblOjeB4Gbzj0fKh0mwPbjtNcfCSStEo2JkAV7VYHzzoj/etN+Kg6YhmHlt64844I+42IkUhbpiLxLp6LSK5sYklfTCSbMkk+nI5Agbj8302iubMrZKUxo36cSsAIEfnGpaOauokyq4obzF7Vn79eir1/nJ8Ufyn2VjLoSZHOp+eWIsFAk4qQnZMjl+KVWjjX5G/DYricS0aGuUfgM923zS8b1GoGPKzba9PC6EYfN4oVWm2DQnf46udZIK+VQz8ofnAHQDD/LXPV5XjBfNeWcpvty/wQoMQsMiPPbqycjyOaRBthqEAxGZoWtBGTgPVT4fL2eHzqzdPg2bqKW3iif8C+lu5Vf6BnPCJ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB5801.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(39860400002)(376002)(366004)(346002)(2906002)(82960400001)(38070700005)(9686003)(26005)(41300700001)(83380400001)(53546011)(6506007)(7696005)(55016003)(38100700002)(107886003)(122000001)(478600001)(966005)(33656002)(52536014)(66556008)(71200400001)(4326008)(8676002)(64756008)(66446008)(66476007)(76116006)(8936002)(186003)(86362001)(110136005)(66946007)(316002)(54906003)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/NAtzNkuYVBrEakojAupAqBIVRq+Aizj5QQ9ZbAUxvDFQDOjehSwqQUOR02+?= =?us-ascii?Q?o8FjHCH8ExcMQ2p2SdDK8Vk9E8+TuCmycvLL7r0f2i43SuDadWgS60uzxiPI?= =?us-ascii?Q?Go1mk+lQ0q1o6R3nmZvJlC23G/+g6Pj+pC1jsfZSGGVP2eWg0DjFuCSPZ8kp?= =?us-ascii?Q?Y+NaMEkgWuS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?Q?lnDK4mLq0f9jSdn46oCFnckl8negce4P4kVLxJ0Wwu5gHU4U1/IQjE6LZhWT?= =?us-ascii?Q?Vk9t2Hiz675eVnQ4QD2HL/gnaTbAHZu69prOSsR+ofZR9TowffCYxdp6VfED?= =?us-ascii?Q?d5QGknYWy3UgO6P0QL4uZycjczzhDDq4Nrage5JfdGzjFCOeIrPDNk0yLpGc?= =?us-ascii?Q?ChnF7VZiKWvEPPkoREaK2e1HU6UH5BK4F+ZofDs18taUcIuCrYLcnD6BvVcm?= =?us-ascii?Q?HXna7S9WuA475S3MRVVjT33VOLAijsENnpk7TP8bQv7LSlxaUzCR8IJrmiLz?= =?us-ascii?Q?4xRdbY2G3pkfKJMX5TVla14MgObwAeKCjyXGZ1rVc0HvPkPGyn7rZXqtQH96?= =?us-ascii?Q?TCcWBiqRt6EN3wMET6uSj6RD5mLGalsssz4TMHglZHqdRyjA6Bf6b10SmHO7?= =?us-ascii?Q?Ksb76gGvkHdl99BWsLdasULco7FOPRk2GZmHivUeHckq7CbVRc8u69KDQAS0?= =?us-ascii?Q?Mmk+4V2XmqtSoFx/Wr+R0fxszqs27XYi+fqL7ftM?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB5801.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bafeec1-40e6-4a9d-bcd7-08da79709291 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2022 19:02:42.8356 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PMk131EBvMpEXM3ex/rIZLKo7ReMAJQ6NLff0Ps94JdEO+6vKszYL3y4UZWzbtv0GignlD0Op7HW+WPLzdG6Wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5309 Return-Path: isaac.w.oram@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed as 436a8612ae..ea2a520c83 -----Original Message----- From: devel@edk2.groups.io On Behalf Of Oram, Isaac = W Sent: Friday, August 5, 2022 1:30 PM To: mikuback@linux.microsoft.com; devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Gao, Liming ; Dong, Eric <= eric.dong@intel.com> Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/Tes= tPointCheckLib: Prevent modification of HOB data Reviewed-by: Isaac Oram -----Original Message----- From: mikuback@linux.microsoft.com Sent: Friday, August 5, 2022 10:16 AM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Oram, Isaac W ; Gao, Liming = ; Dong, Eric Subject: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: P= revent modification of HOB data From: Michael Kubacki DumpMemoryTypeInfoSummary() is used to dump information about the MemoryTyp= eInformation HOB. The dump function currently modifies the data which can c= orrupt the data for later HOB consumers in the DXE phase. This change makes DumpMemoryTypeInfoSummary() treat the data as read-only. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemor= yTypeInformation.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/D= xeCheckMemoryTypeInformation.c b/Platform/Intel/MinPlatformPkg/Test/Library= /TestPointCheckLib/DxeCheckMemoryTypeInformation.c index 9ee9dd252c7e..a30b69dd787c 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheck= MemoryTypeInformation.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCh +++ eckMemoryTypeInformation.c @@ -22,8 +22,8 @@ ShortNameOfMemoryType( =20 VOID DumpMemoryTypeInfoSummary ( - IN EFI_MEMORY_TYPE_INFORMATION *CurrentMemoryTypeInformation, - IN EFI_MEMORY_TYPE_INFORMATION *PreviousMemoryTypeInformation + IN CONST EFI_MEMORY_TYPE_INFORMATION *CurrentMemoryTypeInformation,=20 + IN CONST EFI_MEMORY_TYPE_INFORMATION *PreviousMemoryTypeInformation ) { UINTN Index; @@ -83,7 +83,6 @@ DumpMemoryTypeInfoSummary ( } =20 if (Next !=3D Previous) { - PreviousMemoryTypeInformation[Index].NumberOfPages =3D Next; MemoryTypeInformationModified =3D TRUE; } =20 @@ -110,7 +109,7 @@ TestPointCheckMemoryTypeInformation ( VOID *CurrentMemoryTypeInformation; VOID *PreviousMemoryTypeInformation; VOID *VariableMemoryTypeInformation; - =20 + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointCheckMemoryTypeInformation - = Enter\n")); CurrentMemoryTypeInformation =3D NULL; PreviousMemoryTypeInformation =3D NULL; -- 2.28.0.windows.1