From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 9BA46D8083D for ; Fri, 19 Apr 2024 06:43:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=56x8pbwUmH7tt3tRvuIqexDClxv5N6dw/K2+bBTtjxs=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1713509030; v=1; b=Z1iCcCXmnvEXZ9Zd7BcrJy8SrFsPGSQUD3QmXnqL9jbtt6GYMWuzz/6XpwQwgNimzOCZIkMG VtkMw4TPHMaVzYIy9WV+pESgMKV8q7+GQt0fKkVGbOYYAxo/eVV19d1eZB10ZtsCz9QZEaXr4uZ il1xQHrK3dC75IX8BA3Q6m0N6EsEOHUOWPTfvMgnfEgt5msLqjnSmQR7DK9ENbC+Lk5er1YP3xN p5m5HaMl1NaJANxWQ5M8wOfLBOjWNDIBWJOFYT5DMWUsVeKRvHcHkxLs0C8ufFJZUS5J6m/JU6N SOLTjQijJkveVRWlGHxUho0zbmLevfF6IhymYfCYEhUYA== X-Received: by 127.0.0.2 with SMTP id 7ugmYY7687511xZ6mtSsF9bS; Thu, 18 Apr 2024 23:43:50 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web11.13893.1713509029683335502 for ; Thu, 18 Apr 2024 23:43:49 -0700 X-CSE-ConnectionGUID: NH31wF0pT5KQyQjSygxOng== X-CSE-MsgGUID: GL7C+EeQRleFATThvwNIxA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="26608367" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208,217";a="26608367" X-Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 23:43:49 -0700 X-CSE-ConnectionGUID: AIhkqBshT0KRno1+qPmN8Q== X-CSE-MsgGUID: utfd+fuGSJG45m6Yo7HkDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208,217";a="54445190" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 23:43:49 -0700 X-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.2507.35; Thu, 18 Apr 2024 23:43:48 -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; Thu, 18 Apr 2024 23:43:48 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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; Thu, 18 Apr 2024 23:43:48 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DM4PR11MB8201.namprd11.prod.outlook.com (2603:10b6:8:18a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Fri, 19 Apr 2024 06:43:41 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7472.037; Fri, 19 Apr 2024 06:43:41 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Huang, Yanbo" , Ard Biesheuvel , "Bi, Dandan" , "osde@linux.microsoft.com" CC: Taylor Beebe , "Wang, Jian J" , "Gao, Liming" , "Zhou, Jianfeng" Subject: Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows Thread-Topic: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows Thread-Index: AQHajJhnulH0mB1rvEqDAHHVhCPOrLFkvbMAgAMbJQCAAVVYgIAA8GEAgAGnSQCAAMEyAIAApK0AgADceQCAAARAgIAACt0AgAAG14CAARBnPw== Date: Fri, 19 Apr 2024 06:43:41 +0000 Message-ID: References: <20231127181818.411-1-taylor.d.beebe@gmail.com> <20231127181818.411-11-taylor.d.beebe@gmail.com> <45b9b2a8-4bbb-4d67-94a9-6c6d6607feb7@gmail.com> <045edd40-88e7-4af2-ab15-61aa8701f9a4@gmail.com> <140baa4f-b082-4121-bc34-7c03002d8de6@gmail.com> <6a542022-335d-4de3-95c6-6f04c9bbb370@linux.microsoft.com> In-Reply-To: <6a542022-335d-4de3-95c6-6f04c9bbb370@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DM4PR11MB8201:EE_ x-ms-office365-filtering-correlation-id: 381eaee5-3d5c-40d1-d674-08dc603c0d19 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: pTNWb0L8+qiC7SjwN4cpJSp+V4/TruDlF1RCrpWQvnXWe60x7WEXicKncpXYhTjGk+A71pDG2t239SeDQqGMZZYXRNri5Pw6xzCKyZ49qf4X/xHDxK849CuI2FIAUPxzS84m9wYtfQnzUc06Ps7nZFoPuOusPdhInn6EHDtPh6FuxsucNLgAwIBxmSvJrhlNZDO6YZJr7+wux1QFB0PqQO9GQ433S12vTqG7T9qUxq0H03lfddSTiuVLkFwr7sn4IIbxohA3gajxKZNxVlneCUX3580kJ5OPthhFNfz94miQ28r66LxJd3CQVpZauhK7nylIHj66UMLvliO0ocy6qfzMdeCrDwDTveJ0Z1IPYJOYk7//kH/clm59MAXx42/7Cqk8ErbKPiLEw01yliLDfM1ikNAij9L3cfQ3EevxKHzuYjnT+/WwhLqyREIUozFYShIuhyHOwqs4Et9eVyVO5JPs1qzjKj48A7e15k3jJpDciL9M+w0cPzFA5qYSN88LpwkmmnIPoZhHl8CV345P5P6k0ByG6LyRRHuOJjmssCoovm8UJqyGcGWvvjWu/UGLx0ZE/w3h+inOqLSV46Pi1yPyvRBy8onuuAu6SfHGEcyoveuF/3LIP70xLDgFbcPVGJjR6g9hlSDRyJgSHbCboh8JFh0A0HtQpQgAajCXEv4mRzIc1Q0xM4VIEydAM9L5klwcimU1q8iv7WP3c/0y3lRlqhZ7PBpPpJ9HDH3giRw= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?PnxMV5TdawQAbGqYHtCYl7zYmQaoCQwF22awWYS0edW8pF8q2VhFZsuT+Y?= =?iso-8859-1?Q?3HR0cNfvev8lVtjUkfenx2ZiAZGKUR0meBmg7/6r1I3Mqsv0lA0M2cRtxr?= =?iso-8859-1?Q?bkxTnYODOLlCBc6RGWnwewTYT4lIiafP3KPKmJgDsyBFhBIRwOOhBKjPIU?= =?iso-8859-1?Q?tI5KG1g/d5yzP+ZFdSpnBP+ImVIhKdlijE6612Fwpg/U4qcZRqqIXDkBfZ?= =?iso-8859-1?Q?PavsLiQM1vHNhMH87c9Te+OvNw5CZGmxtqdViTN2Vz5SgtoPr8EX9pPJkV?= =?iso-8859-1?Q?xf0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vgMLs/733uzISS40x+osYp7tKlb?= =?iso-8859-1?Q?fSPBgWAeegcgQvoKNWXMAsi96Uz1j9rn4bSqbjloN1ZHFjeDbCC0oJg87u?= =?iso-8859-1?Q?UCT42nCkYZFAhK+FllAr510ziO3quByrK3W1PfmrIDCG+cAz++n2kukN0S?= =?iso-8859-1?Q?RrarjsHrq/uI8Z4OaxD34Oq+E01fUSb7pGUsaHGgAD68ofoh21GvHAYAJJ?= =?iso-8859-1?Q?nDuFonM7Km/ju8NFBWzjyLh6OyS3GgFbRCbe1Nr0me6vMKVryRqS4YGAhH?= =?iso-8859-1?Q?/8Z3xqoh9o6+zP/mLm4BYEdS9GU9GRNNSeTvMDiuTQIbUUhcySAXtWW6P+?= =?iso-8859-1?Q?f0EEV6mo0RoH81cIXW/0IWAlTK/uShv1lLYB51Z9nbKGv/kBDd1Nokbaq6?= =?iso-8859-1?Q?zrf/ynxpRsY8uEnyP8rYUT4ZdpmNDmHXVR8GPJ6jFoXoYLiSoiE9JngPcy?= =?iso-8859-1?Q?FtEn/tycMnCWA=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 381eaee5-3d5c-40d1-d674-08dc603c0d19 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2024 06:43:41.3747 (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: b9m/3/2seTPcZqEZfDmZJVY1QRwmHljXzaW66xMOEbO/A3eBLqtzruQq3qmbJvuyC9bm8NdVdpE6xNbBUMabrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB8201 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: Thu, 18 Apr 2024 23:43:49 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: jWB52ya0WUxr1Sj8Kuv6Zcdmx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82447C1E8ABEB855B96329668C0D2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Z1iCcCXm; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) --_000_MN6PR11MB82447C1E8ABEB855B96329668C0D2MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable So this is just junk unallocated memory that we are reporting as a type it *could* be if an allocation occurs to minimize failures of ExitBootServices. Which is questionable. But in terms of attributes, I would expect we either have this unallocated memory marked the same as the bin type or better, mark it RP if we can (Taylor is making a change to set RP on free memory by default, so we would have this in the page table, but we would need to decide what we tell the OS). [Ray] When reviewing today's logic of memory protection through page table,= I feel that it was designed improperly in the beginning. My rough thought is: * All memory is RP initially (as you said Taylor will do that) * Allocated memory is mapped as either RO or XD, depending on code/data. Or= RP if it's a guard page. Maybe I am not aware of some limitations of the above idea. The limitations= prevented the initial design be in this way. Or what Taylor will do aligns to the idea? Thanks, Ray -=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 (#118006): https://edk2.groups.io/g/devel/message/118006 Mute This Topic: https://groups.io/mt/105477564/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- --_000_MN6PR11MB82447C1E8ABEB855B96329668C0D2MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


So this is just junk unallocated memory that we are reporting as
a type it *could* be if an allocation occurs to minimize failures
of ExitBootServices. Which is questionable. But in terms of
attributes, I would expect we either have this unallocated
memory marked the same as the bin type or better, mark it RP
if we can (Taylor is making a change to set RP on free memory
by default, so we would have this in the page table, but we
would need to decide what we tell the OS).

[Ray] When reviewing today's logic of memory protection through page tab= le, I feel that it was designed improperly in the beginning.
My rough thought is:
* All memory is RP initially (as you said Taylor will do that)
* Allocated memory is mapped as either RO or XD, depending on code/= data. Or RP if it's a guard page.

Maybe I am not aware of some limitations of the above idea. The limitati= ons prevented the initial design be in this way.
Or what Taylor will do aligns to the idea?

Thanks,
Ray
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118006) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82447C1E8ABEB855B96329668C0D2MN6PR11MB8244namp_--