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 B8DE6A0A0E for ; Mon, 10 May 2021 18:13:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2B6240140; Mon, 10 May 2021 18:13:23 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2053.outbound.protection.outlook.com [40.107.95.53]) by mails.dpdk.org (Postfix) with ESMTP id 5ACED40140 for ; Mon, 10 May 2021 18:13:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T4Jb5JKDFv5lZasQrePOcYeQtqSy6B8YDg7/wKscxLjm4tV/BEAdImK/OGkTzxqwxGwIuv3ZnjC2ELjWOUILmYN75fd1oSkhDjQrCivDfAez/0Nb1MHCu/ELXWxtX1+p7/h1wM9kodWSBw0fvIra5mwg1gFh0hyLtqdX/8tLjT8zr7/xbdzyp2O1KTFL26neC9OtRi4/vF4BT7TwUJ40zV1w+/ZWWMKD7VCzgCZO5UzGTMjRYVJE8ly650qiKt/38OqvFwcwiLSAPUSaiZ6EWyZT/wvI41m3ggeM2vjJhWxZTw54hhWVd7Xp+MUpc9VrPTfCCrAIqXGuSaEkFIaBXw== 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=vuS5MdxD12GhWiAC76VmYcdv5T3knmCGoY1SmfYJuQA=; b=klWSbIgD2NZKF53o35LohxAT2WT0QXJLAn0JVp4vcTYLCoes9cqkR2PY+oMhapC9qxDFMLtnJKdP2txiANycelYOAsf3cWbKt3uK6/KB4Ti36Z8dnC1+XY6bDU3LcYEvNWQlc/oF/wO5ncfoNA73sdItpxy+8dhwrxIrDgy4+SwWbBGJCq+tsD1HYpMQzB8tjp+tFcx83EyluMuxNsjFSTvtrbyv1ghTBshHwytzIx5UpPI/010hMp1nC1Oro7MRSjUCejMGl/noPxFcFS6Im2Q08AKendxrO8oJtk/PJW1qLAKGvh0SLM2WsBTFOqR7TZ8k3APcWXSy0oniE6MgNQ== 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=vuS5MdxD12GhWiAC76VmYcdv5T3knmCGoY1SmfYJuQA=; b=JpbHwGEc045iY346w0vDcfdg6oJ3WynwZjq4fXp98xv5syghxPF6Drr/D87t04ShmNOaUJuB9cHy2UDxSiNgxEQOCHIIAAJwIpRrHPz4oQSNr1dVS4iR6LOKX+6BdK74SPNqHDNotYwSfBOtJXk70DyzdhgRIKnVAdrvIvCskDvAMro/QP/7odlGEFVaY0D3VxhyLUXpETqxaGJOs7rBl9ip9HfWu6zGjyUUXw3Ey7lSwfabSh5a7XizIKAOWy//4rH4ExhvPi/knC9aYi1bgrO6F1/5yOVfySHv2pwYuzWhJfwzjZY9f7Bj2NeA5j0QNT/gyADgl3+1PFqk+naS0w== Received: from MWHPR01CA0042.prod.exchangelabs.com (2603:10b6:300:101::28) by MWHPR12MB1231.namprd12.prod.outlook.com (2603:10b6:300:e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:13:20 +0000 Received: from CO1NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:300:101:cafe::ce) by MWHPR01CA0042.outlook.office365.com (2603:10b6:300:101::28) 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:13:20 +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 CO1NAM11FT051.mail.protection.outlook.com (10.13.174.114) 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:13:20 +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:13:18 +0000 From: Xueming Li To: Qi Zhang CC: Luca Boccassi , Ferruh Yigit , Qiming Yang , dpdk stable Date: Tue, 11 May 2021 00:00:50 +0800 Message-ID: <20210510160258.30982-101-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: cf5b40c2-ef9a-47bd-3612-08d913ce8784 X-MS-TrafficTypeDiagnostic: MWHPR12MB1231: 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: JF/op6x4ZcyLZ7U05cFUdlpQudghNrxBe/IJd2YQZJU5MdLcmSsoLRxM2UfI/9LE4akO0F2ZFFTY5NDQ/tn0nB9fkPnf0/pmEq8Q5m21BdUvFR1mLtrGx6/y4WZbXWHGcfQ8qWvWruZ4GoHLdVYMSQM4rqDgaEnwG/hLZZ86W6w7sadI5pmoAt1Sqhi4jxZ/6oeuoz+eWfW46JFz66kqtfOboQbeg/g6EdR3/zg0YKUqOwq27E9F6Cs1SYiHZUzcdryguV4P3YutOmLDE+p58kv2QzHO9HdQsAaVqvE6HLNp4rw6WaW4eytEWFg1bf/2vlISD515HcMThV1cgS/LsVpMq1C/AzCBm8gaaWsKtcOr5RL0+4G0z1UoxR8p/4xqAzaHOAT8nthL+HUVA6h7eT7kJQNC6ws93LNQabGCmFpOmd8UvoZT0ld4Lzar+s3SJ5v5HMSPXV4X2CQEMpdy+/JDD/UHRZI3oKhNjSshHmJMWUOY5RFPo/ybiQxBZ9r6e+GazlvwzGieuJYKGr1DE4fBMBMZEW1MHU6VQqnZyUE65BDl7CLRarwCNaC+ayU+uVeKl5JiXfSqgyVeK54BJSginD+SAtjtcjT/f62LQV7Z2lB7ZapwLx0TOsY6rOVXnkijXE5Q+gyfHTneY/KSBEJkjAxQYKnNUqOr3FFH97DZmObEmTEMiNMlk9JB+iUBdO4514+NIy5e4ewaAGrQx7m24ZDhj2pMBXLLoBP3T2rt5nCCqBq3BFewGkI7OcMV64tn8Nq03Lg5qAX8k9qkrw== 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)(396003)(39860400002)(346002)(136003)(376002)(46966006)(36840700001)(356005)(186003)(86362001)(478600001)(70586007)(7636003)(966005)(82740400003)(5660300002)(53546011)(1076003)(83380400001)(70206006)(4326008)(36756003)(8676002)(8936002)(36860700001)(316002)(7696005)(55016002)(36906005)(26005)(2616005)(2906002)(16526019)(426003)(6916009)(82310400003)(54906003)(6286002)(336012)(6666004)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:13:20.6465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf5b40c2-ef9a-47bd-3612-08d913ce8784 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: CO1NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1231 Subject: [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' 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/162f87fce1d311e9a3d6556c583fa3aa7db0cf2f Thanks. Xueming Li --- >From 162f87fce1d311e9a3d6556c583fa3aa7db0cf2f Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 17 Mar 2021 14:02:19 +0800 Subject: [PATCH] net/ice/base: fix memory allocation for MAC addresses Cc: Luca Boccassi [ upstream commit 78b52e3878c6496748cba2028f8cb9080435cb46 ] Not enough memory be allocated for dev->data->mac_address which cause out of bound memory access when iterate all mac addresses by dev_info.max_mac_addrs. Fixes: f9cf4f864150 ("net/ice: support device initialization") Reported-by: Ferruh Yigit Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/ice_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index f4874632cd..b6d940c2ff 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -805,7 +805,7 @@ ice_init_mac_address(struct rte_eth_dev *dev) (struct rte_ether_addr *)hw->port_info[0].mac.perm_addr); dev->data->mac_addrs = - rte_zmalloc(NULL, sizeof(struct rte_ether_addr), 0); + rte_zmalloc(NULL, sizeof(struct rte_ether_addr) * ICE_NUM_MACADDR_MAX, 0); if (!dev->data->mac_addrs) { PMD_INIT_LOG(ERR, "Failed to allocate memory to store mac address"); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.235470400 +0800 +++ 0102-net-ice-base-fix-memory-allocation-for-MAC-addresses.patch 2021-05-10 23:59:26.480000000 +0800 @@ -1 +1 @@ -From 78b52e3878c6496748cba2028f8cb9080435cb46 Mon Sep 17 00:00:00 2001 +From 162f87fce1d311e9a3d6556c583fa3aa7db0cf2f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 78b52e3878c6496748cba2028f8cb9080435cb46 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 5a1190d50e..3e85e5f629 100644 +index f4874632cd..b6d940c2ff 100644 @@ -24 +26 @@ -@@ -809,7 +809,7 @@ ice_init_mac_address(struct rte_eth_dev *dev) +@@ -805,7 +805,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)