From: Lorenzo Stoakes <lstoakes@gmail.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
Matthew Wilcox <willy@infradead.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Eric Biederman <ebiederm@xmission.com>,
Kees Cook <kees@kernel.org>,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [RFC PATCH 6/7] tools: separate out shared radix-tree components
Date: Thu, 27 Jun 2024 21:39:14 +0100 [thread overview]
Message-ID: <4b4361cc-3a29-4dbf-ad47-a1d8d05e7781@lucifer.local> (raw)
In-Reply-To: <mqqoj4c2777ypdmj2o5xyofvitytijfuxwjqujnaww7y22zrob@rof2tmdb7hwl>
On Thu, Jun 27, 2024 at 04:03:21PM -0400, Liam R. Howlett wrote:
> * Lorenzo Stoakes <lstoakes@gmail.com> [240627 15:47]:
> > On Thu, Jun 27, 2024 at 01:59:18PM -0400, Liam R. Howlett wrote:
> > > * Lorenzo Stoakes <lstoakes@gmail.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 did see link errors at some point when radix-tree wasn't included there,
I'll take another look and see if we can reduce to a smaller subset if
posible.
>
> >
> > I'm not sure this is a huge big deal as these are all rather small :)
>
> Yeah, maybe not worth the effort.
>
> Cheers,
> Liam
next prev parent reply other threads:[~2024-06-27 20:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 10:39 [RFC PATCH 0/7] Make core VMA operations internal and testable Lorenzo Stoakes
2024-06-27 10:39 ` [RFC PATCH 1/7] userfaultfd: move core VMA manipulation logic to mm/userfaultfd.c Lorenzo Stoakes
2024-06-27 10:39 ` [RFC PATCH 2/7] mm: move vma_modify() and helpers to internal header Lorenzo Stoakes
2024-06-27 17:25 ` Liam R. Howlett
2024-06-27 19:33 ` Lorenzo Stoakes
2024-06-27 10:39 ` [RFC PATCH 4/7] mm: move internal core VMA manipulation functions to own file Lorenzo Stoakes
2024-06-27 17:56 ` Liam R. Howlett
2024-06-27 19:41 ` Lorenzo Stoakes
2024-06-27 19:46 ` Liam R. Howlett
2024-06-27 10:39 ` [RFC PATCH 5/7] MAINTAINERS: Add entry for new VMA files Lorenzo Stoakes
2024-06-27 10:39 ` [RFC PATCH 6/7] tools: separate out shared radix-tree components Lorenzo Stoakes
2024-06-27 17:59 ` Liam R. Howlett
2024-06-27 19:46 ` Lorenzo Stoakes
2024-06-27 20:03 ` Liam R. Howlett
2024-06-27 20:39 ` Lorenzo Stoakes [this message]
2024-06-27 10:39 ` [RFC PATCH 7/7] tools: add skeleton code for userland testing of VMA logic Lorenzo Stoakes
2024-06-27 16:58 ` Kees Cook
2024-06-27 18:25 ` Liam R. Howlett
2024-06-27 19:31 ` Lorenzo Stoakes
2024-06-27 19:46 ` Kees Cook
2024-06-27 17:20 ` Liam R. Howlett
2024-06-27 19:25 ` Lorenzo Stoakes
2024-06-27 19:42 ` Liam R. Howlett
[not found] ` <8c548bb3d0286bfaef2cd5e67d7bf698967a52a1.1719481836.git.lstoakes@gmail.com>
2024-06-27 17:45 ` [RFC PATCH 3/7] mm: unexport vma_expand() / vma_shrink() Liam R. Howlett
2024-06-27 19:38 ` Lorenzo Stoakes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b4361cc-3a29-4dbf-ad47-a1d8d05e7781@lucifer.local \
--to=lstoakes@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox