From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24291A0A0E for ; Mon, 10 May 2021 18:06:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A9814003E; Mon, 10 May 2021 18:06:58 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2075.outbound.protection.outlook.com [40.107.244.75]) by mails.dpdk.org (Postfix) with ESMTP id 123A74003E for ; Mon, 10 May 2021 18:06:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ETjfpiqk9s9z6P1F6MR8wTte3/8hzLXBwna5XIf2/oLEzTCssjf2vhX6H84H6HcKX8XMJJ3VVjWZFgwivVYZz/gGOipwDicYvgYpwpFR9m+tqFizkzpiz0AUR0Ie6VKbeFkW7rPjy5ImgazlBoiOHP2LvLAG8fAOSYf2PxswORE5eTuNj1aMdJ/ov6mW45kkr6FLK8SBYPwVJNePOWsaa7syhGLJ/OkD9jBe68drIG0KyKU97UnkUGStpZQ5wDjwJUtWafHkak87jaB/oPtcaYn7c/BMB0EYjhNkBoTQp5Cl33DkWRSL8a2/b1dOXHcpKS90CRy+jKkLDpV7Pw2MAA== 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=mq6HkQI6qxZtVpLs0Asd5wjWOor4ibXHV1C5e5vW2TU=; b=Meb6KqbsIjtkhktcQHOv5gZGeDDl6uauReiyPtBHlrL63hf96QCe3GVW2a3euU0TOFTHznO60gf0h+EcXgCoSmQUURioDeiQv68Aob5Uxn5vqKZBreJPKDdS0/NEYbfrcriPBeCSlGKLAA05ndvVvWolCpBkpgHshMaJ9MxBZHR8JWSRSLA9ZYOIYF9LPx6O7M1ygasajcavr6RwiGDyo/oWUPj5RYwPDG7Hwfdy/Q81ar1NKbJ5ofazEdMzuUia9fZo4HZcDwghvmh0qpzvUpjDKgF114OZCX77somurIxkbNqZIRDtEnx1NLBIVadmGK8DdBLqva/P12Dmmxdb0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mq6HkQI6qxZtVpLs0Asd5wjWOor4ibXHV1C5e5vW2TU=; b=CAXb2yVN8TmhGTvFSIfpr77+F3B46UnvB7alm/nX0sMihMIvLSGgtkO4o+bGCsEfY+TudAceCDbJpiLC1xF7Krmxsavx/RANzHcIA+B5pYNmbO++3hJq0OdxSwEflBhjmCtA8UujARmf8go8V/HhVgcOe0a05A1Gx3FDZG0GgfWCsQqxiBiTRgh97WAiWkXgOYxsnSSWbPMZ2u7v1df/UpZNyDsng/0sDHIZqAx1kc52+F4VZLfYjcttNueNBkwedeyrjtgo7fU+d7yj2Tl8GKnnN6Ew3A9U8c1Pmy+TlLZDacqLFBjlbohCumfZZAx5y5VWGUXzDH7DsMdUIJxgIQ== Received: from BN9P220CA0016.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::21) by DM6PR12MB2892.namprd12.prod.outlook.com (2603:10b6:5:182::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Mon, 10 May 2021 16:06:54 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13e:cafe::77) by BN9P220CA0016.outlook.office365.com (2603:10b6:408:13e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:06:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:06:54 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:06:50 +0000 From: Xueming Li To: Qi Zhang CC: Luca Boccassi , Jesse Brandeburg , Qiming Yang , dpdk stable Date: Mon, 10 May 2021 23:59:46 +0800 Message-ID: <20210510160258.30982-37-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdc58c91-980d-40fc-38fc-08d913cda12f X-MS-TrafficTypeDiagnostic: DM6PR12MB2892: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m/HB/uCh4HgHAc7CGDU9vQGhawflH8donGRR6OITBX3SAVvQEyE2BUCaog7EAFnKQbvpFw6dlH3ICaR8Nlj+qwhNFhxWwGSTefVOCAlC1z5d8uLsMtbhw3B2WmIvgBy0DbOWcRzQQPAJjTFecACBv+BuLR58mOsa0e/FQh0Q1usgJ4ZFZQ6v6KfECZyBaG9Yeo6sdiiLzJxLCVscQyCOL/sE1P9mIKejVDoz3SBb5zUAqBe0jLHWjMGOrliRWuDe6Cw1ZljP6DNix88M/iajAr1LbMYk3KfE44VrJtQfOxES87m+lKcQkUaUSTdbQZNDm3RevfJ6GOO1Op+touGyie7rbYVgDspVz+adnTWHG4CfocVz98FbEfKRCOj3Gv7vPrAG5H9pp1P9cagHz5/xLizLehO8nQkat3j5xcDjUJJ8H0M8AvQi+GK1t7cUqVuLq/lzF2sKi8YYBHxxQBrvXvDz5m/YIyJhmrSQqZL6ctSdBbiIwVvr8nvU10Xih5EvklLG4dK/9SS3WmNQ78c2Eo2TDa5D1eLOgOo7Hn90w00Pp8IS1IEdsedjp9vLDrGtjBA8O6x9CBPwhXwScOAiasMUt+tEF6AbpCvd9HwINzL1EVdEBMmoZ7mMZiGWJF2lckEBPE97cEupv6mHfBdpHZR8SDKD2o1VSKdybO56Tdsw4litr8bOElvYamtQPRelCU8JWNNvb0nGBxV0Sl1tT9Dtr7ioRe2uR9G+iXkgt731sRwEcSNToG7rwz5u6JZLzT/gqEppF5PYjIwDxdQ1mA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(376002)(396003)(46966006)(36840700001)(1076003)(82310400003)(82740400003)(6666004)(83380400001)(336012)(186003)(36906005)(426003)(316002)(7636003)(8676002)(356005)(54906003)(2616005)(36860700001)(16526019)(53546011)(8936002)(5660300002)(26005)(55016002)(6916009)(966005)(478600001)(6286002)(47076005)(36756003)(86362001)(2906002)(4326008)(7696005)(70206006)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:06:54.1226 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bdc58c91-980d-40fc-38fc-08d913cda12f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2892 Subject: [dpdk-stable] patch 'net/ice/base: fix uninitialized struct' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c Thanks. Xueming Li --- >From 8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 2 Mar 2021 15:23:56 +0800 Subject: [PATCH] net/ice/base: fix uninitialized struct Cc: Luca Boccassi [ upstream commit 739dee1f22d9d2d537fe5d38bb90ba29606e0196 ] One of the structs being used for ACL counter rules was allocated on the stack and left uninitialized. Rather than depending on undefined behavior around the .amount member during rule removal, just leave a comment and initialize the struct to zero, as this is a slow path call anyway. This bug could have caused silent failures during counter removal. Fixes: f3202a097f12 ("net/ice/base: add ACL module") Signed-off-by: Jesse Brandeburg Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_flow.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 1b36c2b897..548d998546 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -1732,9 +1732,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts, if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT || acts[i].type == ICE_FLOW_ACT_CNTR_BYTES || acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) { - struct ice_acl_cntrs cntrs; + struct ice_acl_cntrs cntrs = { 0 }; enum ice_status status; + /* amount is unused in the dealloc path but the common + * parameter check routine wants a value set, as zero + * is invalid for the check. Just set it. + */ + cntrs.amount = 1; cntrs.bank = 0; /* Only bank0 for the moment */ cntrs.first_cntr = LE16_TO_CPU(acts[i].data.acl_act.value); @@ -2333,7 +2338,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts, if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT || acts[i].type == ICE_FLOW_ACT_CNTR_BYTES || acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) { - struct ice_acl_cntrs cntrs; + struct ice_acl_cntrs cntrs = { 0 }; enum ice_status status; cntrs.amount = 1; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.650212400 +0800 +++ 0038-net-ice-base-fix-uninitialized-struct.patch 2021-05-10 23:59:26.370000000 +0800 @@ -1 +1 @@ -From 739dee1f22d9d2d537fe5d38bb90ba29606e0196 Mon Sep 17 00:00:00 2001 +From 8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 739dee1f22d9d2d537fe5d38bb90ba29606e0196 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index a081fbe5a4..d123206fc6 100644 +index 1b36c2b897..548d998546 100644 @@ -27 +29 @@ -@@ -1795,9 +1795,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts, +@@ -1732,9 +1732,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts, @@ -43 +45 @@ -@@ -2396,7 +2401,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts, +@@ -2333,7 +2338,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts,