From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B0EB2221786B0 for ; Thu, 30 Nov 2017 18:33:06 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 18:37:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,343,1508828400"; d="scan'208";a="8199500" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.33]) by fmsmga004.fm.intel.com with ESMTP; 30 Nov 2017 18:37:31 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Star Zeng , Eric Dong Date: Fri, 1 Dec 2017 10:37:18 +0800 Message-Id: <20171201023728.4680-2-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171201023728.4680-1-jian.j.wang@intel.com> References: <20171201023728.4680-1-jian.j.wang@intel.com> Subject: [PATCH v3 01/11] MdeModulePkg/metafile: Add PCD PcdCpuStackGuard X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2017 02:33:06 -0000 PcdCpuStackGuard is introduced to enable/disable Stack Guard feature. Its value is FALSE by default. This feature is suggested to be enabled only if the cpu driver and CpuExceptionHandlerLib have supported stack switch for the processor used in platform. Otherwise the exception dump message won't be printed out when there's a stack overflow happened. Cc: Star Zeng Cc: Eric Dong Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 7 +++++++ MdeModulePkg/MdeModulePkg.uni | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 856d67aceb..b3831a21ad 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -949,6 +949,13 @@ # @Prompt The Heap Guard feature mask gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0|UINT8|0x30001054 + ## 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 diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni index 588905a9a1..43dd5103be 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg/MdeModulePkg.uni @@ -1204,3 +1204,10 @@ " 0 - The returned pool is adjacent to the bottom guard page.
\n" " 1 - The returned pool is adjacent to the top guard page.
" +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCpuStackGuard_PROMPT #language en-US "Enable UEFI Stack Guard" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCpuStackGuard_HELP #language en-US "Indicates if UEFI Stack Guard will be enabled.\n" + " If enabled, stack overflow in UEFI can be caught, preventing chaotic consequences.

\n" + " TRUE - UEFI Stack Guard will be enabled.
\n" + " FALSE - UEFI Stack Guard will be disabled.
" + -- 2.14.1.windows.1