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: <20090416172803.GB16618@elte.hu>
Date:	Thu, 16 Apr 2009 19:28:03 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-pci@...r.kernel.org, yannick.roehlly@...e.fr
Subject: Re: [PATCH] x86/pci: make pci_mem_start to be aligned only -v3


* Yinghai Lu <yinghai@...nel.org> wrote:

> Ingo Molnar wrote:
> > * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > 
> >> On Thu, 16 Apr 2009, Jesse Barnes wrote:
> >>> Any comments on this one, Linus?  Should I include your ack?
> >> I'm not ready to ack it, no. I don't think the suggested patch is very 
> >> clean or necessarily sensible as-is. It seems very ad-hoc. 
> >>
> >> I was literally thinking of something like 
> >>  "round up from the last RAM by X"
> >>  "round up from the last reserved region by Y"
> >>  "pick the bigger of the two"
> >>
> >> with helper functions for the two cases and comments along the 
> >> lines of why we do it. Something that was a bit more obvious about 
> >> what it's doing and why.
> > 
> > That's sensible - but i'd also like to inject hpa's add-on idea: if 
> > we do that then we should do it _explicitly_ and _visibly_, by 
> > injecting an artificial e820 reservation range to all expected 
> > "vulnerable" holes we cannot fully trust.
> > 
> > We'd do that after all the fixed resources are allocated, but before 
> > dynamic PCI allocations.
> > 
> > That prevents the PCI layer from dynamically allocating anything 
> > into that protective zone, and documents it as well (and makes it 
> > visible in boot logs, etc.) - instead of just a silent rule 
> > somewhere that no-one will really see if it breaks.
> 
> that need to do done much earlier, and much simple, just need to 
> make that range to be reserved in e820. and later e820_setup_gap 
> even don't need to be aligned again.

Well, an alignment _check_ could still be added with a
WARN_ONCE(), to make sure these assumptions hold true in
future as well.

This kind of stuff is generally not testable and wont break on many 
systems - but it can easily cripple a random 0.5% of systems, 
creating a lot of unhappy users.

So pretty much the only solution is to be careful, robust and 
redundant all along.

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