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.10.0808290827110.3300@nehalem.linux-foundation.org>
Date:	Fri, 29 Aug 2008 08:31:08 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ingo Molnar <mingo@...e.hu>
cc:	Yinghai Lu <yhlu.kernel@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: split e820 reserved entries record to late v4



On Fri, 29 Aug 2008, Ingo Molnar wrote:
> > 
> > you will get
> > fec00000 - ffffffff reserved
> >    fed0000 - fed003ff hpet
> >      fed0000 - fed003ff 0000:00:14.0
> 
> ok - because it's fully contained insert_resource() will succeed?

Correct.

> I thought it would only succeed if the new resource was smaller than (a 
> subset of) the existing resource.

No, that's "request_resource()".

Yeah, I know, the resource code is complicated, and I wish it wasn't, but 
the whole issue with nesting resources correctly simply _is_ fairly 
complex.

So "insert_resource()" literally tries to fit a resource into an existing 
tree, at the right level, whatever level that is.

In contrast, "request_resource()" is about exclusivity, and tries to 
request a "leaf" resource - and it refuses to work if there are resources 
it clashes with that cover the same range.

> In the other direction, when a newly inserted resource is a superset of 
> the existing resource, i thought we'd fail.

For request_resource, yes.

> hypothetical scenario, what if we had neither a superset nor a subset 
> scenario, but a partial overlap, between:
> 
> > >  BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
> 
> and:
> 
> > >   pci 0000:00:14.0: BAR has HPET at feb0f000-fec01000

Now THAT is somethign that the resource structs simply cannot handle. At 
that point you'd get a failure even from insert_resource(), because it no 
longer nests in the tree. You would have to split the range in order for 
it to nest properly.

			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