D
X-MS-Exchange-CrossTenant-UserPrincipalName: 0/Stf4u62eyqAO3GNqnuojQ5P2bqpmx/aR2xlaiml1o+ZoRjQilXohBzeEo5+QUxXt9/qEGTh2I6vck5oewHgg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [139.178.88.99 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

When BAR_PEER_SPAD and BAR_CONFIG share one PCI BAR, the module teardown
path ends up calling pci_iounmap() on the same iomem with some offset,
which is unnecessary and triggers a kernel warning like the following:

  Trying to vunmap() nonexistent vm area (0000000069a5ffe8)
  WARNING: mm/vmalloc.c:3470 at vunmap+0x58/0x68, CPU#5: modprobe/2937
  [...]
  Call trace:
   vunmap+0x58/0x68 (P)
   iounmap+0x34/0x48
   pci_iounmap+0x2c/0x40
   ntb_epf_pci_remove+0x44/0x80 [ntb_hw_epf]
   pci_device_remove+0x48/0xf8
   device_remove+0x50/0x88
   device_release_driver_internal+0x1c8/0x228
   driver_detach+0x50/0xb0
   bus_remove_driver+0x74/0x100
   driver_unregister+0x34/0x68
   pci_unregister_driver+0x34/0xa0
   ntb_epf_pci_driver_exit+0x14/0xfe0 [ntb_hw_epf]
  [...]

Fix it by unmapping only when PEER_SPAD and CONFIG use difference bars.

Cc: <stable@vger.kernel.org>
Fixes: e75d5ae8ab88 ("NTB: epf: Allow more flexibility in the memory BAR map method")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/ntb/hw/epf/ntb_hw_epf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ntb/hw/epf/ntb_hw_epf.c b/drivers/ntb/hw/epf/ntb_hw_epf.c
index d3ecf25a5162..9935da48a52e 100644
--- a/drivers/ntb/hw/epf/ntb_hw_epf.c
+++ b/drivers/ntb/hw/epf/ntb_hw_epf.c
@@ -646,7 +646,8 @@ static void ntb_epf_deinit_pci(struct ntb_epf_dev *ndev)
 	struct pci_dev *pdev = ndev->ntb.pdev;
 
 	pci_iounmap(pdev, ndev->ctrl_reg);
-	pci_iounmap(pdev, ndev->peer_spad_reg);
+	if (ndev->barno_map[BAR_PEER_SPAD] != ndev->barno_map[BAR_CONFIG])
+		pci_iounmap(pdev, ndev->peer_spad_reg);
 	pci_iounmap(pdev, ndev->db_reg);
 
 	pci_release_regions(pdev);
-- 
2.48.1



From - Sun Nov 30 15:11:30 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197671-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id 6FX9GZ5eLGlj1TAAYBR5ng
	(envelope-from <stable+bounces-197671-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:26 +0000
Return-path: <stable+bounces-197671-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:11:26 +0000
Received: from ams.mirrors.kernel.org ([213.196.21.55])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197671-hi=josie.lol@vger.kernel.org>)
	id 1vPj5B-0000000EET2-3SXt
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:11:26 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by ams.mirrors.kernel.org (Postfix) with ESMTPS id CB870342D2B
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id DBFF327FB1B;
	Sun, 30 Nov 2025 15:11:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b="dBRb9+1X"
X-Original-To: stable@vger.kernel.org
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011035.outbound.protection.outlook.com [40.107.74.35])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A422274670;
	Sun, 30 Nov 2025 15:11:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.35
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764515473; cv=fail; b=pywnecs/Qm7MS3nwASV2bt69Lev+UvyEoIZN5uokDu46+RGeCZtmJBO0DqYSx43aCePjtB69aNH10ZlKVW9LmTYL3LWmXNqxdNECpvnSEwVdUixmkUmy3Er+xKgzqf0xEmqP3beJ933kKBUwvr48R7kPxRWnU+PSZzlxHkKrt4A=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764515473; c=relaxed/simple;
	bh=rP0p1ILfWNTqLsSUX4OcvDyxfrGW6bWFA8pcS7q1IBY=;
	h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=CFa4uFFKsF6x7PA6R4b1KxpRG8VaX6M/EzUGn++R1kdAChX3s+QOk6+QbBi0rg1frRzJL0YMhZzkI5padecbPdyNr9CwxhMRH58UhDdbuHAqLzilOE0mzjpIoJlhtcTwWZm3HDOBrIBlNKdhEokW0QQJ3tPEg8djYx4ApjiDrWs=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b=dBRb9+1X; arc=fail smtp.client-ip=40.107.74.35
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=WXA9gaYEbbAenko4P4a1doMYrSns3EdyqQLhH8diTgj5JatgqWgcbzY3ZKeIZi4xZ6HbuhmqhuMAbPG7SxLR8uOPeiODPLz5zfIAmi7eC1BXYXMarZnj5g/CuxiFXUdxm4iG+VLg7OteET5eeJdF/XWvmtL3jQ8hUf43+Qqb1IeR+KmO2ALhS8xMbtcP/d+wQueom0C4Rwr5+NNSHURgxPa5hB7uSgp+ZJkmMp1KKBV2da2qhAmytc89drjEbwNxzPGJqnO7kX5U6S+GQ0trS0MILYWBFcoV5T3tkGA5eKG63h6sEs/uNPN+7gUxrpNNVLELnyerbjjTsH1Vc3fpEA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=kzVrr0UNRTrh5bfCmD7sbZfkv3WQFb3CcOFqGeRWMWE=;
 b=I5Z4eJJiOQdwZDgNct7kJC5YRfSTmQjbY+D7NorHlHpEYLqYluQSegGeh5rBKfAu1oExto35euTBIQuvrJh32JwsBw1kzocA8y4JbN/KZ679sD10AKDAdcqSWQe0SnmhZk8gRNDiqy7sGrJxteptE1atVpL5vETBi3NS7dHTPr+vLQXCAJIXzhlslmGWVD+cKoEv8mTSltibVHh3XSYUsLLKefP+DYFLGaWxK2l4/1niKARK6422LKfmJaGefA347Lh5272IEchG2Rq9RAT63AIRmJ8KP0OcX59N+LF9PayQ9SgGDt8p3DNMcwmcyIgDQOsqn0dxFSbsK4e87U9y9g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=valinux.co.jp; dmarc=pass action=none
 header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=kzVrr0UNRTrh5bfCmD7sbZfkv3WQFb3CcOFqGeRWMWE=;
 b=dBRb9+1X7oAAGVUGthnCkBzzNfj4FwNyIMiej7+x/Mgm0N6j85TSCQVWq4Tueqm5sv/yPi1ojyEh/AHWqcbYGQwxYaAA+amSx0P93sr7JxLs/CSPnBloRSzK29My/ikh4wrtxprgTZaq3d6DGngq6TpnPF3UiNRa9dnz8EDYzTM=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=valinux.co.jp;
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:24c::11)
 by OS9P286MB3865.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:2d2::12) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Sun, 30 Nov
 2025 15:11:05 +0000
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03]) by TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03%5]) with mapi id 15.20.9366.012; Sun, 30 Nov 2025
 15:11:05 +0000
From: Koichiro Den <den@valinux.co.jp>
To: ntb@lists.linux.dev,
	linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Frank.Li@nxp.com
Cc: jdmason@kudzu.us,
	dave.jiang@intel.com,
	allenbh@gmail.com,
	mani@kernel.org,
	kwilczynski@kernel.org,
	kishon@kernel.org,
	bhelgaas@google.com,
	jbrunet@baylibre.com,
	lpieralisi@kernel.org,
	yebin10@huawei.com,
	geert+renesas@glider.be,
	arnd@arndb.de,
	stable@vger.kernel.org
Subject: [PATCH v3 0/7] PCI: endpoint/NTB: Harden vNTB resource management
Date: Mon,  1 Dec 2025 00:10:53 +0900
Message-ID: <20251130151100.2591822-1-den@valinux.co.jp>
X-Mailer: git-send-email 2.48.1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: TYCP286CA0267.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:455::10) To TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:24c::11)
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TYWP286MB2697:EE_|OS9P286MB3865:EE_
X-MS-Office365-Filtering-Correlation-Id: 2d60bd5b-466e-4233-6453-08de3022aebd
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
	BCL:0;ARA:13230040|366016|7416014|376014|1800799024|10070799003;
X-Microsoft-Antispam-Message-Info:
	=?us-ascii?Q?bJ83icMtBXGTVxt9u8InjRRLb70Z5Irh3V7HFziDADZPC1V22HmlmJuS0OBP?=
 =?us-ascii?Q?z4A60NsWL03aZntx3OrG5JDwMAmt0cA6ZB1EBy99HaMxdCvsVFGLneAzmOSA?=
 =?us-ascii?Q?0SKWJWDZRio0W5AXo3ZR75K8bBBMKvDV36tKnA679R1oktTcJ64b/jFFGQTf?=
 =?us-ascii?Q?GRWYQiFfI2eIpiwNN0GQEsVlVbRxLMqXTWlHnWFAf9xA7SHtHBUH+5MISTzK?=
 =?us-ascii?Q?pq5JxphJi/eGEg+Xm9TkVEuJ0wYhYOlBmuTq8uWRSnAoUX3uzbVP6zXUMKDn?=
 =?us-ascii?Q?XDdjs39H7ve3fFgjJ6eLktKtNQ9wTvwSYzSNjD2Q/DRs/T/nEO8xY0tTUgOj?=
 =?us-ascii?Q?7UA+HJ5Ta0mY0Qs/RfDpx9kbS2Gr2tJRxK8Ei6Yx38bbPZT+rzXL2iN66My2?=
 =?us-ascii?Q?S12DKtb/5zObPI8qYvh3bm+FV6g/XPLaoQb+CigQ6/tQtM6qPwcUo2izWh4A?=
 =?us-ascii?Q?0mBAN1GvUb3oDNXs3KaLW5iZeBuPaGMZJzLWsNHabNVf9MPK7cDpTjABuGly?=
 =?us-ascii?Q?MGt9BimTLnxjqW64qxfE82FF0iGGHrdkf9kzr9WhTBVwWSitiGOBxBrOFESR?=
 =?us-ascii?Q?SdfgK7UWpMjx3S41Hb6JJT3zU5KPRR0dLxvKgSNIF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TpqDw=3D=3D?=
X-Forefront-Antispam-Report:
	CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(10070799003);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
	=?us-ascii?Q?oEdrM1DCMYH8O06bT0KXj5EHDxcN+ZOVYK8Wwkdvfe24tWgozgzaZKWmVZdZ?=
 =?us-ascii?Q?afCxIY3eXxmy5ifbVjoJBwZeG5fNpFTxOvCwPruHWWQQ1ebC5Fy72ni9wwyY?=
 =?us-ascii?Q?g0tLWfikjLJ7yY3i4H73k7167eAzbfWjB5ohSHYD1+EQPQ08aKkIqJ1qLGvU?=
 =?us-ascii?Q?T8v93sniaWNcl865qN2q7cCRk8sh9nEkF+D7mGlCToIVDyCmcPVyyMoDOCfK?=
 =?us-ascii?Q?qSQDayNZ+ckWItHbCKYvoa4M37iNjR6dLirHF/QGzXF0hrK2EuINLIkBpnm0?=
 =?us-ascii?Q?318JY1skyU+31LBWJOEC8bVNKc3FqpRRw8VT3dEGltLnEYm6EkMZsUa/Q+/S?=
 =?us-ascii?Q?AF5nSWqjItqE+sQvhaQQeW9/RgGdATJ2x3W5JbwGJQ1yIpE5T3Uyv6Yj8/gF?=
 =?us-ascii?Q?k8l3ZSP10hm6xICSA3UJuuxADiAOn31hOuhvsH9e3MyWXVLrlQ7PdK0qAsUf?=
 =?us-ascii?Q?J3AAzTgVIMywO8wZU3xaCclDZSitKUJVs9AFg2YtrogWQx74iGy9a5yWbRy9?=
 =?us-ascii?Q?Vg7JDOkwoXLfhF+I8qTTqs0h7hikpoy8LjbLwkiUW7GF0yTnOy9T+0+Zg0lv?=
 =?us-ascii?Q?MjZS+JapNqtzZYVARnm9zBMuDqmbAiyVXSbVKM1loosBBV2czvH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Q?jb1n4BrgCIEljl4jfMkiJn0sTuPPwOAd9t5gJ7HH6dFnQ7trVt9FbP3Es1bf?=
 =?us-ascii?Q?gBJ2EWrGrr7bZnCnTS9Zh4s3ynjc2DoMNoLzi8lluTdICp09FAv1eIHfqqAO?=
 =?us-ascii?Q?z9BbilTKwlHtohPp2BzHVJ0=3D?=
X-OriginatorOrg: valinux.co.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: 2d60bd5b-466e-4233-6453-08de3022aebd
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2025 15:11:05.2894
 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 5HIvX9oZf0U1X8Sv/VJQseJ5zMAcIPknEjRhOOOxwE+2KUkjr+QWuhg8l+R1L/8mRdImVqtzXxwRh55NxG3VOQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [213.196.21.55 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

The vNTB endpoint function (pci-epf-vntb) can be configured and reconfigured
through configfs (link/unlink functions, start/stop the controller, update
parameters). In practice, several pitfalls present: double-unmapping when two
windows share a BAR, wrong parameter order in .drop_link leading to wrong
object lookups, duplicate EPC teardown that leads to oopses, a work item
running after resources were torn down, and inability to re-link/restart
fundamentally because ntb_dev was embedded and the vPCI bus teardown was
incomplete.

This series addresses those issues and hardens resource management across NTB
EPF and PCI EP core:

- Avoid double iounmap when PEER_SPAD and CONFIG share the same BAR.
- Fix configfs .drop_link parameter order so the correct groups are used during
  unlink.
- Remove duplicate EPC resource teardown in both pci-epf-vntb and pci-epf-ntb,
  avoiding crashes on .allow_link failures and during .drop_link.
- Stop the delayed cmd_handler work before clearing BARs/doorbells.
- Manage ntb_dev as a devm-managed allocation and implement .remove() in the
  vNTB PCI driver. Switch to pci_scan_root_bus().

With these changes, the controller can now be stopped, a function unlinked,
configfs settings updated, and the controller re-linked and restarted
without rebooting the endpoint, as long as the underlying pci_epc_ops
.stop() is non-destructive and .start() restores normal operation.

Patches 1-5 carry Fixes tags and are candidates for stable.
Patch 6 is a preparatory one for Patch 7.
Patch 7 is a behavioral improvement that completes lifetime management for
relink/restart scenarios.

Apologies for the delay between v2 and v3, and thank you for the review.


v2->v3 changes:
  - Added Reviewed-by tag for [PATCH v2 4/6]
  - Split [PATCH v2 6/6] into two, based on the feedback from Frank.
  (No code changes overall.)
v1->v2 changes:
  - Incorporated feedback from Frank.
  - Added Reviewed-by tags (except for patches #4 and #6).
  - Fixed a typo in patch #5 title.
  (No code changes overall.)

v2: https://lore.kernel.org/all/20251029080321.807943-1-den@valinux.co.jp/
v1: https://lore.kernel.org/all/20251023071757.901181-1-den@valinux.co.jp/


Koichiro Den (7):
  NTB: epf: Avoid pci_iounmap() with offset when PEER_SPAD and CONFIG
    share BAR
  PCI: endpoint: Fix parameter order for .drop_link
  PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown
  PCI: endpoint: pci-epf-ntb: Remove duplicate resource teardown
  NTB: epf: vntb: Stop cmd_handler work in epf_ntb_epc_cleanup
  PCI: endpoint: pci-epf-vntb: Switch vpci_scan_bus() to use
    pci_scan_root_bus()
  PCI: endpoint: pci-epf-vntb: Manage ntb_dev lifetime and fix vpci bus
    teardown

 drivers/ntb/hw/epf/ntb_hw_epf.c               |  3 +-
 drivers/pci/endpoint/functions/pci-epf-ntb.c  | 56 +-----------
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 86 ++++++++++++-------
 drivers/pci/endpoint/pci-ep-cfs.c             |  8 +-
 4 files changed, 62 insertions(+), 91 deletions(-)

-- 
2.48.1



From - Sun Nov 30 15:11:42 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197672-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id wCV0CqpeLGmjOzIAYBR5ng
	(envelope-from <stable+bounces-197672-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:38 +0000
Return-path: <stable+bounces-197672-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:11:38 +0000
Received: from sv.mirrors.kernel.org ([139.178.88.99])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197672-hi=josie.lol@vger.kernel.org>)
	id 1vPj5N-0000000EEpn-3eor
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:11:38 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by sv.mirrors.kernel.org (Postfix) with ESMTPS id 124F73A24FE
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A049628314B;
	Sun, 30 Nov 2025 15:11:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b="Y4VGUsQY"
X-Original-To: stable@vger.kernel.org
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011035.outbound.protection.outlook.com [40.107.74.35])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0340827FB1E;
	Sun, 30 Nov 2025 15:11:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.35
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764515475; cv=fail; b=fq9w/99ryhQoiY0M+txU9CAgYqDl8KOtF82RM8Dq57ywaJ4Mi4XBLDIDuFE6UUonuijZgy5Gsfms/4aMG6u/ZM5/NSY5+2AkP9+FcgDCIo4ONFRHXgw8aHV7T0tMQZAERgeghDbY9fe8fEu0XJ1dC5E5sQ/JdinwU0Oqp2eZd4E=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764515475; c=relaxed/simple;
	bh=kQskWWtIs3dq2QEqSb62M5nTdddcCqrhR2KtArq0fbQ=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=UgQKF8+3GeQhot8X5HBIR0NGgGv0F4hat/pwzKOuVV5ftTiOK1HVZW9gjpxwLWyfPxc6cMzsLUNbWpLNoCs32K5vJun6WwHVB1hqH7/TT1Eqs7N7JwPm6KMTay4HTvTvAYSwj/M6XQZS3Gms7eOTtC+n/Fd0av/tToK9g7e912E=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b=Y4VGUsQY; arc=fail smtp.client-ip=40.107.74.35
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=hFhBFFTCr7wEEtr5tEHS2uDb3FdfPNkxM3VxE3HRhf0OUszlBz7mUE6nOc83B8rnh4qljjFg9FWIJeIFqnYQ7nsByT337Bqy2qJL+Z5Gaxjuy8KDAowrr8t9EPmLvVCDIlw4qG/kmrshYh+8Ndc4M7pTFZFOEy6QRR18Z0M44MP8lN1U1RdcKze0/gkYniNn787keQ5Hb/DBZEwXCpTDT/Kqby3QwlkHZAIt+pSUaJIYtjsYrbQ07cE1VaYRQfdJli9TowFEYmwzAJJh2jfcLjcHHoP3NYklQ+gjtDjeK+gKX3Mcck7VFXj8ohXqxq0ghNySqMQCjMHvpnVvHYpygw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=I++yll8TSjloR+LP7mQ+1mGSxZ9EZxoJoKEUH08NIKI=;
 b=IX3QXDlILzeyKAsP0qaWaVopMS7Ig6YcbuXTgcS6h9INMWLtpc102xWi7vjHDY96uYirPXAqewEEtL4KXXyztLTbot0Kz3aGbtCPjK+NKjBSWoGETpAD/SW/DFZRfvyFZGun60DT47a8tVs+7NQOcyst28mK2WQfr0DRuC54Es1fgEIUfEadw65v3ay+uNJX1aW0hv5RlJbc29dpiUuMv/0Jx5Y24f7AZysympb0T/JUl2s0DlOMQeuyEJ35LOoeuvN0PfK0FA/eQ8Ta5zkrblVv7bjJc0wRwcKK9tA7E5hpTwzFIZI5Zixa8vCWWIGNJn3Nv19iIw4+0383taJyWQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=valinux.co.jp; dmarc=pass action=none
 header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=I++yll8TSjloR+LP7mQ+1mGSxZ9EZxoJoKEUH08NIKI=;
 b=Y4VGUsQYciXTDTojSG/OHeN4L+/fyNPo6Drz3AUhcsYlNx1z7asuHBrVf0LH6LbLSrW/eB4jA3HcF0SGNIiPpvXIppnv2eAPA+FzVa0U+mht+i22TIvYoRc4mLEsYz/GKSWHpQvEf9oHoSGJumkPOcI1//SCi3agy5oQ1ptWaJk=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=valinux.co.jp;
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:24c::11)
 by OS9P286MB3865.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:2d2::12) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Sun, 30 Nov
 2025 15:11:07 +0000
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03]) by TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03%5]) with mapi id 15.20.9366.012; Sun, 30 Nov 2025
 15:11:07 +0000
From: Koichiro Den <den@valinux.co.jp>
To: ntb@lists.linux.dev,
	linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Frank.Li@nxp.com
Cc: jdmason@kudzu.us,
	dave.jiang@intel.com,
	allenbh@gmail.com,
	mani@kernel.org,
	kwilczynski@kernel.org,
	kishon@kernel.org,
	bhelgaas@google.com,
	jbrunet@baylibre.com,
	lpieralisi@kernel.org,
	yebin10@huawei.com,
	geert+renesas@glider.be,
	arnd@arndb.de,
	stable@vger.kernel.org
Subject: [PATCH v3 2/7] PCI: endpoint: Fix parameter order for .drop_link
Date: Mon,  1 Dec 2025 00:10:55 +0900
Message-ID: <20251130151100.2591822-3-den@valinux.co.jp>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20251130151100.2591822-1-den@valinux.co.jp>
References: <20251130151100.2591822-1-den@valinux.co.jp>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: TYCP286CA0047.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:2b5::18) To TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:24c::11)
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TYWP286MB2697:EE_|OS9P286MB3865:EE_
X-MS-Office365-Filtering-Correlation-Id: f5af7b2b-5e31-418c-c3bf-08de3022aff1
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
	BCL:0;ARA:13230040|366016|7416014|376014|1800799024|10070799003;
X-Microsoft-Antispam-Message-Info:
	=?us-ascii?Q?Cdd1AttA7Acxpb5/JW4U6U2RydmK53mh8a0F86yxuGLtbBn8BhLgR6VqVlM5?=
 =?us-ascii?Q?luRbNPxWMRjPG3thxuiN3QT4WDz1CmkVRPb23EOstQOu8odw0bi2KkuagoYo?=
 =?us-ascii?Q?mgt6/ygV6nDe9Kbm715588be9UuchKkkZSZelaJTwzqM4w7NYcJSiZ0+EyIA?=
 =?us-ascii?Q?vzMyIO0LAOclpAF1Jbxe5XrUIvRDxygoxgKaouoL8z4/c6pGmzHQqmKwDu19?=
 =?us-ascii?Q?3d1WvhobQEf1wqeZ4rZ+QPyDIqM/Ruxllg3SmRzMUrhruuVkhBjhgMnBimaZ?=
 =?us-ascii?Q?5JduSF9JC7Bejo0L+41L6GW6a1Odud2EBUwMnshxSLkjdKJNYfdVgK2lOsjU?=
 =?us-ascii?Q?GaDULRReUrdj5s/eErwbAulGWyQb7rKtyENuownypAV2ao3EvN4eCb2myyz9?=
 =?us-ascii?Q?Q1w7iQPWep4zLMlP347djgvC3BChpLZVrDBowXXPxOxw8TbvEWnZ+RHilBfb?=
 =?us-ascii?Q?31DJnKA5uMo66TdlqMkS84DxZlHIDwwht95kXuqbE/lsdZGACJbWwrVcgpH0?=
 =?us-ascii?Q?nz+cdD70BtpeucKKLsVubiogZezZS5vwWT3LhwoHALfrzEyhqEekuG6B5V1b?=
 =?us-ascii?Q?1RFS12l47c1TFhM3W1ZRvVyYhvE7CXUf15nyfNYHRFeKndLDNpdRdPjKz38I?=
 =?us-ascii?Q?mO6z0BPT4ylrY8nfMs9k4tOeALQTi0QWAy2zWSQtq1lKJpy5BSfIBuV/F+RE?=
 =?us-ascii?Q?W6FKTgzSIafdTXfT++t8qZrCTkkG/tk6tD1xBQEOg1oGvUiq1pFBNKH77gw2?=
 =?us-ascii?Q?0T8DBQZvbcpgCk9MzPK18ZciTGx4+5c6ZCdVZEz9AEsCc7HyiqQ6MlNll/vQ?=
 =?us-ascii?Q?2lMoMFi4iKs43E1OGK8/96Nrk+SbtVu8b6FasiTnBykLDj+Req1ZRJXol/Ey?=
 =?us-ascii?Q?ax5hvg2vlUiS7cpjWItoxFFTSz1JD3JyC6toAfvSvn8fBx3uWYGKjXPJgDCh?=
 =?us-ascii?Q?TDkqpJa5CpmqNteDIuFEl1LfRcIkeRwig5tBdZkBTOUf5JWq+yGvhHiE1Twb?=
 =?us-ascii?Q?Re5Zx2+dahiQDbyTx00qH8aUGdYbjcsYjOm/US8lWI7qrEAWQx4RoF0+aHwA?=
 =?us-ascii?Q?ndxg2fW2qmEdS0EkiD8zEbryOSJWbkOOEw82o6iEANmn4SMntV0Y7iJMpbsH?=
 =?us-ascii?Q?NMjdMW9rk7Fja3RiYRGEd8zwaSoax1hfEyFVU/nZbm/55X4kZDH5uIUrqqrN?=
 =?us-ascii?Q?/Ltmh03u+JsF8+KIEObyz2LQC5NsxKPf58RlCuFdssvjkj/lstsAFInIfoJ4?=
 =?us-ascii?Q?vxiCAJU5QVfyHWMOuBY1qda8j8oxncv45g4vCzZVozkNGgDhj7St7p4EviS6?=
 =?us-ascii?Q?L/O2KeNulo1qvM4KmO5Xipa/kAzte/7D52NuhJuQ4+BtHhwdp+kQUkIsBBEM?=
 =?us-ascii?Q?FblKtHYtV0bVyvl2e2Uz7NEj4ERJM4GwJW+/jU5ubAF+Zsn4EqwnxMoMvMBH?=
 =?us-ascii?Q?33ygP2pUlrkY0kXVQXLL4yCJnS+kdjV/?=
X-Forefront-Antispam-Report:
	CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(10070799003);DIR:OUT;SFP:1101;
X-MS-Exchange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ginatorOrg: valinux.co.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: f5af7b2b-5e31-418c-c3bf-08de3022aff1
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2025 15:11:07.2809
 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: pBIue+ZTXCymbcyuKt6n7EXAcDb/kfJALT11h9tdUn8gvdpjWDt3pwtgdVYu6fg6LTrt3tXA+7QOhPadCjyCwA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [139.178.88.99 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

The unlink callbacks passed the parameters in the wrong order that led
to looking up the wrong group objects. Swap the arguments so that the
first parameter is the epf item and the second is the epc item.

Cc: <stable@vger.kernel.org>
Fixes: e85a2d783762 ("PCI: endpoint: Add support in configfs to associate two EPCs with EPF")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/pci/endpoint/pci-ep-cfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
index ef50c82e647f..c7cf6c76d116 100644
--- a/drivers/pci/endpoint/pci-ep-cfs.c
+++ b/drivers/pci/endpoint/pci-ep-cfs.c
@@ -69,8 +69,8 @@ static int pci_secondary_epc_epf_link(struct config_item *epf_item,
 	return 0;
 }
 
-static void pci_secondary_epc_epf_unlink(struct config_item *epc_item,
-					 struct config_item *epf_item)
+static void pci_secondary_epc_epf_unlink(struct config_item *epf_item,
+					 struct config_item *epc_item)
 {
 	struct pci_epf_group *epf_group = to_pci_epf_group(epf_item->ci_parent);
 	struct pci_epc_group *epc_group = to_pci_epc_group(epc_item);
@@ -133,8 +133,8 @@ static int pci_primary_epc_epf_link(struct config_item *epf_item,
 	return 0;
 }
 
-static void pci_primary_epc_epf_unlink(struct config_item *epc_item,
-				       struct config_item *epf_item)
+static void pci_primary_epc_epf_unlink(struct config_item *epf_item,
+				       struct config_item *epc_item)
 {
 	struct pci_epf_group *epf_group = to_pci_epf_group(epf_item->ci_parent);
 	struct pci_epc_group *epc_group = to_pci_epc_group(epc_item);
-- 
2.48.1



From - Sun Nov 30 15:11:56 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197673-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id 8JVHI7heLGnbOjIAYBR5ng
	(envelope-from <stable+bounces-197673-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:52 +0000
Return-path: <stable+bounces-197673-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:11:52 +0000
Received: from ams.mirrors.kernel.ace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iaxI8nW3; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D61DC4CEF8;
	Sun, 30 Nov 2025 16:21:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1764519676;
	bh=QIGxXzOXgetKMboQBkk6r8HvQViU7hOvjX/Fh/C0908=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=iaxI8nW3Djp1jtV77hWZrTXMreN1mD4Y9zujgroegOO5eQgyGoSvUI5YI6ZrF4lrn
	 8jc8qdEWsHfaEIg5i0Si6z7xDisNld5v/HSI3GYNMs6B3ebfxn6La1qWHE7gCcP3RR
	 gu4TUahjcwk4ZSL2vGXeD3tfuLyTN8872Oh4+zXZjfdhEt1fIg4Q/QqTCFS5ChGVO7
	 228LesFc5lPIi8GXPM1jr7C/FVtsZ2mBd6f+XPieHeRZ7f5gdoICrfr69BUzBYmdtE
	 wRGHQF4hGXWTBlXD9TjUDdpnSdz3qrvnRE3ZX/aO66xnEh8Ly4cVTXtyzeddBt8cjN
	 yBoJOnoyXW1Xw==
Message-ID: <f24fccc6-9491-474f-a907-0ea53fbdc5ec@kernel.org>
Date: Sun, 30 Nov 2025 17:21:13 +0100
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
Subject: Re: [PATCH 6.1.y v1 2/2] net,mptcp: fix proto fallback detection with
 BPF
Content-Language: en-GB, fr-BE
To: Jiayuan Chen <jiayuan.chen@linux.dev>, stable@vger.kernel.org,
 mptcp@lists.linux.dev, sashal@kernel.org, gregkh@linuxfoundation.org
Cc: Jakub Sitnicki <jakub@cloudflare.com>
References: <20251130032303.324510-1-jiayuan.chen@linux.dev>
 <20251130032303.324510-3-jiayuan.chen@linux.dev>
From: Matthieu Baerts <matttbe@kernel.org>
Autocrypt: addr=matttbe@kernel.org; keydata=
 xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf
 YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqDDqU
 c7SPFMpMesgpcu1xFt0F6bcxE+0ojRtSCZ5HDElKlHJNYtD1uwY4UYVGWUGCF/+cY1YLmtfb
 WdNb/SFo+Mp0HItfBC12qtDIXYvbfNUGVnA5jXeWMEyYhSNktLnpDL2gBUCsdbkov5VjiOX7
 CRTkX0UgNWRjyFZwThaZADEvAOo12M5uSBk7h07yJ97gqvBtcx45IsJwfUJE4hy8qZqsA62A
 nTRflBvp647IXAiCcwWsEgE5AXKwA3aL6dcpVR17JXJ6nwHHnslVi8WesiqzUI9sbO/hXeXw
 TDSB+YhErbNOxvHqCzZEnGAAFf6ges26fRVyuU119AzO40sjdLV0l6LE7GshddyazWZf0iac
 nEhX9NKxGnuhMu5SXmo2poIQttJuYAvTVUNwQVEx/0yY5xmiuyqvXa+XT7NKJkOZSiAPlNt6
 VffjgOP62S7M9wDShUghN3F7CPOrrRsOHWO/l6I/qJdUMW+MHSFYPfYiFXoLUZyPvNVCYSgs
 3oQaFhHapq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DGP8n71IFeOot8JuPZtJ8omz+DZel+WCNZMVdVNLPOd5frqOv
 mpz0VhFAlNTjU1Vy0CnuxX3AM51J8dpdNyG0S8rADh6C8AKCDOfUstpq28/6oTaQv7QZdge0
 JY6dglzGKnCi/zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz
 lzVbFe7fduHbABmYz9cefQpO7wDE/Q==
Organization: NGI0 Core
In-Reply-To: <20251130032303.324510-3-jiayuan.chen@linux.dev>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-DKIM: signer='kernel.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: -1.2 (-)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (-1.2 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [142.0.200.124 listed in list.dnswl.org]
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
                             envelope-from domain
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: -11

Hi Jiayuan,

On 30/11/2025 04:23, Jiayuan Chen wrote:
> The sockmap feature allows bpf syscall from userspace, or based
> on bpf sockops, replacing the sk_prot of sockets during protocol stack
> processing with sockmap's custom read/write interfaces.

(...)

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 1dbc62537259..13e3510e6c8f 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -79,8 +79,9 @@ static u64 mptcp_wnd_end(const struct mptcp_sock *msk)
>  static bool mptcp_is_tcpsk(struct sock *sk)
>  {
>  	struct socket *sock = sk->sk_socket;
> +	unsigned short family = READ_ONCE(sk->sk_family);
>  
> -	if (unlikely(sk->sk_prot == &tcp_prot)) {
> +	if (unlikely(family == AF_INET)) {
>  		/* we are being invoked after mptcp_accept() has
>  		 * accepted a non-mp-capable flow: sk is a tcp_sk,
>  		 * not an mptcp one.
> @@ -91,7 +92,7 @@ static bool mptcp_is_tcpsk(struct sock *sk)
>  		sock->ops = &inet_stream_ops;
>  		return true;
>  #if IS_ENABLED(CONFIG_MPTCP_IPV6)
> -	} else if (unlikely(sk->sk_prot == &tcpv6_prot)) {
> +	} else if (unlikely(family == AF_INET6)) {

These modifications here break MPTCP: this function (mptcp_is_tcpsk) is
there to check if the socket is a "plain" TCP one (return "true") or an
MPTCP one (return "false"). If it is not an MPTCP one, the sock ops is
modified.

Here, you are saying: any IPv4 or IPv6 socket is a "plain" TCP one,
never an MPTCP socket then.

I suggest adding ...

  if (sk->sk_protocol == IPPROTO_MPTCP)
          return false;

... at the beginning of this function. I'm planning to send a patch
later on including this check. Once it is sent, do you mind checking it
with sockmap if you have the setup available, please?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.



From - Sun Nov 30 16:21:29 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197680-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id SKV4MAVvLGnbOjIAYBR5ng
	(envelope-from <stable+bounces-197680-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 16:21:25 +0000
Return-path: <stable+bounces-197680-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 16:21:25 +0000
Received: from dfw.mirrors.kernel.org ([142.0.200.124])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197680-hi=josie.lol@vger.kernel.org>)
	id 1vPkAv-0000000GJYd-2TUs
	for hi@josie.lol;
	Sun, 30 Nov 2025 16:21:25 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by dfw.mirrors.kernel.org (Postfix) with ESMTPS id B8AC64E061F
	for <hi@josie.lol>; Sun, 30 Nov 2025 16:21:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A1F7A223702;
	Sun, 30 Nov 2025 16:21:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LkozGWkF"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 774CE11CAF;
	Sun, 30 Nov 2025 16:21:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764519682; cv=none; b=m72D2bFfa142CgkDEpLxILGsPCe67mSRozuO0CRmzMiwZirLbbME1tRAWnD/g/w5Ttiqc25d1o+YZMjrSloGHci5jCbSjfR+2K7WdOBSpNBK4naMrNkslr/5zFJJvIOX+gMS8QziDbFLjKOz5HW1E2p2KWoib2wbsD00krqRHzc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764519682; c=relaxed/simple;
	bh=7kxHR/r2oI69yLuiH8cgTybiZhs3ebORqfxCuXWL2fw=;
	h=Message-ID:Date:MIME-Version:Subject:To:References:From:Cc:
	 In-Reply-To:Content-Type; b=uaCL3cSLw2bwDCP7qNMczIGnK1c6HWxbEa0cLq3ojOAOG0e/t0TsDLq8CSJ8gkssDIW75IzDDu9YKqhTV/kgRNhSrGUnkgbh1qgU+JPxbJJ9G75ZUO4IGhefbzcTAQOZROeptwYwEbOjZcQpT9gAwSvFsTzD2lvZEXHFdeFquXQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LkozGWkF; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC681C4CEF8;
	Sun, 30 Nov 2025 16:21:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
	s=k20201202; t=1764519682;
	bh=7kxHR/r2oI69yLuiH8cgTybiZhs3ebORqfxCuXWL2fw=;
	h=Date:Subject:To:References:From:Cc:In-Reply-To:From;
	b=LkozGWkFt0i7KMa6UBTJ+fAwSKs542RMMCW1bx37IdCACbPqXj89H5AiBmakhrqjm
	 7gXN3lOyxQT4/LrF/UH3b5i5uy8GDRrcIlPKeqVgvFEHeUxLTsG81O8a6mSd99bpP2
	 kbzKuBdtSZjSVsFdq8E/0tkVTbHZsgon5QqK/leg25LiTaFLzpneVQbJE3gRWwGtfc
	 t0a9tJ+ouzlMsrB2rYAGr/FEO+DGcnT3nf8d9g7griCID3vSbbQF7mA77jYCorQPBv
	 20esjW0+O6zglJu224QqouDGVaft+a/gDs2O/KFF5IzOBRSeH7s+gA/TIBF7TaQiT/
	 iZE19iJ7RIPMA==
Message-ID: <a3bd7cdc-e0f3-448f-a1f2-aaa2a603486e@kernel.org>
Date: Sun, 30 Nov 2025 17:21:20 +0100
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
Subject: Re: [PATCH 6.1.y v1 0/2] mptcp: Fix conflicts between MPTCP and
 sockmap
Content-Language: en-GB, fr-BE
To: Jiayuan Chen <jiayuan.chen@linux.dev>
References: <20251130032303.324510-1-jiayuan.chen@linux.dev>
From: Matthieu Baerts <matttbe@kernel.org>
Cc: stable@vger.kernel.org, mptcp@lists.linux.dev, sashal@kernel.org,
 gregkh@linuxfoundation.org
Autocrypt: addr=matttbe@kernel.org; keydata=
 xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf
 YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqDDqU
 c7SPFMpMesgpcu1xFt0F6bcxE+0ojRtSCZ5HDElKlHJNYtD1uwY4UYVGWUGCF/+cY1YLmtfb
 WdNb/SFo+Mp0HItfBC12qtDIXYvbfNUGVnA5jXeWMEyYhSNktLnpDL2gBUCsdbkov5VjiOX7
 CRTkX0UgNWRjyFZwThaZADEvAOo12M5uSBk7h07yJ97gqvBtcx45IsJwfUJE4hy8qZqsA62A
 nTRflBvp647IXAiCcwWsEgE5AXKwA3aL6dcpVR17JXJ6nwHHnslVi8WesiqzUI9sbO/hXeXw
 TDSB+YhErbNOxvHqCzZEnGAAFf6ges26fRVyuU119AzO40sjdLV0l6LE7GshddyazWZf0iac
 nEhX9NKxGnuhMu5SXmo2poIQttJuYAvTVUNwQVEx/0yY5xmiuyqvXa+XT7NKJkOZSiAPlNt6
 VffjgOP62S7M9wDShUghN3F7CPOrrRsOHWO/l6I/qJdUMW+MH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qu/2azX7S7I
 vrxxySzOw9GxjoVTuzWMKWpDGP8n71IFeOot8JuPZtJ8omz+DZel+WCNZMVdVNLPOd5frqOv
 mpz0VhFAlNTjU1Vy0CnuxX3AM51J8dpdNyG0S8rADh6C8AKCDOfUstpq28/6oTaQv7QZdge0
 JY6dglzGKnCi/zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz
 lzVbFe7fduHbABmYz9cefQpO7wDE/Q==
Organization: NGI0 Core
In-Reply-To: <20251130032303.324510-1-jiayuan.chen@linux.dev>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-DKIM: signer='kernel.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: -1.2 (-)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (-1.2 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
                             envelope-from domain
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [142.0.200.124 listed in list.dnswl.org]
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: -11

Hi Jiayuan,

On 30/11/2025 04:23, Jiayuan Chen wrote:
> Overall, we encountered a warning [1] that can be triggered by running the
> selftest I provided.

Thank you for having shared these patches, but there are some issues
with them:

- Patch 1/2 has already been queued, see [1].

- Patch 2/2 is the exact same patch as the one sent by Sasha [2], and
recently dropped [3] because it breaks MPTCP. See my comment there.

- You need to follow the stable rules [4] when sending patches to
stable. In short, here, you should have kept the original upstream
commit message, then add the SHA and a note about the conflicts, e.g.
similar to [5]. Without that, it is a new patch, not a backport (and the
reviewed-by/acked-by/... cannot be kept).

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-6.1/mptcp-disallow-mptcp-subflows-from-sockmap.patch
[2]
https://lore.kernel.org/stable/9e6ef98f-12eb-4608-aece-cf321e0a38d7@kernel.org/T/#u
[3]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/commit/?id=a662939f16b515c5162e304e6a4cf95370e596e1
[4] https://docs.kernel.org/process/stable-kernel-rules.html
[5]
https://lore.kernel.org/stable/20251129165612.2125498-2-matttbe@kernel.org/T/#u

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.



From - Sun Nov 30 21:48:13 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197683-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id +ConOK+0LGnUFRkAYBR5ng
	(envelope-from <stable+bounces-197683-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 21:18:39 +0000
Return-path: <stable+bounces-197683-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 21:18:40 +0000
Received: from ams.mirrors.kernel.org ([213.196.21.55])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197683-hi=josie.lol@vger.kernel.org>)
	id 1vPooZ-00000007MOd-1BiL
	for hi@josie.lol;
	Sun, 30 Nov 2025 21:18:39 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by ams.mirrors.kernel.org (Postfix) with ESMTPS id 3491D341806
	for <hi@josie.lol>; Sun, 30 Nov 2025 21:18:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A44A22576E;
	Sun, 30 Nov 2025 21:18:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kcXRXDzg"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org