๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26127

Re: [PATCH net] net: libwx: determine the device role without pci_dev::is_virtfn

#26127
From: mengyuanlou
Date: Thu, 03 Dec 2026 03:36
52 lines
11297 bytes

> 2026ๅนด12ๆœˆ2ๆ—ฅ 17:48๏ผŒnetdev-bot+sinfo@kernel.org ๅ†™้“๏ผš
> 
> Hi!
> 
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
> 
> - Whether the issue was actually triggered, or is only theoretical
>   (e.g. found by LLM and not proven at runtime). If it was triggered
>   please include the symptoms, like the stack trace or kernel messages.
> 
> - What hardware the change was tested on. For driver fixes please
>   mention the device (and if relevant firmware version) used for
>   testing, or say that the change was not tested on real hardware.

It was found by the Sashiko LLM review of the net-next
statistics series this fix was originally part of, by reading the code.
The evidence behind it is:

 - Commit 694de316f607 ("net: libwx: fix VF illegal register access")
   reports that reading WX_CFG_PORT_ST from a VF causes an illegal
   register access and hangs the system. That commit put the read behind
   pci_dev::is_virtfn, which is only set in pci_iov_scan_device(), so the
   read is still reached by a VF that a guest enumerated itself.

 - pci_dev::is_virtfn being clear in a guest is documented behaviour, not
   a PCI core bug (see the comment above genwqe_is_privileged() in
   drivers/misc/genwqe/card_base.h). ngbevf and txgbevf are separate
   modules with their own device IDs, so they know at probe time that
   they are VFs, while every role check in libwx used is_virtfn and took
   the PF branch in a guest. The five affected paths are listed in the
   commit message.

I just test the fix patch, for make C=1 W=1 and load in host os.

> 
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
> 
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> -- 
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
Technical Details
Message-ID: <1D01B494-C9C4-4437-A047-C9C14BAAC386@net-swift.com>
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376262-linux-kernel-netdev=dewy.ru
References: <20261202094451.68743-1-mengyuanlou@net-swift.com> <179620489491.3305.260604929573076953@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376262-linux-kernel-netdev=dewy.ru
From: mengyuanlou@net-swift.com ("mengyuanlou@net-swift.com")
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: libwx: determine the device role without
 pci_dev::is_virtfn
Date: Thu, 3 Dec 2026 11:36:34 +0800
Organization: Usenet Network
Message-ID: <1D01B494-C9C4-4437-A047-C9C14BAAC386@net-swift.com>
References: <20261202094451.68743-1-mengyuanlou@net-swift.com>
 <179620489491.3305.260604929573076953@kernel.org>
MIME-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\))
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2133295"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:caFgEr/pRXkIMDpSVyoof65TYnA= sha256:i+CwA7q98CqHbOvg3E1enS5vDuLS79H978bVjvhD8dU=
	sha1:aCTrL8kdmZlt+tFfa9C+tCgSgk8= sha256:MR+EyaMDOEEOwzkfjSzzgvUvaItCqrCBooJUq2jqLYE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 11EED117806; Thu,  3 Dec 2026 06:38:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id fTZUo2dNzuiJ;
	Thu,  3 Dec 2026 06:38:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376262-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=net-swift.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 1877D1177F9; Thu,  3 Dec 2026 06:37:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id DBCE72A3B2; Thu,  3 Dec 2026 03:37:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796269077;
	b=xh7ZP2iy9+sNHwU2618QNVpw7/RVgEsz0uhS+kePSci/KZLKXJkRhMok5mWPi69e35Uw
	 sGujjbKeVEJsCFFQxaja2MZd/sLKeB5NE1sH9FV6d6tgfuUWlSsdtYrrZGayVL2d86ekG
	 BRyDzx97NlHTkTuwRk7n0dyUCVf/RDB0505FuH/gNFKxliNAX3nwd9a7Bt5rKw4yk5+5Z
	 Sy8mIVE/+psLllIz40OUHytNF0sp5ilrHNx6TIxrY1Hs504rrAxS9GkJWFlVBdDb1ljda
	 RfEqvrvR0xtPcM2m2qQlxqmXaYwwllFFIDFeBRUwUmVmRMN8f/9oN0F5fa4t24eWKEA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796269077;
	h=X-Original-To:Received:DMARC-Filter:X-QQ-mid:X-QQ-Originating-IP:
	 Received:X-QQ-SSF:X-QQ-GoodBg:X-BIZMAIL-ID:EX-QQ-RecipientCnt:
	 Content-Type:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:Mime-Version:
	 Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:
	 References:To:X-Mailer:X-QQ-SENDSIZE:Feedback-ID:X-QQ-XMAILINFO:
	 X-QQ-XMRINFO:X-QQ-RECHKSPAM;
	bh=h4NALTQRcACGvhzIF0li5nodjDyvtptBmb+fxwuqtzM=;
	b=lGC1JQsgC/+D6mWNZfy1BHfV5DVamSBZg3h8ib5lSrvclX6NUTekAGj4eB8tzMMWZukZ
	 rAiiKhjpoJsEURynyF0z/TzVMnvnlqXFf+6Pa+YV82If/esR6sIE5HNXpSSgHNcpMGu8T
	 /D/2Q9qpxgc6NfjE06n6+ZB0sH1omVYw7ntKis+KvAe4IJx0FUaexKRNqX5DqEMvPBgpn
	 xSlJu3KiRQPAKgsM1iNW8bVRxWd16UrChYIv+FhSVkI0Bx1OLeCXZ0exgNxkY+J+7f96X
	 cT2V24P26WRPizhUCzAQuowz6hT/RvmFyxAIVK1tgzPus5JZqQ2IakmB8xlDK45qfgg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=net-swift.com;
	spf=pass smtp.mailfrom=net-swift.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A84D3606A69B;
	Thu,  3 Dec 2026 03:37:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=18.194.254.142
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796269077;
	b=OW99PorAfhwV6PxGNV6pLWvq4TeFEJPbEPcZST7KHi6OKAyGPZ6w8/39ZNgpRc+PWRAF
	 GGnRL/BE3Z8qeXsAiTElWfPpQxieAMgJxbGnwU2QIM5hYuakh2wgyC/iofwJSEu3xZzpT
	 kcbR+1zfApumTOkm/UOQDyo2nmwDU9jLNTs0z6CI4wpOHLGaDx/cRWSiibqCVi/4uV5sE
	 ypGr+bKyG3NEMwJR+KQL7O/dc6q5rmTVu2QVnp+fldVz66yat+QS4JapgIyBLk4ZQMACE
	 dykF+S8e1OZ4IMZnsvoXdVz5fXUCpTbMT5NAbGecypl2i+t0Ldawb7mdARWyvveym4Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796269077;
	h=DMARC-Filter:X-QQ-mid:X-QQ-Originating-IP:Received:X-QQ-SSF:
	 X-QQ-GoodBg:X-BIZMAIL-ID:EX-QQ-RecipientCnt:Content-Type:Mime-Version:
	 Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:
	 References:To:X-Mailer:X-QQ-SENDSIZE:Feedback-ID:X-QQ-XMAILINFO:
	 X-QQ-XMRINFO:X-QQ-RECHKSPAM;
	bh=h4NALTQRcACGvhzIF0li5nodjDyvtptBmb+fxwuqtzM=;
	b=4uzGZVTDPwbicXufKYmesXnNjLFJtd6CHJoidCNwfw7xO+WFuD5nTtCsFpVDArxbqF2r
	 raqe9lzttY2e46PrDfYOBTvfZ0OEkMILiA1fl0KjQ5uNj9sKRjL2kOou8Hhk9fUQdQBM5
	 +lRZMn8uGDxa6ifn4pIwGs40Ybyfhbi8gLQjnrsSp/71Lms+L2/SmEUXk4vRFmlbKhnIS
	 IkeW5i0bQBtkDK5RKBaFgjpeBUBebX5qedMv51NDdWUvtUpVwWOpU+E2v7u/4dOK6BaRx
	 HI4amire++fWOh9w3Iqq7Izo56pb8cmXMjTTONXiKSYF1ji7AZp/Ku3WdYMJGa0EYXg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=net-swift.com;
	spf=pass smtp.mailfrom=net-swift.com;
	arc=none smtp.remote-ip=18.194.254.142
X-Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A6D8606A682
	for <netdev@vger.kernel.org>; Thu,  3 Dec 2026 03:37:51 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2A6D8606A682
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=net-swift.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=net-swift.com
X-QQ-mid: esmtpsz17t1796269008t6d0e219b
X-QQ-Originating-IP: 89OgWcWZXk9HAo72cub2k5cICPMt/QIHnYnWR1MhGvY=
X-Received: from smtpclient.apple ( [122.235.196.55])
	by bizesmtp.qq.com (ESMTP) with 
	id ; Thu, 03 Dec 2026 11:36:45 +0800 (CST)
X-QQ-SSF: 0000000000000000000000000000000
X-QQ-GoodBg: 0
X-BIZMAIL-ID: 2290528345534444236
X-EX-QQ-RecipientCnt: 10
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <179620489491.3305.260604929573076953@kernel.org>
X-Cc: netdev@vger.kernel.org,
 jiawenwu@trustnetic.com,
 duanqiangwen@net-swift.com,
 linglingzhang@net-swift.com,
 andrew+netdev@lunn.ch,
 davem@davemloft.net,
 edumazet@google.com,
 kuba@kernel.org,
 pabeni@redhat.com
X-Mailer: Apple Mail (2.3901.200.71.1.16)
X-QQ-SENDSIZE: 520
X-Feedback-ID: esmtpsz:net-swift.com:qybglogicsvrgz:qybglogicsvrgz5b-1
X-QQ-XMAILINFO: N8JNkpf4c7ZReRRIRMo0WQ6WWu2djI74T5qn9nz2ZBjfhbgZUCung6Vw
	LTEnrmAiFW0IbfFluH/oD5+YnClhLzyrWGv5Q8Z0hB95gsz0eAOZa1frHXk8/GhZnvL7kp1
	Cjzm9mjmfjj++fwZwaKOBmV2HafJXn+tL3E0+elDrB8iCIf+/aTB57/AoZaEgzyzumFG8YO
	fpsINHfJQtgq6qA2aVNgDP5B9ufLZ8uazwVuP1F5nLLVpLdki8U2sMZjt/wT45q3rMk0454
	872ETux9VPoCriPc6CNrml3Cp04WiOpz/daeIE6Tkmoot7lanQSH8JSIiuIaoCS5Hn7GGhH
	Rj62d786tcs0K47YDmLLKD+P3oaNfGVeJRme3MJjeTHCf/EAL9tAZtmGJsQ5ejibA7GeXGZ
	TEBhNZKn3bvOFfgwVmSCtn5fJ+GfyoIpmX7erI21QjO7/CHlvj0cX+BfvEKZr95vNYBjxjj
	vv/0pVe23HsF2NsSPy2tmHYz9IpuKiyVrSJOX8Vc13cCgzZUWhzFIFBQjA/cNFRUiJ3s+Et
	bFheb7XcGJFR2HeU9u7o70IvMj7lcN7e58Eu/Gl8ICVOvnCVBNbUQdtVKpU2D3MtjKE+S+Q
	+5dDUm1bJbAHa7e8KcW1oxVUhzSABoRyTnlkwh6yDdOsqfUYl9DQDIudz1wcjQi0Nr8ZjGc
	/4uG1SdUOKtxOmxGgiR+o8pCK5TXSE81eW364tL0m8lCSycyRfo5Zx6RdpDBBf6N2HH6gi0
	LXD3cCDcUZBj9XTZEJK0DS8viDjwSFYBbaJ511yYGRJp6CiK8cT7awVFsdQhRueun6hYgfq
	capHTDfkFOwpoF4H4ZEmEGs2L6Krt2WkSgS68Gzh3PCUFYh8IfIpqPzreLFnZecE0UbFoUu
	VD3Vrk6PHNguTVvKmyJ9xFzIs+0UG21KGYN5aJlJRV2NTXLQj9BLKesqASWklszXlDUWpxm
	xpFKFYVHjM7cq4Nxks8hYbK8PNeNTwJ8b1g4dxflbHAoHnLW663po+/A7ZUt9iloqrNCCCI
	dtuPDoVqcDDaAfurgMGKzrEUHeEPSiaK03skvFRJhlltGPnDXb5ndZx0xz0+l2D6bjwyO/N
	Q==
X-QQ-XMRINFO: MSVp+SPm3vtSTYMEDQ9hPF91WYxRRDRt1Q==
X-QQ-RECHKSPAM: 0