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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Oct 2008 07:48:56 -0200
From:	Glauber Costa <glommer@...hat.com>
To:	Nick Piggin <npiggin@...e.de>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org, avi@...hat.com,
	aliguori@...emonkey.ws, Jeremy Fitzhardinge <jeremy@...p.org>,
	Krzysztof Helt <krzysztof.h1@...zta.fm>
Subject: Re: [PATCH] regression: vmalloc easily fail.

On Wed, Oct 29, 2008 at 12:29:44AM +0100, Nick Piggin wrote:
> On Tue, Oct 28, 2008 at 08:55:13PM -0200, Glauber Costa wrote:
> > Commit db64fe02258f1507e13fe5212a989922323685ce broke
> > KVM (the symptom) for me. The cause is that vmalloc
> > allocations fail, despite of the fact that /proc/meminfo
> > shows plenty of vmalloc space available.
> > 
> > After some investigation, it seems to me that the current
> > way to compute the next addr in the rb-tree transversal
> > leaves a spare page between each allocation. After a few
> > allocations, regardless of their size, we run out of vmalloc
> > space.
> 
> Right... that was to add a guard page like the old vmalloc allocator.
> vmallocs still add their extra page too, so most of them will have
> a 2 page guard area, but I didn't think this would hurt significantly.
> 
> I'm not against the patch, but I wonder exactly what is filling it up
> and how? (can you look at the vmalloc proc function to find out?)
attached.

> 
> > 
> > Signed-off-by: Glauber Costa <glommer@...hat.com>
> > Cc: Jeremy Fitzhardinge <jeremy@...p.org>
> > Cc: Krzysztof Helt <krzysztof.h1@...zta.fm>
> > ---
> >  mm/vmalloc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index 0365369..a33b0d1 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -363,7 +363,7 @@ retry:
> >  		}
> >  
> >  		while (addr + size >= first->va_start && addr + size <= vend) {
> > -			addr = ALIGN(first->va_end + PAGE_SIZE, align);
> > +			addr = ALIGN(first->va_end, align);
> >  
> >  			n = rb_next(&first->rb_node);
> >  			if (n)
> > -- 
> > 1.5.6.5

View attachment "vmalloc-fails" of type "text/plain" (10721 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ