From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4DAE4AC010A for ; Sat, 30 Mar 2024 00:06:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bu+dXZ5iD1Goeu9HEH5TzS3Oe452j7znenXGI6ZtMPM=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711757181; v=1; b=vYvtzwDa7ppSvr3C+FNrZkyUll51VU/6roKf/xp6xEvmxy/06aN1u7AIulFea+nHhG0e8f5E mJO8O8rnCLtEHEcjhw3xOSyJQUYwDPgW7OGsQ7tJ+wa8dH3zqIolfmTO/G6jQzfdle8Ui8CP1hx V+ixXFwj85UbyVzwkc57yBDYiE4DNcbgemWukvIJ9FaZwc4F/MnncmVFo5OPKwiGyVagmfY2Eln yXRGu7C0X6c2b/GD6BsaZUCAnXPJMiv5w04LScATCq+nKNa6VvRZUqu5SrCol/XrrMfdZ3rc/1G KgXpTttOpND0jOLjD+ZE35bqlZ5O+WkSkgrH9AtcaqxmA== X-Received: by 127.0.0.2 with SMTP id 4d44YY7687511xM8h2QrbSoI; Fri, 29 Mar 2024 17:06:21 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mx.groups.io with SMTP id smtpd.web10.5102.1711757180855393824 for ; Fri, 29 Mar 2024 17:06:21 -0700 X-CSE-ConnectionGUID: sfBhOm2pS6W3z3BS0fk0Ww== X-CSE-MsgGUID: y7reXX2hSGO1D37/obUCUg== X-IronPort-AV: E=McAfee;i="6600,9927,11028"; a="17677641" X-IronPort-AV: E=Sophos;i="6.07,166,1708416000"; d="scan'208";a="17677641" X-Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2024 17:06:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,166,1708416000"; d="scan'208";a="17580448" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Mar 2024 17:06:20 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 29 Mar 2024 17:06:19 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2507.35 via Frontend Transport; Fri, 29 Mar 2024 17:06:19 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 29 Mar 2024 17:06:19 -0700 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by SJ1PR11MB6299.namprd11.prod.outlook.com (2603:10b6:a03:456::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Sat, 30 Mar 2024 00:06:17 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::e34e:4d18:b93e:c368]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::e34e:4d18:b93e:c368%5]) with mapi id 15.20.7409.031; Sat, 30 Mar 2024 00:06:17 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "osde@linux.microsoft.com" CC: Liming Gao , Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Taylor Beebe , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH v3 0/3] MdeModulePkg: ImagePropertiesRecordLib Fixes Thread-Topic: [edk2-devel] [PATCH v3 0/3] MdeModulePkg: ImagePropertiesRecordLib Fixes Thread-Index: AQHaghcpojeP06QAUE6CliZ8c6yimbFPZ+9Q Date: Sat, 30 Mar 2024 00:06:17 +0000 Message-ID: References: <20240329202129.12988-1-osde@linux.microsoft.com> In-Reply-To: <20240329202129.12988-1-osde@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|SJ1PR11MB6299:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: AdH1N0Hb8SEms34pjeg4O7Qzz6ZcviVAKHbILYpLfY0EEH2Eeu2HBgqPnENJsCxplK5hQDG6SExVarLoA04VJ5YUs4t3DNoOev/AbCggbRJ1w1WTbJPQCeEmn/oKxhdro3gtCiDM9xDsf8iBbVXixK+T8oyuYbn9uOzfOSodY/mWKbA4SEiY8rB4JLNOcB7RZZ/e8sLScqVneOh7TGTfcF3uzhbsNtsnK42EcR0Fvut4JkIu1FK8vTWsX25o1SpbdUYrLzKc3V9h7ojxcXmFRXuIKxtTRxJ1Or5OY6JijEIg5eqbYJP6Q/LAfr8hkQZn/fPCCphd+I8weaTxPD2ffCI4Z94KIKhVdEtU7EskPlWdLIiA+OtLEpiV0sRJBAbm1jE2IUS3/X90CQTNZyRfNaEI4sSCY0NVzU+xWCChujSbGR1jP8nRTxos6KmTxyJLP9GhOueuScocD3CeKmP/27s20KhfYbyY/5Tar/ghpHTzvlY4DmVRL8ePcsB5cgy+viyp6tFsspcKg3VJIlFYH9ydZu/HNfBGfGTghrvr4wUG61qHUnXW+RrgEZDa8oOAf3Tn0XDHWdaL3XXcnBZENwx4/fiTK8u/lwAP/AfydLPBd4u9nCvSmiUAKnbMRpI1 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tsu3gHyOd6/6lKauggt2sl+/r/wQubLLx7s6Ojl+QLIbhZ/DIo87utGOMdE2?= =?us-ascii?Q?Xea6PTI/om2bOpK6uVb+3/KVpWMZAYqJORcyegGwSRpyti3YOuuUCD7LKHWH?= =?us-ascii?Q?eO0r7EiaD7akuFG3vvg+Q8CZcpPTIL0/Ut7C2xkBqUXtLWgK1qyB/FOur52v?= =?us-ascii?Q?mZsEFrs7zLx8ABx9mnJus79adE3bdk6K72nTrdroO0l9lk/0tdSKbtziPvM6?= =?us-ascii?Q?DlGrE9aoNNu4tpOZA+uXmglCJteYlrSFeHxkQDfZcD9lF4gybIjl4/gYfmDi?= =?us-ascii?Q?oYs9cYLNc6ZEEwfUE1py6x9XOw02EzH53/2qJHhZ2FgzcHJwpV7B+zafsqaI?= =?us-ascii?Q?gOMnIvg7MNB6MJhEZXrQacdXVHnUFKAztUEkAQUFCWandS6B5e8owcbDsDyW?= =?us-ascii?Q?c8/VSPSpyKqNivmB5vCA6sB473Cx+5Nol9N8Qw1EiUqzX5gogbNtWjWMHtVZ?= =?us-ascii?Q?2cjSvkW3In6JwBEfxFY9X0nIzXAGKE8BsH1OwblcZGvxFA/F4RZy1lUTf8h0?= =?us-ascii?Q?XAWhqu087DE9SozTI+vlFNju9xfr7oDdzynFvgk8FormKK2P+hekKAtqUN5T?= =?us-ascii?Q?qvbDkYrwj52u47fha2+AGekOwcTdN4y0eW2JXxR4nimdj60QM7V6tuuNWrvj?= =?us-ascii?Q?8rY9e5D+Tb+ZOuIBTKSlN+fIfUSGIFz7s+tqKWQLr9yj6sOp/roeiaEvMw1G?= =?us-ascii?Q?30IPtc09M3cpJdEEtQceH3Z4o+nl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exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb36509f-7084-40c9-fdad-08dc504d38a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2024 00:06:17.2736 (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: YyIJ+EaCMRN1kMIcpPJI1ZjGQikdluO5oRAPuNLN5kx7l+FoinLaV61FkiVFKDyNUdebh4KTo/Ol1dch0tFy6smLNOjNSb96crqvTBJS3A0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6299 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 29 Mar 2024 17:06:21 -0700 Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ArZJIhiORLN0DL2MR4xo8wibx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=vYvtzwDa; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Merged: https://github.com/tianocore/edk2/pull/5505 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Oliver > Smith-Denny > Sent: Friday, March 29, 2024 1:21 PM > To: devel@edk2.groups.io > Cc: Liming Gao ; Leif Lindholm > ; Ard Biesheuvel ; > Sami Mujawar ; Taylor Beebe > > Subject: [edk2-devel] [PATCH v3 0/3] MdeModulePkg: ImagePropertiesRecordL= ib > Fixes >=20 > ImagePropertiesRecordLib is currently creating Image Records that > are not accurate. It is setting the CodeSegmentSize to be the size > of the raw data in the image file, however, when the image is > loaded into memory, the raw data size is aligned to the > section alignment. This caused the memory attributes table to > have incorrect entries for systems, like ARM64, where the section > alignment is not 4k for all modules. >=20 > In fixing this, I noticed that MemoryProtection.c is using its own > version of image record creation where this logic was actually > correct. ImagePropertiesRecordLib was created to consolidate the > logic around creating and managing image records, so this patchset > also updates MemoryProtection.c to use ImagePropertiesRecordsLib > after making a few small adjustments to ensure the same functionality > is present. >=20 > This patchset was tested on ArmVirtQemu to ensure that all image > records were the same before and after this, other than fixing > the CodeSegmentSize. >=20 > v3: > - Fix merge conflict in MemoryProtection.c >=20 > v2: > - Align VirtualSize instead of SizeOfRawData >=20 > Github PR: https://github.com/tianocore/edk2/pull/5504 >=20 > Cc: Liming Gao > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Sami Mujawar > Cc: Taylor Beebe >=20 > Oliver Smith-Denny (3): > MdeModulePkg: ImagePropertiesRecordLib: Use SectionAlignment for > CodeSize > MdeModulePkg: ImagePropertiesRecordLib: Consolidate Usage > MdeModulePkg: MemoryProtection: Use ImageRecordPropertiesLib >=20 > Oliver Smith-Denny (3): > MdeModulePkg: ImagePropertiesRecordLib: Use SectionAlignment for > CodeSize > MdeModulePkg: ImagePropertiesRecordLib: Consolidate Usage > MdeModulePkg: MemoryProtection: Use ImageRecordPropertiesLib >=20 > MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c = | > 241 +++----------------- > MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c= | > 86 +++++-- > 2 files changed, 94 insertions(+), 233 deletions(-) >=20 > -- > 2.40.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#117239): https://edk2.groups.io/g/devel/message/11723= 9 > Mute This Topic: https://groups.io/mt/105223002/1643496 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [michael.d.kinney@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117246): https://edk2.groups.io/g/devel/message/117246 Mute This Topic: https://groups.io/mt/105223002/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-