lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aU0PnCV69l7lV2aS@tardis-2.local>
Date: Thu, 25 Dec 2025 18:19:08 +0800
From: Boqun Feng <boqun.feng@...il.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: miguel.ojeda.sandonis@...il.com, dakr@...nel.org, bhelgaas@...gle.com,
	ojeda@...nel.org, gary@...yguo.net, bjorn3_gh@...tonmail.com,
	lossin@...nel.org, a.hindborg@...nel.org, aliceryhl@...gle.com,
	tmgross@...ch.edu, joelagnelf@...dia.com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
	Liang Jie <buaajxlj@....com>
Subject: Re: [PATCH] PCI: Provide pci_free_irq_vectors() for CONFIG_PCI=n

On Thu, Dec 25, 2025 at 06:36:31PM +0900, FUJITA Tomonori wrote:
> On Thu, 25 Dec 2025 10:10:04 +0100
> Miguel Ojeda <miguel.ojeda.sandonis@...il.com> wrote:
> 
> > On Mon, Dec 15, 2025 at 3:54 AM Boqun Feng <boqun.feng@...il.com> wrote:
> >>
> >> Commit 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI
> >> is disabled") fixed a build error by providing rust helpers when
> >> CONFIG_PCI_MSI=n. However the rust helpers rely on the
> >> pci_alloc_irq_vectors() function is defined, which is not true when
> >> CONFIG_PCI=n. There are multiple ways to fix this, e.g. a possible fix
> >> could be just remove the calling of pci_alloc_irq_vectors() since it's
> >> empty when CONFIG_PCI_MSI=n anyway. However, since PCI irq APIs, such as
> >> pci_alloc_irq_vectors(), are already defined even when CONFIG_PCI=n, the
> >> more reasonable fix is to define pci_alloc_irq_vectors() when
> >> CONFIG_PCI=n and this aligns with the situations of other primitives as
> >> well.
> >>
> >> Fixes: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled")
> >> Signed-off-by: Boqun Feng <boqun.feng@...il.com>
> > 
> > Related: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fujita.tomonori@gmail.com/
> > 
> > I guess it counts as a report, so we may want a Reported-by (Cc'ing Tomo).
> 
> Since pci.rs is only compiled when CONFIG_PCI is enabled. So it seems
> consistent to treat the PCI helpers the same way. That said, this
> approach is also fine by me: it's already inconsistent that
> pci_alloc_irq_vectors() has a stuf definition, while
> pci_free_irq_vectors does not.

Yes, I think providing a stub pci_free_irq_vectors() is the way to go.
If you are OK with it, I could send a v2 with your and Liang Jie's
Reported-by. Alternatively, since you're the first one sending the fix,
and I would have replied that with the suggestion if I didn't miss that,
feel free to send a v2 (providing the stub pci_free_irq_vectors()) from
you ;-)

Regards,
Boqun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ