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: <1218847582.7576.6.camel@localhost>
Date:	Sat, 16 Aug 2008 10:46:22 +1000
From:	Michael Ellerman <michael@...erman.id.au>
To:	David Miller <davem@...emloft.net>
Cc:	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: bug in lmb_enforce_memory_limit()

On Fri, 2008-08-15 at 15:25 -0700, David Miller wrote:
> From: Michael Ellerman <michael@...erman.id.au>
> Date: Thu, 14 Aug 2008 21:26:53 +1000
> 
> > Perhaps after the first loop we should set memory_limit to equal
> > lmb_end_of_DRAM(), then the second loop should work as it is.
> 
> Sounds great.  Mind if I push the following to Linus?

Looks good to me.

I'll test it on Monday. I don't know if I have a system with memory
holes to test on, but I take it you do?

I notice some of our 32-bit code is using lmb_enforce_memory_limit() to
enforce an address limit, which is technically broken, but is probably
fine because it doesn't need to worry about holes.


> lmb: Fix reserved region handling in lmb_enforce_memory_limit().
> 
> The idea of the implementation of this fix is from Michael Ellerman.
> 
> This function has two loops, but they each interpret the memory_limit
> value differently.  The first loop interprets it as a "size limit"
> whereas the second loop interprets it as an "address limit".
> 
> Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
> so that it all works out.
> 
> Signed-off-by: David S. Miller <davem@...emloft.net>

Acked-by: Michael Ellerman <michael@...erman.id.au>

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ