From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.59]) by mx.groups.io with SMTP id smtpd.web08.9671.1633701994467991255 for ; Fri, 08 Oct 2021 07:06:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ogq2H4I8; spf=pass (domain: arm.com, ip: 40.107.8.59, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Ec68ewgyyVffBUSY21GUV7SL9PjA8+leLxm+42CjW8=; b=ogq2H4I85sQq6WkHlWp6Gp7wi8P593/tn/gwXtEIbiV6n8HELT8fZqtSeKNAuN6eTUiaD4URyyG9S8/hagmCFcCSV97DSny8B69kOxCHkl/xiPgSCuW74PB2wXoXJrzldK4IdYw5RdOECkRoOh6fd+0xgLTxwT6YjC0st/CxGww= Received: from DB6PR0802CA0035.eurprd08.prod.outlook.com (2603:10a6:4:a3::21) by PR3PR08MB5627.eurprd08.prod.outlook.com (2603:10a6:102:83::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Fri, 8 Oct 2021 14:06:31 +0000 Received: from DB5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a3:cafe::1e) by DB6PR0802CA0035.outlook.office365.com (2603:10a6:4:a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Fri, 8 Oct 2021 14:06:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT052.mail.protection.outlook.com (10.152.21.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 14:06:31 +0000 Received: ("Tessian outbound 2e7020cc8961:v103"); Fri, 08 Oct 2021 14:06:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d17b6a5b7040c016 X-CR-MTA-TID: 64aa7808 Received: from 4fd7783c90ec.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 137AC841-D662-4764-B9CF-4A3F7990B9F3.1; Fri, 08 Oct 2021 14:06:20 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4fd7783c90ec.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 08 Oct 2021 14:06:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d3dvQvVHzLaJEIO4gwMYyftC2d4TQ5jgt4xWXMmDwd3MDWTLW2CAsnNAi8nlJKic4X9OO60FsL2bQK/EUor+H3xpGhvPxmbS/+VHEPDBWxjPJuAo2CyRPAaTFF3UsB42G0eWiVNUD0GNreJ+DpWALbvuc+6X1j+MSoXKykNFtj+B1pPtx2zEzUMobc4mcCb/KQvPLn24xq5h2wk5INkoiCYh0qAZ4GOH4RBFeMycqi0YE+x0pH1VIsjhtXGunVc6snYtd++5AlINFzPt8W07VOr01sYD1+Vx/Qotwjezpy7O0OXPPSdlyepJe2pHrT16ognTyzwLsfSa4gyN9Tbqjw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2Ec68ewgyyVffBUSY21GUV7SL9PjA8+leLxm+42CjW8=; b=mQ5ZEFyFY0KsnI4vjaWN8rM+VcNCGap4Dck3GZkPH/MjH0oT68//omAu8r4woBFD62HxK4uO8SqqRCOYjq83ixpD4EKxrzPxvXZME9Hef/wYVBTTll2UbOkzE5WmH2+xmBOjqOxH7JKYuYbCFOGVzXSY4qYhIvN5aTTpC9f0fMP1vgIgXcYEj85DYoaCcbAyx23Ye1+vd1hnjRQAVMssEhJPP12ikvZisVU3Zv9ILRlbXD8PdzYeJJh5OxFHhHNGsfcVRGSZoIrMw2R8PhNgbm7Dg+EGCH5d7z3BLtANm4y0hPUbPfpt69OQFZIluyVyw89GeJrcbRkEGXGyvmtJdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Ec68ewgyyVffBUSY21GUV7SL9PjA8+leLxm+42CjW8=; b=ogq2H4I85sQq6WkHlWp6Gp7wi8P593/tn/gwXtEIbiV6n8HELT8fZqtSeKNAuN6eTUiaD4URyyG9S8/hagmCFcCSV97DSny8B69kOxCHkl/xiPgSCuW74PB2wXoXJrzldK4IdYw5RdOECkRoOh6fd+0xgLTxwT6YjC0st/CxGww= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB3383.eurprd08.prod.outlook.com (2603:10a6:20b:50::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Fri, 8 Oct 2021 14:06:18 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4587.022; Fri, 8 Oct 2021 14:06:18 +0000 Subject: Re: [PATCH v2 02/21] DynamicTablesPkg: Add missing parameter check To: Pierre.Gondois@arm.com, devel@edk2.groups.io, Alexei.Fedorov@arm.com, nd References: <20211007153210.26608-1-Pierre.Gondois@arm.com> <20211007153210.26608-3-Pierre.Gondois@arm.com> From: "Sami Mujawar" Message-ID: <94979bf7-b709-da6b-dadc-f174598ebd21@arm.com> Date: Fri, 8 Oct 2021 15:06:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20211007153210.26608-3-Pierre.Gondois@arm.com> X-ClientProxiedBy: LO4P123CA0123.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::20) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0123.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.21 via Frontend Transport; Fri, 8 Oct 2021 14:06:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d0a909f-f572-4f23-c993-08d98a64d48c X-MS-TrafficTypeDiagnostic: AM6PR08MB3383:|PR3PR08MB5627: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1227;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: tCAWEfRTWCXDBUJQWNv10hdo5emskpmEP4QcFdDidKdPlVTvboeLTdJCl5MItLd4CN1uqZW/JKuIzqT/4DPZ+OBCZ2PeQ7hJrC0IpClBHZvwkiqBXPuupNif5Em/JKKaeoPZG8dp1iibPB07jidZxl4o6rDKFlZrg5T6P3v/i067wgP1BAD660XqjDpl8oiE6onU+ss0YtJ704/MuZhfqdSnMI6Mlux9i9N9g7ECVcB+KHM9LqTWdLPVCbXPKamDWK7rg+fQCs3dfv5eslg40+S2rBV3xGggxWCwTvHfQbpAs3ynHiJuzbtdUH52HG2Yro9tg3svEXLuCNyQu9pfRULZhYyMiM+QoE2nm2AhO7HpwpYnQB9obkZa/IECi46CWuw9ynmmkUzgxwJMN7HgxT7zkH/Jvy8Udh/qFC4casJlBXpUV7AQSFqJnNVHZjhnlrW5EYHpLeZZPuswLhXLoyeSCcIET+q9K8AiJ/c258f9cNzEYPFfYxybLUfEujAW7kW7tE6FEM/lXe0vPhw8bRCsIKhXtfwrcRMFxrJwMgcQrYPkw49M+UO0PzNCCs0YPItjkAzRS4WeYBhYSocCYhzS4Ne8pnrZipqpyBM8O0BIUlG65UUsBy9/KTyenJ9pM7q95b0Ra92mNLKiozm4GF+Ak3gBkFPp8LTTDUTii195frauX2RbfLamXJKuuGG3O8YsBLYaMRo3x9FNE7GOal/YiOohywMPdS6jEXe/xvOFKQUD4hxwATSsBvY1BpWlJKkJ1AVymUcZu/t7/3BBCw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(8936002)(86362001)(38100700002)(26005)(6862004)(38350700002)(6636002)(44832011)(508600001)(36756003)(53546011)(37006003)(316002)(16576012)(2616005)(66556008)(6486002)(5660300002)(186003)(66476007)(956004)(66946007)(52116002)(2906002)(8676002)(83380400001)(31686004)(31696002)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3383 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5dbdc820-df34-40e0-a162-08d98a64cc81 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NHnJ53G0lKsSvh7n4qmTe2nfURGLgFKwhbFisIpXaOLonFY7Na0h0DFoGMAhgNFS/retPdh+d5PjOv0XhxPFINTMi3SRZ+IQM5rkEWNNWYHOYrGKyiOF/X4rdPdWnfITfcOlgdReAVmxGoPLV8fUwuIEJhF0S/3VMCfCRP3lwXRMPR31qQZ90VXDah7hatkAX5O6HCqrXDHLWDjQKSCG/W+EKs/nzfXzNteE6r83r/U3gwohaKlN+soDeol0LGoDwwmG7Q0QqZS8kcYQdPdu4bjm2YcUsPlevRmcrEttXhwlTkCiFMFGVlqHb+gmTphQpwD2usAWoYk8C+aa9wPJAemIZ+PUzeuvdMhXhrECXQwpbkXGmYA5jVbo0zAEtJYdidAd2RBLzTmGjQDH24m658cRAlPlvdgwmwklZW4Z6LMW9gN8S6NfAjsH4XdIgbK7vD4vwBwsHsveob16f8PxVrF/gLZUOp4Y1YaysTODk3AvnM0V9+shBIURnCjMw39Kcwk001Tolam4Bbfn+c2sOxyo/+fnLHAufYXlShUgA5z9aW1/EnyMYrIfAlHANgiNC9I0554L5f+qwmfoDO0LOgM7P/C3LOsGFKLlaevKHgUCzZy/OIRPxZoDvk50bzx6G2ZyI5RqEEHNOmlIiwvFyPhms11alb3V0TQOfwZmadofX4jX67arZj4ioJM3xMBGd1xp3+3wcroOh21XGQv/hkiFAdIluWLCGuRYDmoJJl0= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(2616005)(2906002)(5660300002)(82310400003)(6666004)(336012)(36756003)(8936002)(6862004)(86362001)(316002)(53546011)(508600001)(356005)(6486002)(47076005)(44832011)(8676002)(83380400001)(31686004)(16576012)(31696002)(26005)(6636002)(70206006)(36860700001)(70586007)(956004)(186003)(37006003)(81166007)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 14:06:31.6805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d0a909f-f572-4f23-c993-08d98a64d48c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5627 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-GB Hi Pierre, This patch looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 07/10/2021 04:31 PM, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois > > Add missing check of 'AcpiTableInfo' in AddAcpiHeader(). > > Signed-off-by: Pierre Gondois > --- > > Notes: > v2: > - New patch. [Pierre] > > DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c= b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c > index 9249e6b87f70..f98da7ffdd67 100644 > --- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c > +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c > @@ -122,11 +122,13 @@ AddAcpiHeader ( > ASSERT (CfgMgrProtocol !=3D NULL); > ASSERT (Generator !=3D NULL); > ASSERT (AcpiHeader !=3D NULL); > + ASSERT (AcpiTableInfo !=3D NULL); > ASSERT (Length >=3D sizeof (EFI_ACPI_DESCRIPTION_HEADER)); > > if ((CfgMgrProtocol =3D=3D NULL) || > (Generator =3D=3D NULL) || > (AcpiHeader =3D=3D NULL) || > + (AcpiTableInfo =3D=3D NULL) || > (Length < sizeof (EFI_ACPI_DESCRIPTION_HEADER)) > ) { > return EFI_INVALID_PARAMETER; IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.