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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bjztsp2b.fsf@toke.dk>
Date: Wed, 09 Oct 2024 09:39:08 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
 <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, Andrii
 Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
 Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>, Yonghong
 Song <yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>, Stanislav
 Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>, Kumar Kartikeya Dwivedi <memxor@...il.com>, Simon
 Sundberg <simon.sundberg@....se>, bpf <bpf@...r.kernel.org>, Network
 Development <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf 2/4] selftests/bpf: Consolidate kernel modules into
 common directory

Alexei Starovoitov <alexei.starovoitov@...il.com> writes:

> On Tue, Oct 8, 2024 at 3:35 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>>
>> The selftests build two kernel modules (bpf_testmod.ko and
>> bpf_test_no_cfi.ko) which use copy-pasted Makefile targets. This is a
>> bit messy, and doesn't scale so well when we add more modules, so let's
>> consolidate these rules into a single rule generated for each module
>> name, and move the module sources into a single directory.
>>
>> To avoid parallel builds of the different modules stepping on each
>> other's toes during the 'modpost' phase of the Kbuild 'make modules', we
>> create a single target for all the defined modules, which contains the
>> recursive 'make' call into the modules directory. The Makefile in the
>> subdirectory building the modules is modified to also touch a
>> 'modules.built' file, which we can add as a dependency on the top-level
>> selftests Makefile, thus ensuring that the modules are always rebuilt if
>> any of the dependencies in the selftests change.
>
> Nice cleanup, but looks unrelated to the fix and hence
> not a bpf material.
> Why combine them?

Because the selftest adds two more kernel modules to the selftest build,
so we'd have to add two more directories with a single module in each
and copy-pasted Makefile rules. It seemed simpler to just refactor the
build of the two existing modules first, after which adding the two new
modules means just dropping two more source files into the modules
directory.

I guess we could technically do the single-directory-per-module, and
then send this patch as a follow-up once bpf gets merged back into
bpf-next, but it seems a bit of a hassle, TBH. WDYT?

-Toke


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ