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]
Date: Mon, 25 Mar 2024 10:49:34 -0700
From: SeongJae Park <sj@...nel.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: SeongJae Park <sj@...nel.org>,
	mhocko@...e.com,
	vbabka@...e.cz,
	hannes@...xchg.org,
	roman.gushchin@...ux.dev,
	mgorman@...e.de,
	dave@...olabs.net,
	willy@...radead.org,
	liam.howlett@...cle.com,
	penguin-kernel@...ove.sakura.ne.jp,
	corbet@....net,
	void@...ifault.com,
	peterz@...radead.org,
	juri.lelli@...hat.com,
	catalin.marinas@....com,
	will@...nel.org,
	arnd@...db.de,
	tglx@...utronix.de,
	mingo@...hat.com,
	dave.hansen@...ux.intel.com,
	x86@...nel.org,
	peterx@...hat.com,
	david@...hat.com,
	axboe@...nel.dk,
	mcgrof@...nel.org,
	masahiroy@...nel.org,
	nathan@...nel.org,
	dennis@...nel.org,
	jhubbard@...dia.com,
	tj@...nel.org,
	muchun.song@...ux.dev,
	rppt@...nel.org,
	paulmck@...nel.org,
	pasha.tatashin@...een.com,
	yosryahmed@...gle.com,
	yuzhao@...gle.com,
	dhowells@...hat.com,
	hughd@...gle.com,
	andreyknvl@...il.com,
	keescook@...omium.org,
	ndesaulniers@...gle.com,
	vvvvvv@...gle.com,
	gregkh@...uxfoundation.org,
	ebiggers@...gle.com,
	ytcoode@...il.com,
	vincent.guittot@...aro.org,
	dietmar.eggemann@....com,
	rostedt@...dmis.org,
	bsegall@...gle.com,
	bristot@...hat.com,
	vschneid@...hat.com,
	cl@...ux.com,
	penberg@...nel.org,
	iamjoonsoo.kim@....com,
	42.hyeyoo@...il.com,
	glider@...gle.com,
	elver@...gle.com,
	dvyukov@...gle.com,
	songmuchun@...edance.com,
	jbaron@...mai.com,
	aliceryhl@...gle.com,
	rientjes@...gle.com,
	minchan@...gle.com,
	kaleshsingh@...gle.com,
	kernel-team@...roid.com,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	iommu@...ts.linux.dev,
	linux-arch@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org,
	linux-modules@...r.kernel.org,
	kasan-dev@...glegroups.com,
	cgroups@...r.kernel.org
Subject: Re: [PATCH v6 30/37] mm: vmalloc: Enable memory allocation profiling

On Mon, 25 Mar 2024 14:56:01 +0000 Suren Baghdasaryan <surenb@...gle.com> wrote:

> On Sat, Mar 23, 2024 at 6:05 PM SeongJae Park <sj@...nel.org> wrote:
> >
> > Hi Suren and Kent,
> >
> > On Thu, 21 Mar 2024 09:36:52 -0700 Suren Baghdasaryan <surenb@...gle.com> wrote:
> >
> > > From: Kent Overstreet <kent.overstreet@...ux.dev>
> > >
> > > This wrapps all external vmalloc allocation functions with the
> > > alloc_hooks() wrapper, and switches internal allocations to _noprof
> > > variants where appropriate, for the new memory allocation profiling
> > > feature.
> >
> > I just noticed latest mm-unstable fails running kunit on my machine as below.
> > 'git-bisect' says this is the first commit of the failure.
> >
> >     $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/
> >     [10:59:53] Configuring KUnit Kernel ...
> >     [10:59:53] Building KUnit Kernel ...
> >     Populating config with:
> >     $ make ARCH=um O=../kunit.out/ olddefconfig
> >     Building with:
> >     $ make ARCH=um O=../kunit.out/ --jobs=36
> >     ERROR:root:/usr/bin/ld: arch/um/os-Linux/main.o: in function `__wrap_malloc':
> >     main.c:(.text+0x10b): undefined reference to `vmalloc'
> >     collect2: error: ld returned 1 exit status
> >
> > Haven't looked into the code yet, but reporting first.  May I ask your idea?
> 
> Hi SeongJae,
> Looks like we missed adding "#include <linux/vmalloc.h>" inside
> arch/um/os-Linux/main.c in this patch:
> https://lore.kernel.org/all/20240321163705.3067592-2-surenb@google.com/.
> I'll be posing fixes for all 0-day issues found over the weekend and
> will include a fix for this. In the meantime, to work around it you
> can add that include yourself. Please let me know if the issue still
> persists after doing that.

Thank you, Suren.  The change made the error message disappears.  However, it
introduced another one.

    $ git diff
    diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
    index c8a42ecbd7a2..8fe274e9f3a4 100644
    --- a/arch/um/os-Linux/main.c
    +++ b/arch/um/os-Linux/main.c
    @@ -16,6 +16,7 @@
     #include <kern_util.h>
     #include <os.h>
     #include <um_malloc.h>
    +#include <linux/vmalloc.h>
    
     #define PGD_BOUND (4 * 1024 * 1024)
     #define STACKSIZE (8 * 1024 * 1024)
    $
    $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/
    [10:43:13] Configuring KUnit Kernel ...
    [10:43:13] Building KUnit Kernel ...
    Populating config with:
    $ make ARCH=um O=../kunit.out/ olddefconfig
    Building with:
    $ make ARCH=um O=../kunit.out/ --jobs=36
    ERROR:root:In file included from .../arch/um/kernel/asm-offsets.c:1:
    .../arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes]
        9 | void foo(void)
          |      ^~~
    In file included from .../include/linux/alloc_tag.h:8,
                     from .../include/linux/vmalloc.h:5,
                     from .../arch/um/os-Linux/main.c:19:
    .../include/linux/bug.h:5:10: fatal error: asm/bug.h: No such file or directory
        5 | #include <asm/bug.h>
          |          ^~~~~~~~~~~
    compilation terminated.


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ