[PATCH v6 02/15] module: Introduce ksys_finit_module()
Luis Chamberlain
mcgrof at kernel.org
Tue Nov 19 20:10:45 UTC 2024
On Tue, Nov 19, 2024 at 01:14:02PM +0100, Christoph Hellwig wrote:
> On Tue, Nov 19, 2024 at 11:49:09AM +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu at huawei.com>
> >
> > Introduce ksys_finit_module() to let kernel components request a kernel
> > module without requiring running modprobe.
>
> That does sound more than sketchy, even more so because the commit log
> completely fails to explain why you'd need to do that.
I also don't think the commit log is correct, I don't see how the
code is preventing calling modprobe, the indepotent check is intended
to prevent duplicate module init calls which may allocate extra vmalloc
space only to release it. You can test to see if your patch has any
improvments by enabling MODULE_STATS and MODULE_DEBUG_AUTOLOAD_DUPS
and check before / after results of /sys/kernel/debug/modules/stats ,
right now this patch and commit log is not telling me anything useful.
Luis
More information about the Linux-security-module-archive
mailing list