From nobody Mon Feb 9 03:13:29 2026 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+90468+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+90468+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1655091557; cv=none; d=zohomail.com; s=zohoarc; b=aqAv3lpPZBbl/J7Avz/42uH/5s6BL3cNQVfHEnfTsRWwMXLY2ReVLEId57FlfaAKcuDTqcPiqEUvUMabXrqPFodpaku3mOIo53C9kHwx4vbc+sr/L0ERlDoLNiY95ax9/ilJb9SRS2jevRgJPPyQu6/BnToyBOB7tG0wZLlmQv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655091557; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=OUHCRD3V98cDSlFau9qNVRXmRrCuH5ZjEm5j76ZPBdE=; b=nhXCbFhWrR1cNxS4FoMYz6OT0R3/k9to4aIAtiApPAE3FpFzQKANq1o0CqFTIxAP1Wh6klhK8I7sP4+aFzNwAgtV8v72AyBrNh3k9xsP6lpju5L5m303phf9pEM1OGL2bJWn3eL9RrJoT58MZz15qb21jtwoVNv/D2wSZcWQAIg= 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+90468+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 1655091557601625.4858795616723; Sun, 12 Jun 2022 20:39:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id EiBZYY1788612xvoO1Bz2Jbr; Sun, 12 Jun 2022 20:39:17 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web08.1990.1655091556516189970 for ; Sun, 12 Jun 2022 20:39:16 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="339826056" X-IronPort-AV: E=Sophos;i="5.91,296,1647327600"; d="scan'208";a="339826056" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2022 20:39:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,296,1647327600"; d="scan'208";a="639470402" X-Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.183.102]) by fmsmga008.fm.intel.com with ESMTP; 12 Jun 2022 20:39:10 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao Subject: [edk2-devel] [PATCH 2/2] DxeMain: Fix the bug that StackGuard is not enabled Date: Mon, 13 Jun 2022 11:39:03 +0800 Message-Id: <20220613033903.1395-3-ray.ni@intel.com> In-Reply-To: <20220613033903.1395-1-ray.ni@intel.com> References: <20220613033903.1395-1-ray.ni@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,ray.ni@intel.com X-Gm-Message-State: 9xlUCN48wEgel8yKRymEG0mxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1655091557; bh=b3ZIL5opOMU+jvD4P18+kgQuUMpvmCgyv4P97RHBCNM=; h=Cc:Date:From:Reply-To:Subject:To; b=wo2czYcHhxXKgIFUphX0+G1khcc+KAhbycwdZXIb0TWak6AN+6f951z2pLGCHuSmZ55 aB+1Vii1fE54Qjq9YFYMt0Nb2Cs5WUPTdOewOP+zZ7I0jv4iUGOk145ggDnURvsj5dIL2 zHbUj8e/7KBYC6r+280lRyVnmXX3G5gVJ0Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1655091558551100009 Content-Type: text/plain; charset="utf-8" Commit e7abb94d1 removed InitializeCpuExceptionHandlersEx and updated DxeMain to call InitializeCpuExceptionHandlers for exception setup. But the old behavior that calls *Ex() sets up the stack guard as well. To match the old behavior, the patch calls InitializeSeparateExceptionStacks. Signed-off-by: Ray Ni Reviewed-by: Jian J Wang Cc: Liming Gao Reviewed-by: Sami Mujawar --- MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dx= e/DxeMain/DxeMain.c index 83f49d7c00..0a1f3d79e2 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -256,6 +256,14 @@ DxeMain ( Status =3D InitializeCpuExceptionHandlers (VectorInfoList); ASSERT_EFI_ERROR (Status); =20 + // + // Setup Stack Guard + // + if (PcdGetBool (PcdCpuStackGuard)) { + Status =3D InitializeSeparateExceptionStacks (NULL); + ASSERT_EFI_ERROR (Status); + } + // // Initialize Debug Agent to support source level debug in DXE phase // --=20 2.35.1.windows.2 -=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 (#90468): https://edk2.groups.io/g/devel/message/90468 Mute This Topic: https://groups.io/mt/91719888/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-