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]
Date:   Tue, 6 Sep 2022 20:27:26 +0200
From:   Uladzislau Rezki <urezki@...il.com>
To:     Song Liu <songliubraving@...com>
Cc:     Song Liu <song@...nel.org>, Linux-MM <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Baoquan He <bhe@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] mm/vmalloc: Extend find_vmap_lowest_match_check with
 extra arguments

> 
> 
> > On Sep 5, 2022, at 11:05 PM, Song Liu <song@...nel.org> wrote:
> > 
> > find_vmap_lowest_match() is now able to handle different roots. With
> > DEBUG_AUGMENT_LOWEST_MATCH_CHECK enabled as:
> > 
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index e68c0081e861..7552f1f8350e 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -713,7 +713,7 @@ EXPORT_SYMBOL(vmalloc_to_pfn);
> > /*** Global kva allocator ***/
> > 
> > -#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 0
> > +#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 1
> > 
> > compilation failed as:
> > 
> > mm/vmalloc.c: In function 'find_vmap_lowest_match_check':
> > mm/vmalloc.c:1328:32: warning: passing argument 1 of 'find_vmap_lowest_match' makes pointer from integer without a cast [-Wint-conversion]
> > 1328 |  va_1 = find_vmap_lowest_match(size, align, vstart, false);
> >     |                                ^~~~
> >     |                                |
> >     |                                long unsigned int
> > mm/vmalloc.c:1236:40: note: expected 'struct rb_root *' but argument is of type 'long unsigned int'
> > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size,
> >     |                        ~~~~~~~~~~~~~~~~^~~~
> > mm/vmalloc.c:1328:9: error: too few arguments to function 'find_vmap_lowest_match'
> > 1328 |  va_1 = find_vmap_lowest_match(size, align, vstart, false);
> >     |         ^~~~~~~~~~~~~~~~~~~~~~
> > mm/vmalloc.c:1236:1: note: declared here
> > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size,
> >     | ^~~~~~~~~~~~~~~~~~~~~~
> > 
> > Extend find_vmap_lowest_match_check() and find_vmap_lowest_linear_match()
> > with extra arguments to fix this.
> > 
> > Fixes: f9863be49312 ("mm/vmalloc: extend __alloc_vmap_area() with extra arguments")
> > Cc: Uladzislau Rezki (Sony) <urezki@...il.com>
> > Cc: Baoquan He <bhe@...hat.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Signed-off-by: Song Liu <song@...nel.org>
> 
> Forgot to add the following from v1:
> 
> Reviewed-by: Baoquan He <bhe@...hat.com>
> Reviewed-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> 

Works great to me. Appreciate it!

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ