From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 19E031B104 for ; Wed, 21 Nov 2018 17:06:00 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C8C82D810; Wed, 21 Nov 2018 16:05:59 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A22A5F7D9; Wed, 21 Nov 2018 16:05:58 +0000 (UTC) From: Kevin Traynor To: Martin Harvey Cc: Andrew Rybchenko , dpdk stable Date: Wed, 21 Nov 2018 16:04:00 +0000 Message-Id: <20181121160440.9014-10-ktraynor@redhat.com> In-Reply-To: <20181121160440.9014-1-ktraynor@redhat.com> References: <20181121160440.9014-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 21 Nov 2018 16:05:59 +0000 (UTC) Subject: [dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Wed, 21 Nov 2018 16:06:00 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001 From: Martin Harvey Date: Mon, 10 Sep 2018 10:33:15 +0100 Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to [ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ] Size of provided memory should be consistent with specified size. Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI") Signed-off-by: Martin Harvey Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/mcdi_mon.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c index 8c0b6f0d9..54f7ae5db 100644 --- a/drivers/net/sfc/base/mcdi_mon.c +++ b/drivers/net/sfc/base/mcdi_mon.c @@ -302,4 +302,10 @@ efx_mcdi_read_sensors( MC_CMD_READ_SENSORS_EXT_OUT_LEN)]; uint32_t addr_lo, addr_hi; + efx_rc_t rc; + + if (EFSYS_MEM_SIZE(esmp) < size) { + rc = EINVAL; + goto fail1; + } req.emr_cmd = MC_CMD_READ_SENSORS; @@ -319,4 +325,9 @@ efx_mcdi_read_sensors( return (req.emr_rc); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 15:59:13.874564522 +0000 +++ 0010-net-sfc-base-check-size-of-memory-to-read-sensors-da.patch 2018-11-21 15:59:13.000000000 +0000 @@ -1,12 +1,13 @@ -From 252faf84f41e6d726d3ab0f9b7544723756afcca Mon Sep 17 00:00:00 2001 +From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001 From: Martin Harvey Date: Mon, 10 Sep 2018 10:33:15 +0100 Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to +[ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ] + Size of provided memory should be consistent with specified size. Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI") -Cc: stable@dpdk.org Signed-off-by: Martin Harvey Signed-off-by: Andrew Rybchenko @@ -15,10 +16,10 @@ 1 file changed, 11 insertions(+) diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c -index 93e6b1e35..68bbc575d 100644 +index 8c0b6f0d9..54f7ae5db 100644 --- a/drivers/net/sfc/base/mcdi_mon.c +++ b/drivers/net/sfc/base/mcdi_mon.c -@@ -195,4 +195,10 @@ efx_mcdi_read_sensors( +@@ -302,4 +302,10 @@ efx_mcdi_read_sensors( MC_CMD_READ_SENSORS_EXT_OUT_LEN)]; uint32_t addr_lo, addr_hi; + efx_rc_t rc; @@ -29,7 +30,7 @@ + } req.emr_cmd = MC_CMD_READ_SENSORS; -@@ -212,4 +218,9 @@ efx_mcdi_read_sensors( +@@ -319,4 +325,9 @@ efx_mcdi_read_sensors( return (req.emr_rc); +