From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.98]) by mx.groups.io with SMTP id smtpd.web11.2386.1586391437137158366 for ; Wed, 08 Apr 2020 17:17:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=YTwKnWBG; spf=pass (domain: microsoft.com, ip: 40.107.223.98, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=klH0JQpPgn51KJZAdAzJjjeQq36eh/wHQG6WnGhMcSDepYyCVPzKrrKq8cKHarukCFCx0U23CfjWStVemQ/956M9ykj/EkAeuV01WXlRXUn8025ncays2u0RrSoUkWGGWK9+krqEoyXaIyENM9YpZeAa/vpk8J6RPbAsn7R/SmsDAzYJJdIV95VbCaqL4xZMLU5rSd18v/hKNtV9cYlHB8pkRWxEp+uTicC3EB+Kr5tz4n6jh8rDRbUKFu6oBfmEVwLbY+sWr85eSLK2r4m28GSXFvyqz+XQo4fZZvp/JoaWnsNRFCvWqTVAOtemITH02cMG1yMfMKsulbR6nPGJ9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4bMRA6NSe91Vxvndj8wr17g+CY+ttaCxDt4SLS4x1KQ=; b=BSkiWeSZ/VODmLZS3WzYh8q52Htij9P5NlukBgwyx3mmHIWbH17gUkGoDKWrqNwf0W2vAGqKqpAJetYnnIQu2HkNkp+XomDruYezF5QErFaHCDh78oQ6PJQViimlwspkFh2O4V/dredw0UkOh/uWKmjpXHBDuSm8wUbsTpw7Gmg+CE3wOkVZX0678sNpoxHuFzmHldjFraCPsEHdBtIJIoLDVztM7U2zA+7RJQVFLftcFElOkRJRioJAnDVAVbLl2wHU+3WXAYLYU7zSRqjlYy4TFYM7O//AXtrA9GcWInAEoCAEOgncatWNeoQNKFIcoJqcQkBcmWu0eldCqY27Qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4bMRA6NSe91Vxvndj8wr17g+CY+ttaCxDt4SLS4x1KQ=; b=YTwKnWBGjABjyd+Vyar4koJ9DNKwh6YpI15iGRtXS4QdWXmm3Nufv2FJZbk1x0qp6DWPlUU04WvVUfmGn5ktqC6om7HdgS5lzympDwMwF+UH0eXSDQ2WQzY6Bx5fZ+BE4efVfUSXNGqT8GbvPKpzMA6KPM6jm27S/GPiXlCfROM= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4SPR00MB127.namprd21.prod.outlook.com (2603:10b6:903:a4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.4; Thu, 9 Apr 2020 00:17:15 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318%12]) with mapi id 15.20.2921.009; Thu, 9 Apr 2020 00:17:15 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: Dandan Bi , Hao A Wu , Jian J Wang , Kun Qin , Liming Gao Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Update RSC Data on reallocation Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Update RSC Data on reallocation Thread-Index: AQHWDgKTrsC1YVmB1kWC1boXXnJ466hv7FrY Date: Thu, 9 Apr 2020 00:17:15 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-04-09T00:16:59.5467597Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2b719f44-be36-4709-544e-08d7dc1b5bb2 x-ms-traffictypediagnostic: CY4SPR00MB127:|CY4SPR00MB127: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:568; x-forefront-prvs: 0368E78B5B x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(4636009)(366004)(376002)(136003)(39860400002)(396003)(346002)(110136005)(10290500003)(66946007)(91956017)(186003)(66476007)(15650500001)(55016002)(64756008)(7696005)(6506007)(66574012)(76116006)(66446008)(966005)(9686003)(2906002)(53546011)(8990500004)(8676002)(81166007)(71200400001)(33656002)(81156014)(82960400001)(26005)(86362001)(5660300002)(52536014)(66556008)(478600001)(4326008)(8936002)(316002)(54906003)(82950400001);DIR:OUT;SFP:1102; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3/HUycqYEsuNXj9x0Ddh6FpugTxzpDtasfLOV21R0jvS+b+glpXwpLGvkn+kpQMYsMEP+GXTgv+/sMMoWBPnM6gml2UCh8cYKwArEnnwQahiseMsYJ7jxvA5LXoIOIZN35ovASL+BtMsLknIr2PmiPo/jBpJSrYLzthbkyAvJzmajYg337KyKe2kSxr5DAMO4JBcvy6EFqCfFiFQAwyQ0BaLVAV9wYy2o5xamVFwFbk6Gdr80VO8WmuogVhtPwRr+prSmvBPqkBNSOUY0d1J2vmLzuzRZDu/E0FWNbFXivbpTYu5bGCNHuAHBUJHGzCMaZ82jw7am2gXW5zSVV6aKPDDiFpBKldSt3+U6p/MCiiX+Swjrm/MtX3KoO5zhfCLlN9S5M5gRZ7jUEWR6Chz3UP9YKOSyyGrwyjmU2sbj6aon3+zSzIXSURDd2uRoop2OaLQGcg4xymjFPH2UOF/AaRRMxyH3vKii5SExz+kohyinc0ii9XqSRsHXzAx6jj1vSKvll3pD6XkvyJyV06bpA== x-ms-exchange-antispam-messagedata: MupApEU4aSG7bkQ/n0sNrpot5iUjcV6LpolMFsKwPllgXv0yNewF2Zu2Gz3ixFipcMmnLH6qsBkZTqP/K4AaFiQvPY2TWS4SXZljJ+cQuxRzPyumRIt6Thy7CDYgUBs2/KvCw25gV9d5oD6j4JFXAw== MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b719f44-be36-4709-544e-08d7dc1b5bb2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2020 00:17:15.5366 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uF8vq2eUlmEaAH3ejXew7u9abUv0L1J4FO6boR+KXKN1w/3m1hLF1oJJBy/ep6pPX+5/ZqZFP7U9CJY+/xB7og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4SPR00MB127 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB07439D2B8CA604219C1CAA6AEFC10CY4PR21MB0743namp_" --_000_CY4PR21MB07439D2B8CA604219C1CAA6AEFC10CY4PR21MB0743namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: devel@edk2.groups.io on behalf of Michael Kub= acki via groups.io Sent: Wednesday, April 8, 2020 5:04:47 PM To: devel@edk2.groups.io Cc: Dandan Bi ; Hao A Wu ; Jian J= Wang ; Kun Qin ; Liming Gao = Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusC= odeRouter: Update RSC Data on reallocation From: Michael Kubacki REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2670&data=3D02%7C01%7Cbret.b= arkelew%40microsoft.com%7C2e4ff7c2044249c511d508d7dc19b4d6%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637219875272310417&sdata=3DX3sHY%2FqCF8n17= zMZ0FJMAluQODc%2F1gI9WRi%2BmBUfb5Q%3D&reserved=3D0 The RSC router data buffer may be reallocated when the buffer is nearing exhaustion (7/8 portion of the buffer used). While several pointers are updated to point to the newly allocated buffer, the RscData is not updated. This commit updates the RSC data pointer to the same offset in the reallocated data buffer. Cc: Dandan Bi Cc: Hao A Wu Cc: Jian J Wang Cc: Kun Qin Cc: Liming Gao Signed-off-by: Michael Kubacki --- MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCode= RouterRuntimeDxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Repo= rtStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRou= ter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c index 6ca7e180ebb3..82fa2e025466 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatu= sCodeRouterRuntimeDxe.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatu= sCodeRouterRuntimeDxe.c @@ -3,6 +3,7 @@ and Status Code Runtime Protocol. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -286,6 +287,7 @@ ReportDispatcher ( ); if (NewBuffer !=3D NULL) { CallbackEntry->EndPointer =3D (EFI_PHYSICAL_ADDRESS) (UINTN) Ne= wBuffer + (CallbackEntry->EndPointer - CallbackEntry->StatusCodeDataBuffer)= ; + RscData =3D (RSC_DATA_ENTRY *) (UINTN) ((UINTN) NewBuffer + ((U= INTN) RscData - CallbackEntry->StatusCodeDataBuffer)); CallbackEntry->StatusCodeDataBuffer =3D (EFI_PHYSICAL_ADDRESS) = (UINTN) NewBuffer; CallbackEntry->BufferSize *=3D 2; } -- 2.16.3.windows.1 --_000_CY4PR21MB07439D2B8CA604219C1CAA6AEFC10CY4PR21MB0743namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@micros= oft.com>

 

- Bret

 


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Michael Kubacki via groups.io &l= t;michael.kubacki=3Doutlook.com@groups.io>
Sent: Wednesday, April 8, 2020 5:04:47 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dandan Bi <dandan.bi@intel.com>; Hao A Wu <hao.a.wu@in= tel.com>; Jian J Wang <jian.j.wang@intel.com>; Kun Qin <Kun.Qin= @microsoft.com>; Liming Gao <liming.gao@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg/Report= StatusCodeRouter: Update RSC Data on reallocation
 
From: Michael Kubacki <michael.kubacki@microso= ft.com>

REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2670&amp;data=3D02%7C01%7Cbr= et.barkelew%40microsoft.com%7C2e4ff7c2044249c511d508d7dc19b4d6%7C72f988bf86= f141af91ab2d7cd011db47%7C1%7C0%7C637219875272310417&amp;sdata=3DX3sHY%2= FqCF8n17zMZ0FJMAluQODc%2F1gI9WRi%2BmBUfb5Q%3D&amp;reserved=3D0

The RSC router data buffer may be reallocated when the buffer is nearing exhaustion (7/8 portion of the buffer used).

While several pointers are updated to point to the newly allocated buffer,=
the RscData is not updated. This commit updates the RSC data pointer
to the same offset in the reallocated data buffer.

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/ReportStatu= sCodeRouterRuntimeDxe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Repo= rtStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRou= ter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
index 6ca7e180ebb3..82fa2e025466 100644
--- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatu= sCodeRouterRuntimeDxe.c
+++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe= /ReportStatusCodeRouterRuntimeDxe.c
@@ -3,6 +3,7 @@
   and Status Code Runtime Protocol.
 
   Copyright (c) 2009 - 2018, Intel Corporation. All rights rese= rved.<BR>
+  Copyright (c) Microsoft Corporation.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -286,6 +287,7 @@ ReportDispatcher (
            &n= bsp;          );
         if (NewBuffer !=3D NULL) = {
           CallbackEntry= ->EndPointer =3D (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer + (Callbac= kEntry->EndPointer - CallbackEntry->StatusCodeDataBuffer);
+          RscData =3D (R= SC_DATA_ENTRY *) (UINTN) ((UINTN) NewBuffer + ((UINTN) RscData - Callba= ckEntry->StatusCodeDataBuffer));
           CallbackEntry= ->StatusCodeDataBuffer =3D (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer;
           CallbackEntry= ->BufferSize *=3D 2;
         }
--
2.16.3.windows.1




--_000_CY4PR21MB07439D2B8CA604219C1CAA6AEFC10CY4PR21MB0743namp_--