From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91D02A053D for ; Fri, 17 Jul 2020 18:32:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8536E1BEE7; Fri, 17 Jul 2020 18:32:52 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 7F8961BEC0 for ; Fri, 17 Jul 2020 18:32:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595003570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m0Fd1sAx3egs1U4BMJb8kp5iq9vDOF5+flY1F6KNWaM=; b=fRSzN8t+LizlzX36PdaXCX8ScWEA0WRXXyJXbf7MDfIjrLFOrGg2LcIznA6Apr0NW64JON z+lhsX4vyPtJkGLHcxh5XfWOSzI8eoEiwamC5Tf389mv2s9JncCdZJnF0Q81rEKZ6/pCS6 F3+sjW0pyp9YZtid/ZRTdMv6nrXbTh8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-Gc74DReiOLm1xnL-dX33JA-1; Fri, 17 Jul 2020 12:32:40 -0400 X-MC-Unique: Gc74DReiOLm1xnL-dX33JA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9EFB51800D42; Fri, 17 Jul 2020 16:32:39 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCCC372E48; Fri, 17 Jul 2020 16:32:38 +0000 (UTC) From: Kevin Traynor To: Long Li Cc: Stephen Hemminger , dpdk stable Date: Fri, 17 Jul 2020 17:31:58 +0100 Message-Id: <20200717163214.4839-10-ktraynor@redhat.com> In-Reply-To: <20200717163214.4839-1-ktraynor@redhat.com> References: <20200717163214.4839-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' has been queued to LTS release 18.11.10 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.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 07/23/20. 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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/fca3fc1aebc3dc92eb14f74eeb0c9227775ad391 Thanks. Kevin. --- >From fca3fc1aebc3dc92eb14f74eeb0c9227775ad391 Mon Sep 17 00:00:00 2001 From: Long Li Date: Thu, 11 Jun 2020 17:48:25 -0700 Subject: [PATCH] bus/vmbus: fix ring buffer mapping [ upstream commit 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f ] vmbus_map_addr is used as the next start virtual address for mapping ring buffer. However it's updated based on ring_buf, which is a pointer to an address on the stack. The next ring buffer may be mapped to an unexpected address. Fix this by calculating vmbus_map_addr based on returned virtual address. Fixes: 3f9277031a2e ("bus/vmbus: fix check for mmap failure") Signed-off-by: Long Li Acked-by: Stephen Hemminger --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c index 308ba00893..97ad3ebf9f 100644 --- a/drivers/bus/vmbus/linux/vmbus_uio.c +++ b/drivers/bus/vmbus/linux/vmbus_uio.c @@ -244,5 +244,5 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev, *ring_buf = mapaddr; - vmbus_map_addr = RTE_PTR_ADD(ring_buf, file_size); + vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size); return 0; } -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-17 17:17:00.563732243 +0100 +++ 0010-bus-vmbus-fix-ring-buffer-mapping.patch 2020-07-17 17:16:59.977771489 +0100 @@ -1 +1 @@ -From 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f Mon Sep 17 00:00:00 2001 +From fca3fc1aebc3dc92eb14f74eeb0c9227775ad391 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 5451bfd150..5dc0c47de6 100644 +index 308ba00893..97ad3ebf9f 100644 @@ -26 +27 @@ -@@ -243,5 +243,5 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev, +@@ -244,5 +244,5 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,