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 2B9F1A0350 for ; Mon, 28 Feb 2022 22:23:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20F0241181; Mon, 28 Feb 2022 22:23:07 +0100 (CET) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mails.dpdk.org (Postfix) with ESMTP id DA51940140 for ; Mon, 28 Feb 2022 22:23:03 +0100 (CET) Received: by mail-ed1-f54.google.com with SMTP id x5so19387860edd.11 for ; Mon, 28 Feb 2022 13:23:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xNZho4DY+cUz+4g5/szu3Ddj+eKSpyPoTUbDfmiLvOk=; b=q0k0ihmhYlN900pW8xURCF4VMWgTIucxKOLHjf3PWU+HX53tZVQSgsD2o0smDM2LxU Q2QT8HImVZH7ZEZiyYinEmsszu2wSIRON6OGULa82cKvy4JAzDX4kp/f0nvrTDKfJybH Fi3DyamCouAe6koPXYgIQV32nkD+8bFwAJVqXLy94KvhnFf8QhYomvKLuaUPLgNlf6d/ 6EPvjJuuDhSKg5zOsqJeTKLtIxZGWkYJrHBHmLbWSqHqAiDGy0s4tZ5oI2xa4Z8bvC7f hEcWkwulchprUO4hwC/x9g0HOjTaqU9Wo81PvZdWM9HyGsGBuxS6NTejZUTYsyjM/jVH AqrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xNZho4DY+cUz+4g5/szu3Ddj+eKSpyPoTUbDfmiLvOk=; b=hcmR2qcF3kST+PzFwZI1jnAB0p1eZPNKUDvTkapmt90EF277jui7KZW0s28lShtSEQ nT3bCc6Ker3UYfZLNRzvwus26Fhst+EcQxaT4by5W/84n1tYG+EkJlRykOO3ucLXLSkJ Mq21NqezZ5RGIs9ZgNmL+MGriQdbjKIgxtYYavLxqw64voiC3v4Cw/W+YLCvf1AyXgaH V81VQoV6rkAchbLH1THa/ah7kfYMPWHsS5KqAsYKzWhleoPdM4lpKJy++7czuv1HPQBb EgLWqnvgfICz8rd4OYvQ0/xxj0M3z9K1pcjCILCbOYJjwubnTe7APkOskTMocsVYGuiv iDBQ== X-Gm-Message-State: AOAM530IOrfeaiBthGqF8/TjMZh4emmhQYviiSYTQY6bEwYOl1ZuGsbM Wi4BbP0ATLeS/ZSgYqnVOCrUbYgY9eGIeDGc X-Google-Smtp-Source: ABdhPJzkbu9NomYlWz18cI4wnjW4p1HBIdqXkZNt/f44nl9tWl4q6BBXTEj2tx+WPdMvuD2dsLa4Ig== X-Received: by 2002:aa7:d49a:0:b0:410:875c:e21b with SMTP id b26-20020aa7d49a000000b00410875ce21bmr21385751edr.357.1646083383642; Mon, 28 Feb 2022 13:23:03 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id 20-20020a17090601d400b006caff964e30sm4822243ejj.19.2022.02.28.13.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 13:23:03 -0800 (PST) From: luca.boccassi@gmail.com To: Steve Yang Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/i40e: fix unintentional integer overflow' has been queued to stable release 20.11.5 Date: Mon, 28 Feb 2022 21:20:41 +0000 Message-Id: <20220228212047.3341966-45-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228212047.3341966-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-122-luca.boccassi@gmail.com> <20220228212047.3341966-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.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 03/02/22. 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/2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c Thanks. Luca Boccassi --- >From 2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Fri, 25 Feb 2022 02:39:47 +0000 Subject: [PATCH] net/i40e: fix unintentional integer overflow [ upstream commit df5807658026e7b18493a6c8ebf0e47adee26b4d ] Cast 1 to type uint64_t to avoid overflow. CID 375812 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) overflow_before_widen: Potentially overflowing expression 1 << 2 * i + 1 with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type uint64_t (64 bits, unsigned). Coverity issue: 375812 Fixes: 5fec01c35c49 ("net/i40e: support Linux VF to configure IRQ link list") Signed-off-by: Steve Yang Reviewed-by: Ferruh Yigit --- drivers/net/i40e/i40e_pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index ddba055805..7ec8209f09 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "i40e_logs.h" #include "base/i40e_prototype.h" @@ -597,14 +598,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf, tempmap = vvm->rxq_map; for (i = 0; i < sizeof(vvm->rxq_map) * BITS_PER_CHAR; i++) { if (tempmap & 0x1) - linklistmap |= (1 << (2 * i)); + linklistmap |= RTE_BIT64(2 * i); tempmap >>= 1; } tempmap = vvm->txq_map; for (i = 0; i < sizeof(vvm->txq_map) * BITS_PER_CHAR; i++) { if (tempmap & 0x1) - linklistmap |= (1 << (2 * i + 1)); + linklistmap |= RTE_BIT64(2 * i + 1); tempmap >>= 1; } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-28 21:17:57.552209559 +0000 +++ 0045-net-i40e-fix-unintentional-integer-overflow.patch 2022-02-28 21:17:54.028933351 +0000 @@ -1 +1 @@ -From df5807658026e7b18493a6c8ebf0e47adee26b4d Mon Sep 17 00:00:00 2001 +From 2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit df5807658026e7b18493a6c8ebf0e47adee26b4d ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22,2 +23,2 @@ - drivers/net/i40e/i40e_pf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + drivers/net/i40e/i40e_pf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) @@ -26 +27 @@ -index 2435a8a070..15d9ff868f 100644 +index ddba055805..7ec8209f09 100644 @@ -29 +30,9 @@ -@@ -597,14 +597,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf, +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include "i40e_logs.h" + #include "base/i40e_prototype.h" +@@ -597,14 +598,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf,