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.92.19.78]) by mx.groups.io with SMTP id smtpd.web11.2187.1586390725074887152 for ; Wed, 08 Apr 2020 17:05:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=cN+ANC9q; spf=pass (domain: outlook.com, ip: 40.92.19.78, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DHGGx05WKebcGHRG3hFTEKI9Xdb3tBBOge1Oa2X0XeLn0hMLGAhq30PlQvFHg57pa8tI3E1HwMCKp7b+uqpylV0mSgfSZbnFMCYK3jDXuoUYc/ALtHTVrzOxfyCil6G7TBxuinG3Kwk1CvLcbKvM05VZj8p2vFP/GW9XUCvj8E2M7fApu5R4UJxxPtUoCKkDNHbpQyf8q7x4ZkUZyPlLOSuUaXTMWqfSLf7rogYYZBjuM0JZfIJyZXjQCvOsEN3vGuti/sFYPufa8EtvhmZuQVf77CE9tT0XEJ9xX2h3al37RiOW3xyZR6jXNycIwPkp91VC3VnI1rXcjLWrmjhVjA== 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=hqh6/bOXeOReg8kzAQ529PEDsgy/g7tGxKVLR8FByOI=; b=GucNZ/xUs80yYAuxMtHPkH2KjEPyDPKaGafOb5u05rSDKZh5inyspEmLi4mxJUqzlXHOYmJ5Le/LQAl6IXxNQ4hf6SATdGmNfxmzUxfF37zEJLZo33WPkdya8dqDCo27itspB/DGihzoCt486tH/FuehEgGYbUMGjRV6pntW2kCO4Y4wCJGnOLvTyl0X+JGhsKoxQojpQx0NBvkmC6UQ4o6d+JkW4PKJRF6lda4qk82AzZfAUE+cM9ZRB0eebCNaZB5VgRR41CInaImsiPCByK+seQmtXd05ZA70OCfz6X01qQNtV47WL37OPvyQhmh1uWkrMj+HRZ2/pe8bCP7bwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hqh6/bOXeOReg8kzAQ529PEDsgy/g7tGxKVLR8FByOI=; b=cN+ANC9qGItq4p/NeyB6qOVnVx1Ks37HgpqcckgCFyQspqUng629O0nR8QK03vrmFnj2zp3G02kEkkX7D2m1qbMwr5pw7e/L7aQbL3Cp+PVkLq1rEkZzOTLlXOg2zdkvA+wSv8zf1aZWuG06hpME+JLZ74wb22UCt7D99SWF0VanFqlRdzUnWsrTmBscf9+QCeCvJ1PJNUIhCoUohT3ZbGjOo7ajQX8zxSC1pKOfZbjZqblBq7j84te9cb/g/KX9a/V6Nhyi4hYCi2J6S1uz78J7c+KRzqYjmP4AhH104Wr+N6bgTot1hJI9qr4ChJmZIT7voUTKmrJNQJ3xzq1IXg== Received: from DM6NAM11FT062.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::4e) by DM6NAM11HT222.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Thu, 9 Apr 2020 00:05:24 +0000 Received: from MWHPR07MB3440.namprd07.prod.outlook.com (2a01:111:e400:fc4d::4b) by DM6NAM11FT062.mail.protection.outlook.com (2a01:111:e400:fc4d::296) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.18 via Frontend Transport; Thu, 9 Apr 2020 00:05:24 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:800B3CC25BD5CEB4ACC1CFD164403F328E0462B2094725120EF9054F5BB0B278;UpperCasedChecksum:F02B3EFE6BB95102542599E18D9929C17EBF43D6C8669D002E56C08C00C720E7;SizeAsReceived:7700;Count:47 Received: from MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::f5a7:e51b:e22a:959f]) by MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::f5a7:e51b:e22a:959f%7]) with mapi id 15.20.2878.022; Thu, 9 Apr 2020 00:05:24 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Dandan Bi , Hao A Wu , Jian J Wang , Kun Qin , Liming Gao Subject: [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Update RSC Data on reallocation Date: Wed, 8 Apr 2020 17:04:47 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 X-ClientProxiedBy: CO2PR04CA0141.namprd04.prod.outlook.com (2603:10b6:104::19) To MWHPR07MB3440.namprd07.prod.outlook.com (2603:10b6:301:69::28) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200409000447.56456-1-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:8:4d29:b0ff:96d8:3cdf) by CO2PR04CA0141.namprd04.prod.outlook.com (2603:10b6:104::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Thu, 9 Apr 2020 00:05:23 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200409000447.56456-1-michael.kubacki@outlook.com> X-TMN: [dqL49f9HFqmnOgayn3E7m3ZQ33X09IUzschCBsfSPQ0Pq4zY7XLZh0Kw1uIFMh7Z] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6f2af414-0dba-4713-124d-08d7dc19b362 X-MS-TrafficTypeDiagnostic: DM6NAM11HT222: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VKcm9DMHU0fZYzuIaf+JAiQHiv3qRVVzWn//dRpxFbn8nEiXQmTwH03Mez75AfnJdsmoI8Oef3odJhJvAfV6v153AW2GiqWgAiP6gcNrC4p6ta6qTJi88TzKI7sUstK7BDNPFnrxZrJvmBch7wAaWvFI/q25mQMOXm9/MSOId5zkEgVI3caKz+k9cSTMhIjA+gfHEHtY+boGkdc72TnpWJr5+DhmIp/mlW9ogJ/dtds= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR07MB3440.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: zDzkymBVYCxjoVrDNwXVQmxLeKBHgyVnpEapglt+9jlxVj1DA0SKB8fhtiB3WAng4BfyDCEiOF5orDMl4HsbjIBciC4KbQUisuBogERDIFMz80qQf/K/O703zVQ+SxubOzEYDVU/z4gREr8zohYiSWoEJLd1YtzCsx80Uo43Cu/f1vq2omYkcOR8uL2pLtjpEYHFWujRk/hQfoOjKSnskQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f2af414-0dba-4713-124d-08d7dc19b362 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2020 00:05:23.9773 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT222 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2670 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/ReportStatusCodeRouterRuntimeDxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c index 6ca7e180ebb3..82fa2e025466 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.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 reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -286,6 +287,7 @@ ReportDispatcher ( ); if (NewBuffer != NULL) { CallbackEntry->EndPointer = (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer + (CallbackEntry->EndPointer - CallbackEntry->StatusCodeDataBuffer); + RscData = (RSC_DATA_ENTRY *) (UINTN) ((UINTN) NewBuffer + ((UINTN) RscData - CallbackEntry->StatusCodeDataBuffer)); CallbackEntry->StatusCodeDataBuffer = (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer; CallbackEntry->BufferSize *= 2; } -- 2.16.3.windows.1