From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.3829.1573268642561710957 for ; Fri, 08 Nov 2019 19:04:02 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: jian.j.wang@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2019 19:04:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,283,1569308400"; d="scan'208";a="213351828" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 08 Nov 2019 19:04:01 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 Nov 2019 19:04:00 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 Nov 2019 19:04:00 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.63]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Sat, 9 Nov 2019 11:03:58 +0800 From: "Wang, Jian J" To: "Ni, Ray" , "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+923wgAMz6eA= Date: Sat, 9 Nov 2019 03:03:58 +0000 Message-ID: References: <20191106131333.4684-1-jian.j.wang@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C35299F@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C35299F@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US 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: jian.j.wang@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed at fb92fe9e1817a53ca0fc985447f3c534201a62fa Regards, Jian > -----Original Message----- > From: Ni, Ray > Sent: Thursday, November 07, 2019 10:11 AM > 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 >=20 > Reviewed-by: Ray Ni >=20 > > -----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 > > > > 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. > > > > 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. > > > > Tests: > > - run memtest86 with PcdNullPointerDetectionPropertyMask set to 0x03 > > - run memtest86 with PcdNullPointerDetectionPropertyMask set to 0x83 > > - boot OVMF into Windows 7 with PcdNullPointerDetectionPropertyMask s= et > to 0x83 > > > > 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 > > > > Jian J Wang (2): > > MdeModulePkg/DxeIplPeim: reserve page 0 for NULL pointer detection > > MdeModulePkg/Core/Dxe: free page 0 after disabling NULL pointer > > detection > > > > 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(+) > > > > -- > > 2.17.1.windows.2