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: <1299372594.8833.966.camel@pasglop>
Date:	Sun, 06 Mar 2011 11:49:54 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>, linux-mm@...ck.org,
	Russell King <linux@....linux.org.uk>
Subject: Re: [RFC] memblock; Properly handle overlaps

On Sat, 2011-03-05 at 15:20 -0800, Yinghai Lu wrote:
> 
> maybe we can omit rgn->size == 0 checking here.
> with that case, dummy array will go though to some extra checking.
> 
> if (rgn->base <= base && rend >= end)
> if (base < rgn->base && end >= rgn->base) {
> if (base <= rend && end >= rend) {
> 
> but we can spare more checking regarding
>         rgn->size == 0

Well, the array can be collasped to dummy by the removal of the last
block when doing a top overlap, then on the next loop around, we can
potentially hit the if (base <= rend && end >= rend) test, and loop
again no ?

I'd rather keep the test in .. won't hurt.

Cheers,
Ben.

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