On Fri, Mar 22, 2019 at 02:34:12PM +0900, Masahiro Yamada wrote:
Hi.
(added some people to CC)
On Fri, Mar 15, 2019 at 7:10 PM Alexey Gladkov <gladkov.alexey@xxxxxxxxx> wrote:
>
> Problem:
>
> When a kernel module is compiled as a separate module, some important
> information about the kernel module is available via .modinfo section of
> the module. In contrast, when the kernel module is compiled into the
> kernel, that information is not available.
I might be missing something, but
vmlinux provides info of builtin modules
in /sys/module/.
No. There are definitely not all modules. I have a builtin sha256_generic,
but I can't find him in the /sys/module.
(Looks like currently only module_param and MODULE_VERSION)
This patch is not exactly the same, but I see a kind of overwrap.
I'd like to be sure if we want this new scheme.
The /sys/module is only for running kernel. One of my use cases is
to create an initrd for a new kernel.
> Information about built-in modules is necessary in the following cases:
>
> 1. When it is necessary to find out what additional parameters can be
> passed to the kernel at boot time.
Actually, /sys/module/<module>/parameters/
exposes this information.
Doesn't it work for your purpose?
No, since creating an initrd needs to know all the modalias before
I get the sysfs for new kernel. Also there are no modalias at all.
> 2. When you need to know which module names and their aliases are in
> the kernel. This is very useful for creating an initrd image.
>