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 4637645BB6 for ; Wed, 23 Oct 2024 23:18:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 402D840261; Wed, 23 Oct 2024 23:18:51 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 6CC2E432B2 for ; Wed, 23 Oct 2024 23:18:49 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-37d70df0b1aso114454f8f.3 for ; Wed, 23 Oct 2024 14:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718329; x=1730323129; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4/n6rrDpq9YfKQIfxGEcfdQijn/cbqcxgyZ0PV3i9Yc=; b=LxBZ75/ak8eifaYCRSj2BRDWhOZrujtVijr/HAwvCwPC7cms/LWgpZ5lmMuIMW8D7+ OtY+x1j1CEMCFKcuXcSRgGHuARcBNdEFsylzZ62rB2CvJl36JOkEB24wmjfEZPRlioDO Tmwo6LhOi91oQlGR6z4kT1glzW2t7BlARYktJyp5DpxKjrdixunx6XDF0a6wEs1v21vO MVL5jRlycK4BDd3LChB5WtnclPtp3ceJDXBaiYyMrzRBXo5ut8qZIXJuZJgnHQ6imdcG WspYDGmW938JNgPjvGVltdM5wazTudHGvYrLi3k1qeVFioIAtcDVai4OQIeqQsnNhoCQ og2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718329; x=1730323129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4/n6rrDpq9YfKQIfxGEcfdQijn/cbqcxgyZ0PV3i9Yc=; b=Hv1u86g3UmMJQtNG7/IK1vsyrmh5fN4lSmKi0qp/jQfRrcW+ihPxj3cYOHNmsaCkDc cEZRL5GZg6Pn9/l6jRWhwkW6N0AYPZWnpnQiUYGgf8UaLYOc20uUuBT2F2XJ0n2gjC01 oxln1mmLpEMtcp6G12mMKC/u+GMeykDvFWakhKWPzWr/f/M3QlTPVCIAEzMaIdCgJPD8 aFjv0BWuTr/ZkdPFe+5qvLWgn941uw6eUmxKhFIorUknCC6mvJ7ssW9MKIaywpH9el/E aPhoAzJsw+HGM2m3F8chCLC5qkHXwAN0a+g5pUKc1eHO+NIPaigKh1w+nCZRz+O57dtn cthQ== X-Forwarded-Encrypted: i=1; AJvYcCX2HNJjFMg8G3OCyl6zfKuaMjI1gfRsaAMUECxNPjNdOjCkgrxMJBBW432npz+SfB8eImsC9IM=@dpdk.org X-Gm-Message-State: AOJu0YwOvNwiWraq27pqh/4AqaPH2RkofvlJKEdjCPqrVYsLT4qkbxOJ 48fCy8LoWOfs4rvABM1miqf8HVSD9QxmbVGm1X9M2rL5KLW+zke7 X-Google-Smtp-Source: AGHT+IGazaG9JnKyDzXIzC31J5tEjPWHXfEZFtoNbDnK2GjR3M3O4ZB1dgf/aSHyEPgOz1Tutt/YLg== X-Received: by 2002:a5d:5b8e:0:b0:37d:4b73:24c0 with SMTP id ffacd0b85a97d-37efcf5d343mr2486337f8f.35.1729718328939; Wed, 23 Oct 2024 14:18:48 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c508e8sm26998045e9.43.2024.10.23.14.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:18:48 -0700 (PDT) From: luca.boccassi@gmail.com To: Bill Xiang Cc: Chenbo Xia , dpdk stable Subject: patch 'vhost: fix offset while mapping log base address' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:09 +0100 Message-ID: <20241023211704.1216956-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/659d8ff0cfebd42336ca147c840f453d9d37482d Thanks. Luca Boccassi --- >From 659d8ff0cfebd42336ca147c840f453d9d37482d 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 80d6d50ba9..8c7b38fb35 100644 --- a/.mailmap +++ b/.mailmap @@ -166,6 +166,7 @@ Bert van Leeuwen Bhagyada Modali Bharat Mota Bill Hong +Bill Xiang Billy McFall Billy O'Mahony Bing Zhao diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 8d7d04059c..d665d6c7d9 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, * mmap from 0 to workaround a hugepage mmap bug: mmap will * 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) { VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n"); -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.626590214 +0100 +++ 0029-vhost-fix-offset-while-mapping-log-base-address.patch 2024-10-23 22:16:40.467941496 +0100 @@ -1 +1 @@ -From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001 +From 659d8ff0cfebd42336ca147c840f453d9d37482d 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 80d6d50ba9..8c7b38fb35 100644 @@ -22,3 +23,3 @@ -@@ -183,6 +183,7 @@ Bhagyada Modali - Bharat Mota - Bhuvan Mital +@@ -166,6 +166,7 @@ Bert van Leeuwen + Bhagyada Modali + Bharat Mota @@ -31 +32 @@ -index 5f470da38a..0893ae80bb 100644 +index 8d7d04059c..d665d6c7d9 100644 @@ -34 +35 @@ -@@ -2399,7 +2399,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, +@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, @@ -40 +40,0 @@ - alignment = get_blk_size(fd); @@ -42,0 +43 @@ + VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");