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] [day] [month] [year] [list]
Message-ID: <20200414190215.GA1531@pc636>
Date:   Tue, 14 Apr 2020 21:02:15 +0200
From:   Uladzislau Rezki <urezki@...il.com>
To:     Dave Hansen <dave.hansen@...el.com>, Liu Song <fishland@...yun.com>
Cc:     Liu Song <fishland@...yun.com>, gregkh@...uxfoundation.org,
        jroedel@...e.de, dave.hansen@...ux.intel.com, tglx@...utronix.de,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        "liu.song11@....com.cnhange-folder>?" <toggle-mailboxes@...36>
Subject: Re: [RFC PATCH] mm/vmalloc: make sure to traverse from the beginning
 when overflow occur

On Mon, Apr 13, 2020 at 08:02:49AM -0700, Dave Hansen wrote:
> On 4/12/20 7:38 AM, Liu Song wrote:
> > If overflow, should ensure that "free_vmap_cache" is set to NULL,
> > so as to ensure that it can be traversed from the beginning.
> 
> This changelog is a bit sparse.
> 
> Does this fix a demonstrated problem?  Or was it just discovered via
> code review and assumed to help a theoretical problem?
> 
> Which tree is it against?  'free_vmap_cache' doesn't show up in Linus's
> tree.
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index d8e877365f9f..2638a20d36ce 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -441,7 +441,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
> >  	if (!free_vmap_cache ||
> >  			size < cached_hole_size ||
> >  			vstart < cached_vstart ||
> > -			align < cached_align) {
> > +			align < cached_align || purged) {
> >  nocache:
> >  		cached_hole_size = 0;
> >  		free_vmap_cache = NULL;
> >
We do not have such code since 5.2 kernel or so, nor things like
cached_hole_size, free_vmap_cache and so on. It was totally reworked.

--
Vlad Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ