From nobody Fri May 17 05:54:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+88644+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88644+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1649440147; cv=none; d=zohomail.com; s=zohoarc; b=AYJ2NG0mVtjRB0xO52q7GGRAJeCQR8P5LhyHymv192EPxmkI6ewXbbAKtjPlv5Rj75rhU14MBo4C0m7MgFQuJRGLOwWmkK4lpzn8u6MxIyDCDhANSJUAXnD0ECa5511Q8XU8eVzSCOWp1pZ+tNc/tzMVF4ClhR05yWdd8BtbIsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649440147; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=kiX8oPl3TBsz2NfTfQTPgrkh1zfvgO9ogYDwyZLQ2cI=; b=IOye07U8MmF7x0qIE3OYQ9uk0LGorLUHNa7YWoxM4w2ifgMs+uvSI5/MDTWQutLGvRbpWVx64A1f0hIaL6lii2eT8GCujJldeE3JM6o5edSp4XUPwwkluLozU+NdysPM/4zJalTMHX+vqD/ghovgrvKORjRwpoe4AdHUdhL5Coo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88644+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1649440147476978.1401858149125; Fri, 8 Apr 2022 10:49:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aQKzYY1788612xndN1StItqh; Fri, 08 Apr 2022 10:49:07 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.1977.1649389952259457979 for ; Thu, 07 Apr 2022 20:52:32 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="241435045" X-IronPort-AV: E=Sophos;i="5.90,243,1643702400"; d="scan'208";a="241435045" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 20:52:31 -0700 X-IronPort-AV: E=Sophos;i="5.90,243,1643702400"; d="scan'208";a="571336792" X-Received: from gchen29.sh.intel.com ([10.239.154.135]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 20:52:29 -0700 From: "Chen, Gang C" To: devel@edk2.groups.io Cc: guomin.jiang@intel.com, dandan.bi@intel.com, di.zhang@intel.com, Jian J Wang , Liming Gao , Eric Dong , Ray Ni Subject: [edk2-devel] [PATCH] MdeModulePkg/dec: update the PcdCpuStackGuard property Date: Fri, 8 Apr 2022 11:52:11 +0800 Message-Id: <20220408035211.637342-1-gang.c.chen@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gang.c.chen@intel.com X-Gm-Message-State: rdNwzPrndLdvjv4l13QDH6rXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649440147; bh=/xONqAwoK07A2jNNQByLbernMc8I4650c6aOpMTSxr0=; h=Cc:Date:From:Reply-To:Subject:To; b=Ch22VyehedX+sKmtL+130pTrn1X/KORzvIc1Um8jmqOPfxh4qIS6bcmJnqHxjym/s6f UyKikAIx7sboSg4nV/mWyjHFKnnwM9VC8MyTzVmxtUgMkPlx3p+S6wly0F0UJ9GmVsPoX 9z8C/ePmnf0iQOymQiMo9AxqL7CsXLF41UA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649440147733100001 Content-Type: text/plain; charset="utf-8" Update the PcdCpuStackGuard from PcdsFixedAtBuild to PcdsDynamicEx. Meanwhile, remove the duplicate check for PcdCpuStackGuard for some limitation, which has been checked at the entry of InitializeMpExceptionStackSwitchHandlers. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3897 Cc: Jian J Wang Cc: Liming Gao Cc: devel@edk2.groups.io Cc: Eric Dong Cc: Ray Ni Signed-off-by: Gang Chen Reviewed-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 14 +++++++------- .../CpuExceptionHandlerLib/PeiCpuException.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 463e889e9a..72e7e2eced 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1070,13 +1070,6 @@ # @Prompt The Heap Guard feature mask gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0|UINT8|0x3000= 1054 =20 - ## Indicates if UEFI Stack Guard will be enabled. - # If enabled, stack overflow in UEFI can be caught, preventing chaotic = consequences.

- # TRUE - UEFI Stack Guard will be enabled.
- # FALSE - UEFI Stack Guard will be disabled.
- # @Prompt Enable UEFI Stack Guard. - gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x30001055 - [PcdsFixedAtBuild, PcdsPatchableInModule] ## Dynamic type PCD can be registered callback function for Pcd setting = action. # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of= callback function @@ -2079,6 +2072,13 @@ # @Prompt Enable PCIe Resizable BAR Capability support. gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLEAN|= 0x10000024 =20 + ## Indicates if UEFI Stack Guard will be enabled. + # If enabled, stack overflow in UEFI can be caught, preventing chaotic = consequences.

+ # TRUE - UEFI Stack Guard will be enabled.
+ # FALSE - UEFI Stack Guard will be disabled.
+ # @Prompt Enable UEFI Stack Guard. + gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x00010025 + [PcdsPatchableInModule] ## Specify memory size with page number for PEI code when # Loading Module at Fixed Address feature is enabled. diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c b/= UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c index 687fc4177f..bcd4175ffa 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c @@ -254,7 +254,7 @@ InitializeCpuExceptionHandlersEx ( // // Initializing stack switch is only necessary for Stack Guard functio= nality. // - if (PcdGetBool (PcdCpuStackGuard) && (InitData !=3D NULL)) { + if (InitData !=3D NULL) { Status =3D ArchSetupExceptionStack (InitData); } } --=20 2.35.1 -=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 (#88644): https://edk2.groups.io/g/devel/message/88644 Mute This Topic: https://groups.io/mt/90341216/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-