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 AE30FA0C47 for ; Mon, 26 Jul 2021 15:54:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6971410EC; Mon, 26 Jul 2021 15:54:53 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 3678E40DDA for ; Mon, 26 Jul 2021 15:54:53 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id l18so3528135wrv.5 for ; Mon, 26 Jul 2021 06:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HQbkLf6CANK3YoVC+w1LU74fzStBa3jHzb/+TkLu6nA=; b=Q1rHRH7hJR/ZC7Dwtyd1s57Xqfunwv2hsqKabP7R17RFIiKVHocuOh4BDYwP+75UTo gaBIfU6MK4j9jwBJopPCfPrTVqtEjtHf3krvrqCVOeMe0vTD9rnWljE27O74YTEO1uTH RQkDMAbrjJScdtw+u1k1toJ5BtVMupxYLnn9XTQFlefDMTIRFLLyBvncTz1tTKdKMe43 f/BdMH+v7l67B9+bRNA6d6LRicccNi5CMjLXEM5MOCDHVq3UMSsbGDvgY36dFOBOhJWG /fG+xSezPu/JRYh+pjuc0YHowRYv3kGdFoAPIjSVp5MvWqQFQafLEHFduavRacnBVHba uF7Q== 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=HQbkLf6CANK3YoVC+w1LU74fzStBa3jHzb/+TkLu6nA=; b=QHknMbJgqkOgBhbMs98BnDpK79BctI3j+BAOpWaE/0y6cX9u82NId9d4E8sxq3MW3N Ba8v9BNenIHQ5PujFVWKLJ+VXL1LWh1zwpMWaK67V6ITkmb/jxl48ufJjicLNMkqZFAb +azRTgvLppSd+Nf7kyPfbdWa/efT1fQU62t/Ii+BMPac4tH6xjwkThsDUUsqcq6/t/Ks Bf7/qeniCXsehZgqol7wm8etiqHNmhDJ4cQiCqdRAwdvmMvqkpftVEvSzgIHGm0MgERh S6Mj4Y2/EQa/HOhY/QH5S2z0OpxCp8ajPxH1Q/3/f7P2EEqvjeqwjz7rY9A3eYHsX5FA TTmQ== X-Gm-Message-State: AOAM533i/n2nM7J7fjhM3a5qrJCr9ClSMYoQ3bZaeZrDYDDFBJT7HhUR SR1bc2eVzG97ctuTp8lurc0= X-Google-Smtp-Source: ABdhPJwe9sYgj10JxrRyptK9/V2MVEAAbJwyf4zYYwbLEYeSNVGSrAP9HTqPEZxNh6XTp+RDvpkwKA== X-Received: by 2002:a5d:4c52:: with SMTP id n18mr19503888wrt.295.1627307693030; Mon, 26 Jul 2021 06:54:53 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id d67sm15829823wmd.9.2021.07.26.06.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:52 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Mon, 26 Jul 2021 14:52:51 +0100 Message-Id: <20210726135322.149850-28-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.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 20.11.3 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 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/0760fa23a0708f782b96655a2cd759541a88fc40 Thanks. Luca Boccassi --- >From 0760fa23a0708f782b96655a2cd759541a88fc40 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 1a5cf99d51..6207dae8b5 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1310,7 +1310,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:17.291572723 +0100 +++ 0028-net-mlx5-fix-overflow-in-mempool-argument.patch 2021-07-26 13:53:15.857292791 +0100 @@ -1 +1 @@ -From 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 Mon Sep 17 00:00:00 2001 +From 0760fa23a0708f782b96655a2cd759541a88fc40 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 1a5cf99d51..6207dae8b5 100644 @@ -30 +31 @@ -@@ -1240,7 +1240,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) +@@ -1310,7 +1310,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)