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]
Message-ID: <CAJmZWFFhqGv+gu2BmZZRKxELDoOLyjXdn-UQuU6CAZ_JZP7UHg@mail.gmail.com>
Date: Fri, 18 Apr 2025 13:46:15 -0300
From: Herton Krzesinski <hkrzesin@...hat.com>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org, 
	akpm@...ux-foundation.org, petr.pavlu@...e.com, samitolvanen@...gle.com, 
	da.gomez@...sung.com, Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] lib/test_kmod: do not hardcode/depend on any filesystem

On Thu, Apr 17, 2025 at 9:14 PM Luis Chamberlain <mcgrof@...nel.org> wrote:
>
> On Thu, Apr 17, 2025 at 09:08:34PM -0300, Herton R. Krzesinski wrote:
> > Right now test_kmod has hardcoded dependencies on btrfs/xfs. That
> > is not optimal since you end up needing to select/build them, but it
> > is not really required since other fs could be selected for the testing.
> > Also, we can't change the default/driver module used for testing on
> > initialization.
> >
> > Thus make it more generic: introduce two module parameters (start_driver
> > and start_test_fs), which allow to select which modules/fs to use for
> > the testing on test_kmod initialization. Then it's up to the user to
> > select which modules/fs to use for testing based on his config. However,
> > keep test_module as required default.
> >
> > This way, config/modules becomes selectable as when the testing is done
> > from selftests (userspace).
> >
> > While at it, also change trigger_config_run_type, since at module
> > initialization we already set the defaults at __kmod_config_init and
> > should not need to do it again in test_kmod_init(), thus we can
> > avoid to again set test_driver/test_fs.
> >
> > Signed-off-by: Herton R. Krzesinski <herton@...hat.com>
> > ---
> >  lib/Kconfig.debug |  6 -----
> >  lib/test_kmod.c   | 64 +++++++++++++++++++++++++----------------------
> >  2 files changed, 34 insertions(+), 36 deletions(-)
> >
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index 9fe4d8dfe578..1e0f8cbf0365 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -2983,13 +2983,7 @@ config TEST_DYNAMIC_DEBUG
> >  config TEST_KMOD
> >       tristate "kmod stress tester"
> >       depends on m
> > -     depends on NETDEVICES && NET_CORE && INET # for TUN
> > -     depends on BLOCK
> > -     depends on PAGE_SIZE_LESS_THAN_256KB # for BTRFS
>
> Please read the commit log that added PAGE_SIZE_LESS_THAN_256KB, what
> do we want to do about those complaining about that? Maybe Cc the
> author of that patch.

afaik that problem only happens because of selecting BTRFS. Since I'm removing
selection of BTRFS now it shouldn't be a problem.

>
> Other than that, it looks good to me. Did you run the selftest?

Yes, I did both load the module with force_init_test and without, and
run the kmod.sh selftest and arbitrarily chose vfat module for fs test
(in my config
xfs is loaded/used and ext4 is builtin).

But now I noticed that I forgot to update
tools/testing/selftests/kmod/config, I'll
send a v2 shortly.

>
> Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
>
>   Luis
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ