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 B49C2A0093 for ; Wed, 9 Mar 2022 12:02:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0FBC410E6; Wed, 9 Mar 2022 12:02:57 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 63D4140687 for ; Wed, 9 Mar 2022 12:02:56 +0100 (CET) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2F2293F7DF for ; Wed, 9 Mar 2022 11:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646823775; bh=vYVoR0cC4Zsn+xmf9o7HcDITRDx9UoX0GPyaweRMjs8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c+JImloqMQJ8pwg5PYhtwNUvehIyT+VIyVTSIKemVKnqssjin3nxVtm7UBKpNH5ea JZdaGrPCi+bumPakyfPUV4BiCrnCOjzR6PgQCNuIj2nblCtahqcDcHGjxn/HC7Khw7 5XsFzEyWZh/ekqn7/CcZZWMPyRnW0cVf0ip5WJ3eiiKLIYN6pRvcv9A4n8lZkJ+anW xYfHB+35rZla/P9zxYuwhSeWjsQ/2J/oCfV1Fui5VWLuwrMmTi6oR+ZuclYo2zZGS+ +xnQxlaALnTo1VIucfzbFoqn1Mde7fqVHhfbJBxi0dIhERcsuXHSdqVcTA9bFyO+Le DPjBIpZRMr7Tg== Received: by mail-wm1-f69.google.com with SMTP id v67-20020a1cac46000000b00383e71bb26fso670959wme.1 for ; Wed, 09 Mar 2022 03:02:55 -0800 (PST) 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=vYVoR0cC4Zsn+xmf9o7HcDITRDx9UoX0GPyaweRMjs8=; b=JaHeSQeSwl1rizem2j6W6DvfkmUDdQ2ZoIxbbcI5DjgnjHjkFSkDbnI6jDgOyjo67i qc4HsB9mlhKcpLJiP+ww1sfakHplH0cmZn+R32Gc6A8JDjQ3n5t8V62g5YFuRXQfpx7b kFEHEkg/aAOOpsu5zEpdhau9tMzYxp5rpBODIY8LZizEKq+APYEs8LXTPz049SfHI2bl SKWwv8Vsm5GDU6n0crYfPN0ash0/drrd2Cjyfyvte7zBcMx0LCguPHnjMLgh5cT5D2Ti qbaQIOgMoC3o4w0tXh0yJCr3rctxXe4ovOmpNEfDzBnFtc7IOAMcFJ0XS/1CFk+/ohd4 NrDg== X-Gm-Message-State: AOAM531O0FontNQHQ2qRDDqb8DCizwlP89YKtysX8jUO9wFR51xPLDsy B3xUIs607QloqSVJS3mGvx5om3jAtKc+XWMsbwMiDCfQZ3PCWCx0VA8AG6fU6tiAyz1lpzO/Z8+ ISZp/dKLZtUENiRskBxWm4f7O X-Received: by 2002:a05:6000:508:b0:1e4:a027:d147 with SMTP id a8-20020a056000050800b001e4a027d147mr15616835wrf.315.1646823774759; Wed, 09 Mar 2022 03:02:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGgSN2p0zz7wC4OiPvo6SD1g5LcOFzoqeUAdnqEsKW4kjRhI/75SSXBI41HQevsgXtSEOSUQ== X-Received: by 2002:a05:6000:508:b0:1e4:a027:d147 with SMTP id a8-20020a056000050800b001e4a027d147mr15616826wrf.315.1646823774543; Wed, 09 Mar 2022 03:02:54 -0800 (PST) Received: from localhost.localdomain (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id u4-20020adfdb84000000b001e8d8ac5394sm1412993wri.110.2022.03.09.03.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 03:02:54 -0800 (PST) From: christian.ehrhardt@canonical.com To: Bruce Richardson Cc: David Hunt , dpdk stable Subject: patch 'distributor: fix potential overflow' has been queued to stable release 19.11.12 Date: Wed, 9 Mar 2022 12:00:58 +0100 Message-Id: <20220309110116.1295395-27-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309110116.1295395-1-christian.ehrhardt@canonical.com> References: <20220309110116.1295395-1-christian.ehrhardt@canonical.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 19.11.12 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/11/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/1af997fdb0974b24eceff52ddb6d9ae4d2caba3e Thanks. Christian Ehrhardt --- >From 1af997fdb0974b24eceff52ddb6d9ae4d2caba3e Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Thu, 17 Feb 2022 15:02:39 +0000 Subject: [PATCH] distributor: fix potential overflow [ upstream commit 9699b09803b799ddc11abedffb17af059c992e9a ] Coverity flags the fact that the tag values used in distributor are 32-bit, which means that when we use bit-manipulation to convert a tag match/no-match to a bit in an array, we need to typecast to a 64-bit type before shifting past 32 bits. Coverity issue: 375808 Fixes: 08ccf3faa6a9 ("distributor: new packet distributor library") Signed-off-by: Bruce Richardson Acked-by: David Hunt --- lib/librte_distributor/rte_distributor_single.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c index f4725b1d0b..e8a13ce980 100644 --- a/lib/librte_distributor/rte_distributor_single.c +++ b/lib/librte_distributor/rte_distributor_single.c @@ -249,8 +249,7 @@ rte_distributor_process_single(struct rte_distributor_single *d, * worker given by the bit-position */ for (i = 0; i < d->num_workers; i++) - match |= (!(d->in_flight_tags[i] ^ new_tag) - << i); + match |= ((uint64_t)!(d->in_flight_tags[i] ^ new_tag) << i); /* Only turned-on bits are considered as match */ match &= d->in_flight_bitmask; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-03-09 11:57:44.787756305 +0100 +++ 0027-distributor-fix-potential-overflow.patch 2022-03-09 11:57:43.396938405 +0100 @@ -1 +1 @@ -From 9699b09803b799ddc11abedffb17af059c992e9a Mon Sep 17 00:00:00 2001 +From 1af997fdb0974b24eceff52ddb6d9ae4d2caba3e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9699b09803b799ddc11abedffb17af059c992e9a ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - lib/distributor/rte_distributor_single.c | 3 +-- + lib/librte_distributor/rte_distributor_single.c | 3 +-- @@ -21,5 +22,5 @@ -diff --git a/lib/distributor/rte_distributor_single.c b/lib/distributor/rte_distributor_single.c -index de90aa8bb5..2c77ac454a 100644 ---- a/lib/distributor/rte_distributor_single.c -+++ b/lib/distributor/rte_distributor_single.c -@@ -245,8 +245,7 @@ rte_distributor_process_single(struct rte_distributor_single *d, +diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c +index f4725b1d0b..e8a13ce980 100644 +--- a/lib/librte_distributor/rte_distributor_single.c ++++ b/lib/librte_distributor/rte_distributor_single.c +@@ -249,8 +249,7 @@ rte_distributor_process_single(struct rte_distributor_single *d,