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: Thu, 27 Jun 2024 16:03:21 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Lorenzo Stoakes <lstoakes@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Vlastimil Babka <vbabka@...e.cz>, Matthew Wilcox <willy@...radead.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
        Eric Biederman <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>,
        Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [RFC PATCH 6/7] tools: separate out shared radix-tree components

* Lorenzo Stoakes <lstoakes@...il.com> [240627 15:47]:
> On Thu, Jun 27, 2024 at 01:59:18PM -0400, Liam R. Howlett wrote:
> > * Lorenzo Stoakes <lstoakes@...il.com> [240627 06:39]:
> > > The core components contained within the radix-tree tests which provide
> > > shims for kernel headers and access to the maple tree are useful for
> > > testing other things, so separate them out and make the radix tree tests
> > > dependent on the shared components.
> > >
> > > This lays the groundwork for us to add VMA tests of the newly introduced
> > > vma.c file.
> >
> > This separation and subsequent patch requires building the
> > xarray-hsared, radix-tree, idr, find_bit, and bitmap .o files which are
> > unneeded for the target 'main'.  I'm not a build expert on how to fix
> > this, but could that be reduced to the minimum set somehow?
> 
> I'm confused, the existing Makefile specified:
> 
> CORE_OFILES := xarray.o radix-tree.o idr.o linux.o test.o find_bit.o bitmap.o \
> 			 slab.o maple.o
> 
> OFILES = main.o $(CORE_OFILES) regression1.o regression2.o regression3.o \
> 	 regression4.o tag_check.o multiorder.o idr-test.o iteration_check.o \
> 	 iteration_check_2.o benchmark.o
> 
> main:	$(OFILES)
> 
> Making all of the files you mentioned dependencies of main no? (xarray-shared
> being a subset of xarray.o which requires it anyway)

After replacing main with vma and dropping the vma.c, I can generate the
vma executable. I had to generate map-shift.h and bit-lenght.h, then
execute:

cc -O2 -g -Wall -I../shared -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o vma.o vma.c
cc -c -O2 -g -Wall -I../shared -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined ../shared/linux.c -o linux.o
cc -O2 -g -Wall -I../shared -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o slab.o ../../lib/slab.c
cc -c -O2 -g -Wall -I../shared -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined ../shared/maple-shim.c -o maple-shim.o
cc -O2 -g -Wall -I../shared -I. -I../../include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o vma_stub.o vma_stub.c
cc -fsanitize=address -fsanitize=undefined vma.o linux.o slab.o maple-shim.o vma_stub.o -lpthread -lurcu -o vma

Dropping a number of the pre-built items.  When I looked at the list, it
seemed too numerous for what we were doing (why do we need idr, and
radix-tree?)  So I tried removing as many as I could.

> 
> I'm not sure this is a huge big deal as these are all rather small :)

Yeah, maybe not worth the effort.

Cheers,
Liam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ