From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.2158.1573092645795128504 for ; Wed, 06 Nov 2019 18:10:45 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: ray.ni@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 18:10:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="229212014" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2019 18:10:45 -0800 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 18:10:45 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 18:10:45 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.63]) with mapi id 14.03.0439.000; Thu, 7 Nov 2019 10:10:43 +0800 From: "Ni, Ray" To: "Wang, Jian J" , "devel@edk2.groups.io" CC: "Bi, Dandan" , "Gao, Liming" , "Wu, Hao A" , Sean Brogan Subject: Re: [PATCH 0/2] Reserve page 0 for NULL pointer detection Thread-Topic: [PATCH 0/2] Reserve page 0 for NULL pointer detection Thread-Index: AQHVlKQDMFyeYSU9g0qJXLlwk0vfE6d+923w Date: Thu, 7 Nov 2019 02:10:42 +0000 Deferred-Delivery: Thu, 7 Nov 2019 02:10:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C35299F@SHSMSX104.ccr.corp.intel.com> References: <20191106131333.4684-1-jian.j.wang@intel.com> In-Reply-To: <20191106131333.4684-1-jian.j.wang@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDNmNDQ4ZjQtMTk0NC00YTJkLWIxMDUtZmM0MmEwNDVjNjYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoialwvYWx5MTV5VnZsckppcDdzUVhxOHJhQTluTTZPVythSCtMM3FGejZ2ajdCYW9NbVJ3NXo4ZTJEM1N6Y2RBVUkifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Wang, Jian J > Sent: Wednesday, November 6, 2019 9:14 PM > To: devel@edk2.groups.io > Cc: Bi, Dandan ; Gao, Liming ;= Ni, Ray ; Wu, Hao A > ; Sean Brogan > Subject: [PATCH 0/2] Reserve page 0 for NULL pointer detection >=20 > When a boot loader examines the memory map, it can see that location 0 > is available memory. If it chooses to use that memory, and > PcdNullPointerDetectionPropertyMask is enabled, use of memory in page 0 > will cause an exception. This does occur when running the memtest86 > program. >=20 > Leaving page 0 available is for legacy support purpose. Since we have > deprecated the support of legacy, the solution is just reserving it so > that it cannot be allocated for other uses. >=20 > Tests: > - run memtest86 with PcdNullPointerDetectionPropertyMask set to 0x03 > - run memtest86 with PcdNullPointerDetectionPropertyMask set to 0x83 > - boot OVMF into Windows 7 with PcdNullPointerDetectionPropertyMask set= to 0x83 >=20 > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1885 > Cc: Dandan Bi > Cc: Liming Gao > Cc: Ray Ni > Cc: Hao A Wu > Cc: Sean Brogan >=20 > Jian J Wang (2): > MdeModulePkg/DxeIplPeim: reserve page 0 for NULL pointer detection > MdeModulePkg/Core/Dxe: free page 0 after disabling NULL pointer > detection >=20 > MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 5 +++++ > MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++++ > MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c | 4 ++++ > 3 files changed, 13 insertions(+) >=20 > -- > 2.17.1.windows.2