From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2E1851B129 for ; Thu, 3 Jan 2019 09:14:42 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Jan 2019 10:14:40 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x038EJfe008603; Thu, 3 Jan 2019 10:14:39 +0200 From: Yongseok Koh To: Andy Green Cc: Alejandro Lucero , dpdk stable Date: Thu, 3 Jan 2019 00:13:34 -0800 Message-Id: <20190103081400.14191-11-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190103081400.14191-1-yskoh@mellanox.com> References: <20190103081400.14191-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/nfp: fix memcpy out of source range' has been queued to LTS release 17.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 08:14:42 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/04/19. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 7f2dc097bff7b6d6e72a2c37882974161cfa1e7b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 14 May 2018 13:00:32 +0800 Subject: [PATCH] net/nfp: fix memcpy out of source range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 1bcb5ecb179cbca81ff3fe15432326c1c3ca9e9b ] drivers/net/nfp/nfp_net.c:669:2: error: ‘memcpy’ forming offset [5, 6] is out of the bounds [0, 4] of object ‘tmp’ with type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=array-bounds] memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); Fixes: e6decee38209 ("net/nfp: use random MAC address if not configured") Signed-off-by: Andy Green Acked-by: Alejandro Lucero Tested-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index cf9d345c0..c3958d045 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -666,7 +666,7 @@ nfp_net_vf_read_mac(struct nfp_net_hw *hw) uint32_t tmp; tmp = rte_be_to_cpu_32(nn_cfg_readl(hw, NFP_NET_CFG_MACADDR)); - memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); + memcpy(&hw->mac_addr[0], &tmp, 4); tmp = rte_be_to_cpu_32(nn_cfg_readl(hw, NFP_NET_CFG_MACADDR + 4)); memcpy(&hw->mac_addr[4], &tmp, 2); -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-02 23:59:12.697148186 -0800 +++ 0011-net-nfp-fix-memcpy-out-of-source-range.patch 2019-01-02 23:59:12.041816000 -0800 @@ -1,4 +1,4 @@ -From 1bcb5ecb179cbca81ff3fe15432326c1c3ca9e9b Mon Sep 17 00:00:00 2001 +From 7f2dc097bff7b6d6e72a2c37882974161cfa1e7b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 14 May 2018 13:00:32 +0800 Subject: [PATCH] net/nfp: fix memcpy out of source range @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 1bcb5ecb179cbca81ff3fe15432326c1c3ca9e9b ] + drivers/net/nfp/nfp_net.c:669:2: error: ‘memcpy’ forming offset [5, 6] is out of the bounds [0, 4] of object ‘tmp’ with type ‘uint32_t’ {aka ‘unsigned int’} @@ -13,7 +15,6 @@ memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); Fixes: e6decee38209 ("net/nfp: use random MAC address if not configured") -Cc: stable@dpdk.org Signed-off-by: Andy Green Acked-by: Alejandro Lucero @@ -23,10 +24,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c -index 8a712d696..80dc2731c 100644 +index cf9d345c0..c3958d045 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c -@@ -527,7 +527,7 @@ nfp_net_vf_read_mac(struct nfp_net_hw *hw) +@@ -666,7 +666,7 @@ nfp_net_vf_read_mac(struct nfp_net_hw *hw) uint32_t tmp; tmp = rte_be_to_cpu_32(nn_cfg_readl(hw, NFP_NET_CFG_MACADDR));