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 68ACFA0C47 for ; Tue, 10 Aug 2021 17:44:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6319D411C8; Tue, 10 Aug 2021 17:44:15 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 944C04014F for ; Tue, 10 Aug 2021 17:44:14 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (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-canonical-0.canonical.com (Postfix) with ESMTPS id 799453F230 for ; Tue, 10 Aug 2021 15:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610254; bh=EKX9Q9a5RFqjB+L2mWpu4RBfNnnPKxuLkbyYUdgWuFs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rxCEnYel3clU/WBN0aw9tJcOdERRl/2vQEvd+rQi6rxhevsBLEL86Ue0bxEesD7AP i87mctI1S6JCnA1Mkr9UQ8s4u7GJtimoH2HRwqWa/IWEVrdBGJ4TXqZROOikOUBeQZ Wz1qkq4PqKkvax6ITgeHp8uhkz/EYZRVEIuXycaVpw7Z2uIzkQlGwjiujFML0O7Pwn LXWNafQFPTWMloY4bgHSQ4wwAubRCZYhw+O2Ayf7r0BcS40QSepxS1UtsYt0zrMgSD 4f3LisIv8LbRAK+PwlplF0nXJAPK0WUeKio1uKXklP9DccCPDvalPlfHWcRNRz5oTS uBRH7Vci80u8Q== Received: by mail-ed1-f71.google.com with SMTP id cm18-20020a0564020c92b02903bc7f21d540so10948067edb.13 for ; Tue, 10 Aug 2021 08:44:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EKX9Q9a5RFqjB+L2mWpu4RBfNnnPKxuLkbyYUdgWuFs=; b=TdnvGieUXWYWOeehRnqsnxA9/lVl/fapsan2kq0r8IAuZIPpt4Ax7hNYRtBocajvB8 ++JVAk8jFREVvvtnCqAJ2UxEIywfjBi+oHkKfYk1JeRQ5ebbhBSu6ZJuRDQn9+7VOOpO WtUgwUKdn5CeUv9dXRot49z3wgImOBzNdLLn+LXzlPrm57nuRtl0JslUk1VtFM3ANE+V k99VTzj+MRgC63B6fRMSPT0JwC7xKsz+X2s2TIk0DATyXxtaYc4H/j/+xF17LRCkcQhS G5NEY5Jv9vbz0Z+90SK1zBwrsUMWFey6qzMnSD2BFQ4BfTPDlaxQ8zWjEQNhGzsyh3hf wqYA== X-Gm-Message-State: AOAM531Z1sduFLUdtHCYXi3pQh50y5utFE2l8JsnWhpS1dXKCP7xlYgw LXHRLEegWKdD/Hy63+CMBoFw6BlLNvbYBbC7Hne73ffc8DL8/7zpLTqq4PZCNuWUXDTLxqTtmNF xZ9MipCerL25s4suRyA5S1j40 X-Received: by 2002:a17:906:1fc6:: with SMTP id e6mr1900345ejt.306.1628610254243; Tue, 10 Aug 2021 08:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMTpoCAPYtMLSv0XI7jX2K6x3Y4mdYxORo/g8DODQP043LK96Cqpwo6Gyzpw1QkEaohxslaw== X-Received: by 2002:a17:906:1fc6:: with SMTP id e6mr1900329ejt.306.1628610254078; Tue, 10 Aug 2021 08:44:14 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id fp5sm3646319ejc.6.2021.08.10.08.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:44:13 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Tue, 10 Aug 2021 17:39:55 +0200 Message-Id: <20210810154022.749358-75-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix overflow in mempool argument' has been queued to stable release 19.11.10 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 19.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 08/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/373eada95f9c09b3f06bf62fd3ab9543c26f3373 Thanks. Christian Ehrhardt --- >From 373eada95f9c09b3f06bf62fd3ab9543c26f3373 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Thu, 1 Jul 2021 09:39:16 +0300 Subject: [PATCH] net/mlx5: fix overflow in mempool argument [ upstream commit 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 ] The mlx5_mprq_alloc_mp function makes shifting to the numeric constant 1, for sending it as a parameter to rte_mempool_create function. The rte_mempool_create function expects to get void pointer (uintptr_t, might be 64-bit) and instead gets a 32-bit variable, because the numeric constant size is a 32-bit. In case the shift is greater than 32 the variable might lose its value even though the function might get 64-bit argument. Change the size of the numeric constant 1 to uintptr_t. Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index e3f41d121d..c0605637a7 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1683,7 +1683,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) snprintf(name, sizeof(name), "port-%u-mprq", dev->data->port_id); mp = rte_mempool_create(name, obj_num, obj_size, MLX5_MPRQ_MP_CACHE_SZ, 0, NULL, NULL, mlx5_mprq_buf_init, - (void *)(uintptr_t)(1 << strd_num_n), + (void *)((uintptr_t)1 << strd_num_n), dev->device->numa_node, 0); if (mp == NULL) { DRV_LOG(ERR, -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:15.911775885 +0200 +++ 0075-net-mlx5-fix-overflow-in-mempool-argument.patch 2021-08-10 15:11:13.082638562 +0200 @@ -1 +1 @@ -From 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 Mon Sep 17 00:00:00 2001 +From 373eada95f9c09b3f06bf62fd3ab9543c26f3373 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 23685d7654..dacffc9251 100644 +index e3f41d121d..c0605637a7 100644 @@ -30 +31 @@ -@@ -1240,7 +1240,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) +@@ -1683,7 +1683,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)