From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 04712A0679 for ; Tue, 30 Apr 2019 19:02:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE1BC5F0F; Tue, 30 Apr 2019 19:02:45 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D525C29CB for ; Tue, 30 Apr 2019 19:02:42 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4111C30842B0; Tue, 30 Apr 2019 17:02:42 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-211.ams2.redhat.com [10.36.117.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 430B86D0B7; Tue, 30 Apr 2019 17:02:40 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Fan Zhang , Akhil Goyal , dpdk stable Date: Tue, 30 Apr 2019 18:01:29 +0100 Message-Id: <20190430170133.2331-34-ktraynor@redhat.com> In-Reply-To: <20190430170133.2331-1-ktraynor@redhat.com> References: <20190430170133.2331-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 30 Apr 2019 17:02:42 +0000 (UTC) Subject: [dpdk-stable] patch 'app/crypto-perf: check range of socket id' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/07/19. 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 can be viewed on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue.git Thanks. Kevin Traynor --- >From f0d2cdc1df0abbb17d9585676261b2b1bf3f418f Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 8 Apr 2019 10:25:14 +0100 Subject: [PATCH] app/crypto-perf: check range of socket id [ upstream commit 64c469b9e7d8faa85745adbfaf02d17cbb5b2bb4 ] The socket_id is used as an array index so should be within the range of zero to max numa nodes. Add a range check to ensure we don't get excessive values. Coverity issue: 336812 Coverity issue: 336829 Fixes: 2c59bd32b70d ("cryptodev: do not create session mempool internally") Signed-off-by: Bruce Richardson Acked-by: Fan Zhang Acked-by: Akhil Goyal --- app/test-crypto-perf/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 953e058c9..0aa0de8bd 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -130,4 +130,9 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs, struct rte_cryptodev_info cdev_info; uint8_t socket_id = rte_cryptodev_socket_id(cdev_id); + /* range check the socket_id - negative values become big + * positive ones due to use of unsigned value + */ + if (socket_id >= RTE_MAX_NUMA_NODES) + socket_id = 0; rte_cryptodev_info_get(cdev_id, &cdev_info); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-30 17:58:15.413061839 +0100 +++ 0034-app-crypto-perf-check-range-of-socket-id.patch 2019-04-30 17:58:13.814139636 +0100 @@ -1 +1 @@ -From 64c469b9e7d8faa85745adbfaf02d17cbb5b2bb4 Mon Sep 17 00:00:00 2001 +From f0d2cdc1df0abbb17d9585676261b2b1bf3f418f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 64c469b9e7d8faa85745adbfaf02d17cbb5b2bb4 ] + @@ -13 +14,0 @@ -CC: stable@dpdk.org @@ -23 +24 @@ -index 175c639fb..4247f6add 100644 +index 953e058c9..0aa0de8bd 100644 @@ -26 +27 @@ -@@ -184,4 +184,9 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) +@@ -130,4 +130,9 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,