From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id ECB73D8046F for ; Thu, 25 Apr 2024 05:51:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GlY91Fp//qoUPls6+FGQR30CU07ci8iRqNxVBfdPI/I=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1714024274; v=1; b=fzxrJtCxS6b/T5vZcnB9dVDtci7+GNKoOx4GiXPavLNpc25yIXRP6jvXs7OKm0pc+sKVt6B1 +Uw3XK0v8JeNFSsqGFRuo1jTHZ59Dum9AfrzwAzMO8t7HtGQPdFfOVaRgt+d4liH3H5BQmmVL2/ 0mG+yGaT8RbNIRagwXxxphp5kh3rrP3qTYte6cGl8CrpZLyP1tO7RTyNWncmiRiRFK7AxGBamkq cNlrmv5L9wTfCXtdsSug5zNPSbTMQz1tmCTUAMPdvnynvfkxs6n3mz/bTa7nc/WH2ZrQXAMK0zN JXq2IldLc6lKXbEkdcdvO1zseMIFXNb6mpqZOxwjv/I+Q== X-Received: by 127.0.0.2 with SMTP id Ob7bYY7687511xtkHsM6l2SL; Wed, 24 Apr 2024 22:51:14 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web11.10322.1714024273760938370 for ; Wed, 24 Apr 2024 22:51:13 -0700 X-CSE-ConnectionGUID: SU/OoNyRRzOvslO5B7fyFg== X-CSE-MsgGUID: VhveETcvR9S+qs/2SGEkTA== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="27202925" X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208,217";a="27202925" X-Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 22:51:13 -0700 X-CSE-ConnectionGUID: ngIz3eIhR92ItxOPaB16BA== X-CSE-MsgGUID: jTJDRaWvQw2YKcsEwp/Zzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208,217";a="29738248" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Apr 2024 22:51:13 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Apr 2024 22:51:12 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Apr 2024 22:51:12 -0700 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 24 Apr 2024 22:51:12 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Apr 2024 22:51:11 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by MW6PR11MB8365.namprd11.prod.outlook.com (2603:10b6:303:240::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.21; Thu, 25 Apr 2024 05:51:10 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7519.021; Thu, 25 Apr 2024 05:51:10 +0000 From: "Ni, Ray" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: Liming Gao , "Wu, Jiaxin" , Laszlo Ersek Subject: Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/SMM: Initialize 'WillReturn' variable Thread-Topic: [PATCH 1/2] MdeModulePkg/SMM: Initialize 'WillReturn' variable Thread-Index: AQHalsrTAk/vmK0IbEy7UzoaZ2GAKbF4e3sA Date: Thu, 25 Apr 2024 05:51:10 +0000 Message-ID: References: <20240425044059.244-1-zhiguang.liu@intel.com> In-Reply-To: <20240425044059.244-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|MW6PR11MB8365:EE_ x-ms-office365-filtering-correlation-id: 7603caa0-2e6d-41ef-fe7a-08dc64ebb550 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?9wbL8cW5xaItsr75hN1AuGA76dKXumytosMzSiesEWEqFYoWyUJwUpd1ej7y?= =?us-ascii?Q?iLcaa4RFEnEBqHdODw0BS+YDjTDEh8DG+lQFj7k8X70OG7x1vwjYopWl0Bwv?= =?us-ascii?Q?yYztIdyPsOHX268r37Mv2MoCjxcW+Ss0JUzCqcLftalSmohRcRnBcFssGdlv?= =?us-ascii?Q?1JiNceW+3pnNJcWZAqyjmt1V/QrcN0RL5/NPWIkCBIzK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Pqvm2Y51g2w5TG8LDQZZuG2fbMjxSQZLstfngjl5icqddIkfB63?= =?us-ascii?Q?NXGi2axOBnfp8ZAPLkRPIA5E/Vzi7cZ0295PLyssBLRJrKjp6YiBs3Vfa52l?= =?us-ascii?Q?YAFVWwIZ/6yBk3WK6IroNtgE1nLMXR0q0acvWzJfywuSzMSd2U0G0ttOAbst?= =?us-ascii?Q?9RHspYlcnoMHd13/I5nLNrTszMW6pMM1MyYG6Y/COiJf0XXDsYEoCRh6azJp?= =?us-ascii?Q?z5r2wvaiAUur4UaNho36tC+uTq3Z4T9qq4tSRRbtOddKQA=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ivEzF2KCPyv3VTSJoMKxvHfdCR4IneCYYNUOPuEWdjLKqyxx3z2StKBWiSZK?= =?us-ascii?Q?dm0ooKZc++jDbhRkYrKEk8O0yNADB3Xj1Yt22r3e/M9KTwF8lacNlWriWId2?= =?us-ascii?Q?e5qROk/JDSf7dd47sqN6y4nQo4uodTjV6GBTEZ4ato5My0PAIn4JVyrG2Pph?= =?us-ascii?Q?Eu1tXU+q3jttvbrq/KjhJb4rJ1Fm5elnarR3z//ex3oWhAVYXsr14t3ZPC1S?= =?us-ascii?Q?SvvSnHqiGhpySSephaUYaCTIks8giq63Fo1mOETraMMfgxIfGvvTsmUPubmX?= =?us-ascii?Q?PmPzj3agy12hUPYgTgCWowX+pYKYKkObCqE8Gb6VYfx/Mnwb8jwX+Tnf0OJr?= =?us-ascii?Q?TWhx0570YxIAAuGU00L2Os3KF51nxO29iHgnDsjM48YlvnsX4jfyZO7w4SbO?= =?us-ascii?Q?B4mmQ1ZHqoHOTN7Sn4uS2cBERnqI4RsqTBhbTKqyMy+bXa7/B0dUiZNeJkj/?= =?us-ascii?Q?yuWMBwfltkI5SXzCLnbPp044QXJJS3S4TI9bNi6jQlueRq409uCwmdEINiYP?= =?us-ascii?Q?vBWrBwGyXnvOWd3Zs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psfcIRk2gFwFS?= =?us-ascii?Q?pCRFGLf0W7W7q3AaYBvz4D+5YnO05RaSYkx/akMLhyjjrKF0zwvcZOg8f3wl?= =?us-ascii?Q?fQBK6bNFFSrEiXoq8nHhWBk0MbT1NYg/MRomP/TwAZL4SNF8Fcp1AkBAqzOH?= =?us-ascii?Q?84L0g0X18VVYRkYh3qk=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7603caa0-2e6d-41ef-fe7a-08dc64ebb550 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2024 05:51:10.1242 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MU/uzTe0oh5uvSF3HGqAoMQil6idq9CvdQJgq5B7Ch4SMijg29zsYN58I+Y9T32B8igcaSYkAWmlbbDAK4k3bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR11MB8365 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 24 Apr 2024 22:51:13 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 3pHBoI7NSrKr9Cq9GwKwOXBXx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82444887B1DECF478E998F868C172MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=fzxrJtCx; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) --_000_MN6PR11MB82444887B1DECF478E998F868C172MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni Thanks, Ray ________________________________ From: Liu, Zhiguang Sent: Thursday, April 25, 2024 12:40 To: devel@edk2.groups.io Cc: Liu, Zhiguang ; Liming Gao ; Wu, Jiaxin ; Ni, Ray ; Laszl= o Ersek Subject: [PATCH 1/2] MdeModulePkg/SMM: Initialize 'WillReturn' variable The local variable 'WillReturn' was being used without prior initialization in some code paths. This patch ensures that 'WillReturn' is properly initialized to prevent undefined behavior. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Zhiguang Liu --- MdeModulePkg/Core/PiSmmCore/Smi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCor= e/Smi.c index a84a1f48d3..6b56fa5f69 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -152,6 +152,7 @@ SmiManage ( PERF_FUNCTION_BEGIN (); mSmiManageCallingDepth++; + WillReturn =3D FALSE; Status =3D EFI_NOT_FOUND; ReturnStatus =3D Status; if (HandlerType =3D=3D NULL) { -- 2.31.1.windows.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 (#118267): https://edk2.groups.io/g/devel/message/118267 Mute This Topic: https://groups.io/mt/105725159/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82444887B1DECF478E998F868C172MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Ray Ni <ray.ni@intel.com>

Thanks,
Ray

From: Liu, Zhiguang <zhi= guang.liu@intel.com>
Sent: Thursday, April 25, 2024 12:40
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Liu, Zhiguang <zhiguang.liu@intel.com>; Liming Gao <gao= liming@byosoft.com.cn>; Wu, Jiaxin <jiaxin.wu@intel.com>; Ni, Ray = <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH 1/2] MdeModulePkg/SMM: Initialize 'WillReturn' varia= ble
 
The local variable 'WillReturn' was being used wit= hout prior
initialization in some code paths.
This patch ensures that 'WillReturn' is properly initialized
to prevent undefined behavior.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 MdeModulePkg/Core/PiSmmCore/Smi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCor= e/Smi.c
index a84a1f48d3..6b56fa5f69 100644
--- a/MdeModulePkg/Core/PiSmmCore/Smi.c
+++ b/MdeModulePkg/Core/PiSmmCore/Smi.c
@@ -152,6 +152,7 @@ SmiManage (
 
   PERF_FUNCTION_BEGIN ();
   mSmiManageCallingDepth++;
+  WillReturn   =3D FALSE;
   Status       =3D EFI_NOT_FOUND;<= br>    ReturnStatus =3D Status;
   if (HandlerType =3D=3D NULL) {
--
2.31.1.windows.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118267) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82444887B1DECF478E998F868C172MN6PR11MB8244namp_--