From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.7266.1586672278713946844 for ; Sat, 11 Apr 2020 23:17:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: dandan.bi@intel.com) IronPort-SDR: WpO4pOmUcO6bfaSuzgj3g9pBC6Izt1Vn6SK5S+EKGWckuX5ue4Hu28T+0qveoTPLZoxfCroUle Fl1IC1tGqPhg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2020 23:17:57 -0700 IronPort-SDR: 4xHlt+dJlialukRLaqWZRdyBHy+4Nsk/h9DgAjtAk/X8+gvy6xzXHSFb3wKoxaNafRKrJLme8F cMCkAUww2aVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,373,1580803200"; d="scan'208";a="241356094" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2020 23:17:57 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 23:17:57 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 23:17:56 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.129]) with mapi id 14.03.0439.000; Sun, 12 Apr 2020 14:17:54 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: "Wu, Hao A" , "Wang, Jian J" , Kun Qin , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is NULL Thread-Topic: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is NULL Thread-Index: AQHWDfLRg1K2AVcDuE6Ee9GzegbEsqh1CDpg Date: Sun, 12 Apr 2020 06:17:54 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40DB0A08@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Michael Kubacki > Sent: Thursday, April 9, 2020 6:12 AM > To: devel@edk2.groups.io > Cc: Bi, Dandan ; Wu, Hao A ; > Wang, Jian J ; Kun Qin ; > Gao, Liming > Subject: [edk2-devel] [PATCH v1 1/1] > MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is > NULL >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1969 >=20 > ReportDispatcher() may be invoked with a NULL Data argument. When TPL is > less than TPL_HIGH_LEVEL and Data is NULL, the EFI_STATUS_CODE_DATA > structure inside RscData should be cleared so listeners will not receive= data > from a previous operation. >=20 > Cc: Dandan Bi > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Kun Qin > Cc: Liming Gao > Signed-off-by: Michael Kubacki > --- >=20 > MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportSt > atusCodeRouterRuntimeDxe.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git > a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > StatusCodeRouterRuntimeDxe.c > b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > StatusCodeRouterRuntimeDxe.c > index 6ca7e180ebb3..5df83027c62d 100644 > --- > a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > StatusCodeRouterRuntimeDxe.c > +++ > b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > Sta > +++ tusCodeRouterRuntimeDxe.c > @@ -3,6 +3,7 @@ > and Status Code Runtime Protocol. >=20 > Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) Microsoft Corporation.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -307,6 +308,9 @@ ReportDispatcher ( > } > if (Data !=3D NULL) { > CopyMem (&RscData->Data, Data, Data->HeaderSize + Data->Size); > + } else { > + ZeroMem (&RscData->Data, sizeof (RscData->Data)); > + RscData->Data.HeaderSize =3D sizeof (RscData->Data); > } >=20 > Status =3D gBS->SignalEvent (CallbackEntry->Event); > -- > 2.16.3.windows.1 >=20 >=20 >=20