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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 16 Aug 2008 09:50:38 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Andrew Vasquez <andrew.vasquez@...gic.com>
Subject: Re: [PATCH] pci: change msi-x vector to 32bit

On Fri, 2008-08-15 at 23:42 -0700, Yinghai Lu wrote:
> On Fri, Aug 15, 2008 at 8:26 PM, H. Peter Anvin <hpa@...or.com> wrote:
> > The 28 bits aren't enough, are they: we need domain as well (and surely we can have more than 16 domains?)
> 
> current code
> static unsigned int build_irq_for_pci_dev(struct pci_dev *dev)
> {
>         unsigned int irq;
> 
>         irq = dev->bus->number;
>         irq <<= 8;
>         irq |= dev->devfn;
>         irq <<= 12;
> 
>         return irq;
> }

Where exactly is this code in the kernel?  Most arches assume the irq is
an index to a compact table bounded by NR_IRQS, so something like this
would violate that assumption.

This is also the reason why it doesn't matter to assign a u32 irq to a
u16 vector.  The u32 irq is a historical thing; it used to be u16 but
then sparc used a vector mapping scheme for the irq number, which I
don't believe it does any more.

> int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
> {
>         unsigned int irq;
>         int ret;
>         unsigned int irq_want;
> 
>         irq_want = build_irq_for_pci_dev(dev) + 0x100;
> 
>         irq = create_irq(irq_want);
> 
> domain is not used yet.
> 
> need to make vecter_irq to vector_domain_irq
> 
> irq_desc(irq) change to domain_irq_desc(domain, irq)

So the assumption underlying this is that the same bus/dev/function on
different domains would share irq space ... that sounds possible but a
bit strange.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ