Re: [RFC 12/12] module: use aliases to find module on find_module_all()
From: Petr Pavlu
Date: Wed Mar 15 2023 - 10:44:16 EST
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.
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?
Thanks,
Petr