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 6C8EDA0518 for ; Fri, 24 Jul 2020 14:03:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64CEF1C036; Fri, 24 Jul 2020 14:03:45 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id D4B551C036 for ; Fri, 24 Jul 2020 14:03:44 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id r12so8041399wrj.13 for ; Fri, 24 Jul 2020 05:03:44 -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=+V8ziT3eXGPKRpUKlhliuaVXL3MxsjY5dOtPeH8yzU4=; b=qdy+jTJtkLr6F63vN4OlQF5h+wz7qc7B9oJodKImQYycR382kOxate5dZu12jiluqP YGhpV0f8LI53vyAD/s8k8k2sDy+AGfuW9dV1focCJa3wflsO4TicNNiTRSiL1+Tw9iwK qWCcYFvYelIr1K00bSZVESrWfdIJqB9tLgEAdMB6p8pjDvmffZzLx1FVLcyzEwuzYAfd 3VIwXlPsTqG+EDe6k1ERZ9amcHeiqV+i4QwLIfFriEKL4AX+D6VHDqa/tiexX+JWh7Yy GeDDhEQcL5mBVMf3dG8lX7cbioKE2GmXNj0AKjlhMs0ZWu4diQepkU423OTf9ygMnx8m wIrA== 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=+V8ziT3eXGPKRpUKlhliuaVXL3MxsjY5dOtPeH8yzU4=; b=pT1lrhOo80fDiid8ngQRsxRu7nMpK7kz/pfS5Zj63t44l8H4O2BTgc50AP0FsLlgyD uuFCQhSNgp92XoWPn2inZwZb2HDQqkHRdmj7hsQ3UTJdfW1Grfe3VB2BFf/IoZl4S2dg JPOV7xTkdgeBXV8bMdPXPo1GFh/GKECE/ApZKfi1q8PfdyLpHpF93BA/1yb+GrvaAJEL /U3tqarcJ8+0FD4bw8AHJa/RkbuyV7dkSk5uYl8ypPd0RQSUNXEFcF0jqJfFCyuRUiks ntv0plNM6pWgg6/Toc3G/pvSr/QkGcjWEW3+oXitQVWry0zwgzRp+dGmLNDIPOwUbKcw 0YLQ== X-Gm-Message-State: AOAM532nnMsrnxFKPPFzqmRDSOsxk0peCPbYIm2gapQkesVS5Cel0xd+ oRpO9NEQhWR+SCYry3I+bT4= X-Google-Smtp-Source: ABdhPJynWra7NwOwflePjflq99GVJMuCg2EwZOaJaAbWzY+lYa3qqI2i8N+Vrg0PUW2jwJGHZzYksg== X-Received: by 2002:a5d:48c8:: with SMTP id p8mr8174486wrs.84.1595592224612; Fri, 24 Jul 2020 05:03:44 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g145sm10763562wmg.23.2020.07.24.05.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:03:43 -0700 (PDT) From: luca.boccassi@gmail.com To: Long Li Cc: Stephen Hemminger , dpdk stable Date: Fri, 24 Jul 2020 12:58:07 +0100 Message-Id: <20200724120030.1863487-49-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' has been queued to stable release 19.11.4 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 stable release 19.11.4 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/26/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. Thanks. Luca Boccassi --- >From 72dae964fdb23f613e384c4e0b811ab146b72fd1 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 5451bfd15..5dc0c47de 100644 --- a/drivers/bus/vmbus/linux/vmbus_uio.c +++ b/drivers/bus/vmbus/linux/vmbus_uio.c @@ -242,7 +242,7 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev, *ring_size = file_size / 2; *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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:50.503055446 +0100 +++ 0049-bus-vmbus-fix-ring-buffer-mapping.patch 2020-07-24 12:53:48.271006162 +0100 @@ -1,8 +1,10 @@ -From 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f Mon Sep 17 00:00:00 2001 +From 72dae964fdb23f613e384c4e0b811ab146b72fd1 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 @@ -11,7 +13,6 @@ Fix this by calculating vmbus_map_addr based on returned virtual address. Fixes: 3f9277031a2e ("bus/vmbus: fix check for mmap failure") -Cc: stable@dpdk.org Signed-off-by: Long Li Acked-by: Stephen Hemminger