public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dandan Bi" <dandan.bi@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"michael.kubacki@outlook.com" <michael.kubacki@outlook.com>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	Kun Qin <Kun.Qin@microsoft.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is NULL
Date: Sun, 12 Apr 2020 06:17:54 +0000	[thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40DB0A08@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <MWHPR07MB344059486303D8763EB6DC6DE9C00@MWHPR07MB3440.namprd07.prod.outlook.com>

Reviewed-by: Dandan Bi <dandan.bi@intel.com>


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 <dandan.bi@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Kun Qin <Kun.Qin@microsoft.com>;
> Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel] [PATCH v1 1/1]
> MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is
> NULL
> 
> From: Michael Kubacki <michael.kubacki@microsoft.com>
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1969
> 
> 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.
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Kun Qin <Kun.Qin@microsoft.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
> ---
> 
> MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportSt
> atusCodeRouterRuntimeDxe.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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.
> 
>    Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) Microsoft Corporation.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -307,6 +308,9 @@ ReportDispatcher (
>      }
>      if (Data != NULL) {
>        CopyMem (&RscData->Data, Data, Data->HeaderSize + Data->Size);
> +    } else {
> +      ZeroMem (&RscData->Data, sizeof (RscData->Data));
> +      RscData->Data.HeaderSize = sizeof (RscData->Data);
>      }
> 
>      Status = gBS->SignalEvent (CallbackEntry->Event);
> --
> 2.16.3.windows.1
> 
> 
> 


      reply	other threads:[~2020-04-12  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 22:11 [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is NULL Michael Kubacki
2020-04-12  6:17 ` Dandan Bi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C0D5C461C9E904E8F62152F6274C0BB40DB0A08@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox