Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Zhenzhong Duan" <zhenzhong.duan@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	"Niklas Cassel" <cassel@kernel.org>,
	"GOTO Masanori" <gotom@debian.or.jp>,
	"YOKOTA Hiroshi" <yokota@netlab.is.tsukuba.ac.jp>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Vaibhav Gupta" <vaibhavgupta40@gmail.com>,
	"Jens Taprogge" <jens.taprogge@taprogge.org>,
	"Ido Schimmel" <idosch@nvidia.com>,
	"Petr Machata" <petrm@nvidia.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"David Airlie" <airlied@redhat.com>, <linux-pci@vger.kernel.org>,
	<driver-core@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<linux-ide@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
	<industrypack-devel@lists.sourceforge.net>,
	<netdev@vger.kernel.org>, <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v4 7/9] PCI: Make pci_match_one_device() match on ID instead of device
Date: Sat, 25 Jul 2026 17:40:40 +0200	[thread overview]
Message-ID: <DK7RKTMA6TVC.11YQWH2H4VB74@kernel.org> (raw)
In-Reply-To: <DK7N9IZPWPIT.2AKSZR5CU1H9L@garyguo.net>

On Sat Jul 25, 2026 at 2:17 PM CEST, Gary Guo wrote:
> On Fri Jul 24, 2026 at 11:29 PM BST, Bjorn Helgaas wrote:
>> On Thu, Jul 23, 2026 at 11:00:46PM +0100, Gary Guo wrote:
>>> PCI dynamic ID needs to match IDs against a new ID to see if it already
>>> exists. Existing APIs can only match IDs against devices, causing the
>>> dynamic ID insertion code to create a temporary device only for matching
>>> purpose. Rename pci_match_one_device() to pci_match_one_id() so it can be
>>> used for this purpose instead; add a pci_id_from_device() helper to make it
>>> easy to convert users.
>>
>> s/causing the ... code to create/so the ... code creates/
>> s/purpose/purposes/
>>
>>> Similarly, convert pci_match_id() to do_pci_match_id(). But keep the
>>> existing API because there are many users.
>>> 
>>> Reviewed-by: Danilo Krummrich <dakr@kernel.org>
>>> Signed-off-by: Gary Guo <gary@garyguo.net>
>>
>> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
>> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
>>
>> What's the merge strategy?  If these all need to be merged together,
>> feel free to include the PCI patches whereever you merge the series.
>
> I think the series should be merged together, as I consider the driver changes
> included in this series being "fixing the users".
>
> The series should probably be taken via the PCI tree. I suppose one can also
> argue that the lifetime issue with device IDs isn't unique to PCI bus so this
> can also be considered driver-core material, but given that Greg has already
> taken the USB fixes via the USB tree the only unfixed bus left is PCI.
>
> So unless Danilo thinks otherwise I'd suggest the series be taken as a whole via
> PCI.

I'm happy to take it through driver-core if it helps, but the PCI tree seems to
be the natural fit. :)

  reply	other threads:[~2026-07-25 15:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 22:00 [PATCH v4 0/9] PCI: Fix UAF and TOCTOU related to dynamic ID Gary Guo
2026-07-23 22:00 ` [PATCH v4 1/9] ata: ata_generic: don't store pci_device_id Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 2/9] scsi: nsp32: " Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 3/9] ipack: tpci200: " Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 4/9] mlxsw: pci: " Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 5/9] agp/via: Don't rely on address of pci_device_id Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 6/9] agp/amd-k7: " Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-23 22:00 ` [PATCH v4 7/9] PCI: Make pci_match_one_device() match on ID instead of device Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-24 22:29   ` Bjorn Helgaas
2026-07-25 12:17     ` Gary Guo
2026-07-25 15:40       ` Danilo Krummrich [this message]
2026-07-23 22:00 ` [PATCH v4 8/9] PCI: Fix dyn_id add TOCTOU Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-24 22:29   ` Bjorn Helgaas
2026-07-23 22:00 ` [PATCH v4 9/9] PCI: Fix UAF when probe runs concurrent to dyn ID removal Gary Guo
2026-07-24 22:02   ` sashiko-bot
2026-07-24 22:30   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DK7RKTMA6TVC.11YQWH2H4VB74@kernel.org \
    --to=dakr@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=airlied@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dlemoal@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=edumazet@google.com \
    --cc=gary@garyguo.net \
    --cc=gotom@debian.or.jp \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=industrypack-devel@lists.sourceforge.net \
    --cc=jens.taprogge@taprogge.org \
    --cc=kuba@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=rafael@kernel.org \
    --cc=vaibhavgupta40@gmail.com \
    --cc=yokota@netlab.is.tsukuba.ac.jp \
    --cc=zhenzhong.duan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox