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]
Message-ID: <alpine.LFD.1.00.0803271004380.2775@woody.linux-foundation.org>
Date:	Thu, 27 Mar 2008 10:12:10 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
cc:	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>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	pm@...ian.org
Subject: Re: [patch] pci: revert "PCI: remove transparent bridge sizing"



On Wed, 26 Mar 2008, Linus Torvalds wrote:
> On Thu, 27 Mar 2008, Ivan Kokshaysky wrote:
> > 
> > If the new "align" field (and then, maybe, "size" instead of "end"?)
> > is OK, then I'm definitely willing to give it a try.
> 
> Adding an alignment field should be a non-issue: the size of this 
> structure is not likely to be a big deal (yeah, we have something like 12 
> of them in each PCI device etc, so smaller is better, but it's still not 
> going to be something anybody really notices).

Actually, before we go any further, there might be a less intrusive 
alternative: add just a couple of flags to the resource flags field (we 
still have something like 8 unused bits on 32-bit), and use those to 
implement a generic "resource_alignment()" routine.

Two flags would do it:

 - IORESOURCE_SIZEALIGN: size indicates alignment (regular PCI device 
   resources)

 - IORESOURCE_STARTALIGN: start field is alignment (PCI bus resources 
   during probing)

and then the case of both flags zero (or both bits set) would actually be 
"invalid", and we would also clear the IORESOURCE_STARTALIGN flag when we 
actually allocate the resource (so that we don't use the "start" field as 
alignment incorrectly when it no longer indicates alignment).

That wouldn't be totally generic, but it would have the nice property of 
automatically at least add sanity checking for that whole "res->start has 
the odd meaning of 'alignment' during probing" and remove the need for a 
new field, and it would allow us to have a generic "resource_alignment()" 
routine that just gets a resource pointer.

			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