Re: [RFC 12/12] module: use aliases to find module on find_module_all()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 15, 2023 at 03:43:54PM +0100, Petr Pavlu wrote:
> On 3/11/23 06:17, Luis Chamberlain wrote:
> > Modules can have a series of aliases, but we don't currently use
> > them to check if a module is already loaded. Part of this is because
> > load_module() will stick to checking for already loaded modules using
> > the actual module name, not an alias. Its however desriable to also
> > check for aliases on find_module_all() for existing callers and future
> > callers. The curent gain to using aliases on find_module_all() will
> > simply be to be able to support unloading modules using the alias using
> > the delete_module() syscall.
> 
> Different modules can have same aliases. Running
> 'sort modules.alias | cut -d' ' -f2 | uniq -dc' shows a list of them.

Ah then nevermind then thanks! I'll be sure to document this moving
forwward!

> When a modprobe load of such an alias is requested, my reading is that this
> new find_module_all() logic (if enabled) causes that only the first matched
> module is inserted and others get recognized as duplicates, which doesn't look
> right to me.
> 
> In general, I'm not sure that I understand motivation to keep track of these
> aliases in the kernel. Do you have links to previous discussions that I could
> perhaps read?

The idea was an old one and if it could help, but the above makes the
idea useless, and so the only value for these aliases in-kernel could be
for debugging, that's all.

Removing this will also simplify this patch series anyway.

  Luis



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux