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:   Sun, 4 Sep 2022 11:36:55 +0200
From:   Uladzislau Rezki <urezki@...il.com>
To:     Song Liu <song@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Uladzislau Rezki <urezki@...il.com>, Song Liu <song@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux-MM <linux-mm@...ck.org>,
        open list <linux-kernel@...r.kernel.org>,
        Song Liu <songliubraving@...com>
Subject: Re: [PATCH] mm/vmalloc: Extend find_vmap_lowest_match_check with
 extra arguments

> On 09/02/22 at 06:45pm, Uladzislau Rezki wrote:
> > > > Even without this patch, the debug path would work correctly. The
> > > > difference is just only in
> > > > whether roots are hardcoded or passed over function paramter.
> > >
> > > Calling find_vmap_lowest_match() inside find_vmap_lowest_match_check()
> > > will fail compilation because the function interface has been changed.
> > >
> > Ah. That makes sense, though the commit message has to reflect it.
> > So it is only about compilation error if debug is ON.
> 
> Indeed, the current patch log sounds like an improvement or normal change.
> In fact it's a code fix.
> 
Then i think it is worth to mention about this in the commit message. At
least i have missed the main point of this change looking at the commit
message.

Song Liu, Could you please upload a v2 of it stating exactly what it fixes?

<snip>
urezki@...38:~/data/raid0/coding/linux-next.git$ git diff
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_PROPAGATE_CHECK 0
-#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 0
+#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 1
 
 
 static DEFINE_SPINLOCK(vmap_area_lock);
urezki@...38:~/data/raid0/coding/linux-next.git$ make -j64 bzImage
  DESCEND objtool
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      mm/vmalloc.o
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,
      | ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:250: mm/vmalloc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2003: mm] Error 2
make: *** Waiting for unfinished jobs....
urezki@...38:~/data/raid0/coding/linux-next.git$
<snip>

Thank you in advance!

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ