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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0803261524560.2775@woody.linux-foundation.org>
Date:	Wed, 26 Mar 2008 15:31:01 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
cc:	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Gary Hade <garyhade@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Meyer <thomas@...3r.de>,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	LKML <linux-kernel@...r.kernel.org>,
	Adrian Bunk <bunk@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Natalie Protasevich <protasnb@...il.com>, pm@...ian.org
Subject: Re: [patch] pci: revert "PCI: remove transparent bridge sizing"



On Thu, 27 Mar 2008, Benjamin Herrenschmidt wrote:
> 
> > NOTE! This will also consider a bridge resource at 0 to be an invalid 
> > resource (since now the alignment will be zero), which is a bit odd and 
> > makes me worry a bit. I wouldn't be surprised if some non-PC architectures 
> > have PCI bridges at zero. But maybe they should be (or already are?) 
> > marked IORESOURCE_PCI_FIXED?
> 
> PCI bridges at zero is perfectly valid indeed and I'm sure we have that
> around at least for IO space. In fact, I'm surprised you don't have that
> on x86.

x86 has memory there, always has had, probably always will.

Also, the reason I *think* this issue is ok is that I think the only PCI 
bus resources we can see in the whole pdev_sort_resources() mess is the 
ones that are behind the bus that we're not sizing for, and they've been 
set up by pbus_size_mem().

And pbus_size_mem() has this special magic setup where it calculates the 
size and the alignment of the bus resource, and then makes

	r->start = alignment;
	r->end = r->start + size - 1;

so using "r->start" *should* be ok in this case because it really means 
"alignment" in this one case.

That said, I'm not going to be willing to bet my life on it.

I also wonder if we maybe should just add a separate "alignment" field to 
the resources. Rather than playing games like these (and having to compare 
the resource number to decide whether it is a bus resource or a normal PCI 
device resource), just adding the dang field would be a whole lot saner.

I dunno. I'm not going to do anything in this area before 2.6.25 is out 
because this *does* make me a bit nervous, but if somebody wants to think 
about this and perhaps write patches for testing, that would be good.

And once more: Ivan, can you again double-check my blatherings above?

			Linus
--
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