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 11A4E45DB9 for ; Wed, 27 Nov 2024 18:20:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08D23402DE; Wed, 27 Nov 2024 18:20:27 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 32C65402DE for ; Wed, 27 Nov 2024 18:20:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728024; 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=fp4Fk6Z2hg6K/0w9EL4r7IsYWjH2S4URAMu0rvzR6+Q=; b=HR/clsMl99wYkggiG2emfALtIVTcNge/uirZWaro/QYWWbJzZ2xVSghEJ/J8IoiZyftRcV 8hvBIDbIKAqFvm1RjaB2xUbNRF0RhTw5R3reFGFMlv6Pq2NDxUl5lcGno81+acJTDu/gWx 3blUbTMrq/DFXA6hTSYuvTlBZBTcrmU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-487-8qr0YUo8MfG45e_tyen-RQ-1; Wed, 27 Nov 2024 12:20:21 -0500 X-MC-Unique: 8qr0YUo8MfG45e_tyen-RQ-1 X-Mimecast-MFC-AGG-ID: 8qr0YUo8MfG45e_tyen-RQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 53AF319560AF; Wed, 27 Nov 2024 17:20:20 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E3C43300019E; Wed, 27 Nov 2024 17:20:18 +0000 (UTC) From: Kevin Traynor To: Bill Xiang Cc: Chenbo Xia , dpdk stable Subject: patch 'vhost: fix offset while mapping log base address' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:17:30 +0000 Message-ID: <20241127171916.690404-23-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HPTyD08QuEXpT6U7PiQrmdBxaZ5PggmwoGoTL-ftUzw_1732728020 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/24. 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 This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb Thanks. Kevin --- >From 53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb Mon Sep 17 00:00:00 2001 From: Bill Xiang Date: Mon, 8 Jul 2024 14:57:49 +0800 Subject: [PATCH] vhost: fix offset while mapping log base address [ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ] For sanity the offset should be the last parameter of mmap. Fixes: fbc4d248b198 ("vhost: fix offset while mmaping log base address") Signed-off-by: Bill Xiang Reviewed-by: Chenbo Xia --- .mailmap | 1 + lib/vhost/vhost_user.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 39f81c0e7d..5d6a7701d7 100644 --- a/.mailmap +++ b/.mailmap @@ -165,4 +165,5 @@ Bhagyada Modali Bharat Mota Bill Hong +Bill Xiang Billy McFall Billy O'Mahony diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index ca0618f627..8416aa25b7 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -2325,5 +2325,5 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg, * fail when offset is not page size aligned. */ - addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); close(fd); if (addr == MAP_FAILED) { -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:39.033594415 +0000 +++ 0023-vhost-fix-offset-while-mapping-log-base-address.patch 2024-11-27 17:17:38.180269140 +0000 @@ -1 +1 @@ -From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001 +From 53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index ed4ea17c4c..544e62df7d 100644 +index 39f81c0e7d..5d6a7701d7 100644 @@ -22,2 +23,2 @@ -@@ -184,4 +184,5 @@ Bharat Mota - Bhuvan Mital +@@ -165,4 +165,5 @@ Bhagyada Modali + Bharat Mota @@ -29 +30 @@ -index 5f470da38a..0893ae80bb 100644 +index ca0618f627..8416aa25b7 100644 @@ -32 +33 @@ -@@ -2400,5 +2400,5 @@ vhost_user_set_log_base(struct virtio_net **pdev, +@@ -2325,5 +2325,5 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg, @@ -37 +37,0 @@ - alignment = get_blk_size(fd); @@ -38,0 +39 @@ + if (addr == MAP_FAILED) {