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 ED3C9432DA for ; Wed, 8 Nov 2023 20:26:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E761842DAC; Wed, 8 Nov 2023 20:26:29 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 176EC42E27 for ; Wed, 8 Nov 2023 20:26:29 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-32db188e254so26007f8f.0 for ; Wed, 08 Nov 2023 11:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471589; x=1700076389; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AGdwLXeloOrCqYDn/1hZgXy2JIFyuDjZ8jZEpsO1I+A=; b=gajhdMlC6hGeAGauYEWcJUGFrXSS0uaw5L0xJlyP8KiygDv4o3aszu9BHhLwu3SZtN 2ZhNbpio7Aw+D7iYtBzx+4nr5/wbn4QlSQBOHixaOkaK7pM5vZrau07ghmyqH8NNi6Xb 00UbuNnVEWDX4OMgDTN6kt1JtgtGnz/FWGo9TCk8VVtiilJti+NCiltB+1jTakP+e7Mv LssRt2NHdottr5uualxzGHBnEgMQQMI8Ou+79S4AJN1iyNtbYLqsES4GWPc2N3j/H/Qo AFZTdB01KInqEsjCUUUMiOHFjUJ3YkhWRDTPr9DbDk1v9QMbe9ecZg9Md2LzMBG+ZiQ0 geWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471589; x=1700076389; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AGdwLXeloOrCqYDn/1hZgXy2JIFyuDjZ8jZEpsO1I+A=; b=FsqUeIAG5Wm4WulPJ6vPxAMRyTgdcqaXv46H3/wb04zUGtd6txEdeZkrWpwxIJlT07 vBqrLUBJRKGn66t7wJNoM2LW8//+n9/etk9oYGQDNZtbp2cexCk4WjeS0uOpjO78OXXW VRfb+UHFaV0UXg7P4suzZ6ESJ5tZs0JvzWZUn2ce49ay1gjk8HqblWTP+/e40sGWkmh4 UvuIUZ9qylEY9tvI2DTIm+bPAxhl+wD6CkWQs1ILOsNQkXhz6j1k57s/9Ze6jM8fR/CF jH4p9+Du+rpu4GK4ClcFxY3a2D5MJy51CYuQkEaEGaf9OJdM/N7IBrVGrUFH/nBzH6Fb cCXg== X-Gm-Message-State: AOJu0YxiPIxjeyQRARRm5Mt9XgyunQL4cF2ABhWRbhp0GSMzrLG9dF8I SnG0FndVoZ22NcuzirjHx8I= X-Google-Smtp-Source: AGHT+IFx+aUHP+7Ga6LBUmKCF7VCSbqEWxI0gJzTzoHo7kUK3BSScGwG7lY3ol6Xx8s5tFVgutXI4Q== X-Received: by 2002:a05:6000:1866:b0:32d:8c6d:cda4 with SMTP id d6-20020a056000186600b0032d8c6dcda4mr2596385wri.43.1699471588657; Wed, 08 Nov 2023 11:26:28 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id h11-20020adfe98b000000b00318147fd2d3sm5598971wrm.41.2023.11.08.11.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:26:28 -0800 (PST) From: luca.boccassi@gmail.com To: Ruifeng Wang Cc: Luca Boccassi , Ori Kam , Ferruh Yigit , dpdk stable Subject: patch 'ethdev: fix 32-bit build with GCC 13' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:16 +0000 Message-Id: <20231108192535.922238-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 20.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/10/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/6cdc03899a13bacd67bdb887377f69b2993b02ca Thanks. Luca Boccassi --- >From 6cdc03899a13bacd67bdb887377f69b2993b02ca Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Wed, 1 Nov 2023 15:15:54 +0800 Subject: [PATCH] ethdev: fix 32-bit build with GCC 13 [ upstream commit 3d67012ab70252190fcfea12c122567a4d010228 ] aarch32 build with gcc-13.0.1 generated following warning: In function 'memcpy', inlined from 'rte_memcpy' at .../eal/arm/include/rte_memcpy_32.h:296:9, inlined from 'rte_flow_conv_action_conf' at .../rte_flow.c:726:20, inlined from 'rte_flow_conv_actions' at .../ethdev/rte_flow.c:936:10: warning: '__builtin_memcpy' specified bound 4294967264 exceeds maximum object size 2147483647 [-Wstringop-overflow=] The issue is due to possible wrapping in unsigned arithmetic. The 'size' can be 0. 'off' is 32. When 'tmp' is equal to (unsigned)-32, the copy length is more than half the address space. Hence the warning. Cast variables to 64-bit to avoid wrapping. Fixes: 063911ee1df4 ("ethdev: add flow API object converter") Reported-by: Luca Boccassi Signed-off-by: Ruifeng Wang Acked-by: Ori Kam Acked-by: Ferruh Yigit --- lib/librte_ethdev/rte_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c index a06f64c271..5a0f1feb0c 100644 --- a/lib/librte_ethdev/rte_flow.c +++ b/lib/librte_ethdev/rte_flow.c @@ -580,7 +580,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size, if (src.rss->key_len && src.rss->key) { off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->key)); tmp = sizeof(*src.rss->key) * src.rss->key_len; - if (size >= off + tmp) + if (size >= (uint64_t)off + (uint64_t)tmp) dst.rss->key = rte_memcpy ((void *)((uintptr_t)dst.rss + off), src.rss->key, tmp); @@ -589,7 +589,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size, if (src.rss->queue_num) { off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->queue)); tmp = sizeof(*src.rss->queue) * src.rss->queue_num; - if (size >= off + tmp) + if (size >= (uint64_t)off + (uint64_t)tmp) dst.rss->queue = rte_memcpy ((void *)((uintptr_t)dst.rss + off), src.rss->queue, tmp); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:52.912025432 +0000 +++ 0018-ethdev-fix-32-bit-build-with-GCC-13.patch 2023-11-08 19:23:51.785396541 +0000 @@ -1 +1 @@ -From 3d67012ab70252190fcfea12c122567a4d010228 Mon Sep 17 00:00:00 2001 +From 6cdc03899a13bacd67bdb887377f69b2993b02ca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3d67012ab70252190fcfea12c122567a4d010228 ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ - lib/ethdev/rte_flow.c | 4 ++-- + lib/librte_ethdev/rte_flow.c | 4 ++-- @@ -32,5 +33,5 @@ -diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c -index 4d6c28ee0e..20ee8430ea 100644 ---- a/lib/ethdev/rte_flow.c -+++ b/lib/ethdev/rte_flow.c -@@ -724,7 +724,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size, +diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c +index a06f64c271..5a0f1feb0c 100644 +--- a/lib/librte_ethdev/rte_flow.c ++++ b/lib/librte_ethdev/rte_flow.c +@@ -580,7 +580,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size, @@ -45 +46 @@ -@@ -733,7 +733,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size, +@@ -589,7 +589,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size,