Go to file
Nathan Chancellor c7d3dd9163
Merge patch series "Add generated modalias to modules.builtin.modinfo"
Alexey Gladkov says:

The modules.builtin.modinfo file is used by userspace (kmod to be specific) to
get information about builtin modules. Among other information about the module,
information about module aliases is stored. This is very important to determine
that a particular modalias will be handled by a module that is inside the
kernel.

There are several mechanisms for creating modalias for modules:

The first is to explicitly specify the MODULE_ALIAS of the macro. In this case,
the aliases go into the '.modinfo' section of the module if it is compiled
separately or into vmlinux.o if it is builtin into the kernel.

The second is the use of MODULE_DEVICE_TABLE followed by the use of the
modpost utility. In this case, vmlinux.o no longer has this information and
does not get it into modules.builtin.modinfo.

For example:

$ modinfo pci:v00008086d0000A36Dsv00001043sd00008694bc0Csc03i30
modinfo: ERROR: Module pci:v00008086d0000A36Dsv00001043sd00008694bc0Csc03i30 not found.

$ modinfo xhci_pci
name:           xhci_pci
filename:       (builtin)
license:        GPL
file:           drivers/usb/host/xhci-pci
description:    xHCI PCI Host Controller Driver

The builtin module is missing alias "pci:v*d*sv*sd*bc0Csc03i30*" which will be
generated by modpost if the module is built separately.

To fix this it is necessary to add the generated by modpost modalias to
modules.builtin.modinfo. Fortunately modpost already generates .vmlinux.export.c
for exported symbols. It is possible to add `.modinfo` for builtin modules and
modify the build system so that `.modinfo` section is extracted from the
intermediate vmlinux after modpost is executed.

Link: https://patch.msgid.link/cover.1758182101.git.legion@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2025-09-24 09:10:54 -07:00
Documentation Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
LICENSES
arch Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
block vfs-6.17-rc6.fixes 2025-09-08 07:53:01 -07:00
certs
crypto
drivers Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
fs Fix a CPU topology parsing bug on AMD guests, and address 2025-09-14 08:39:48 -07:00
include Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
init Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
io_uring vfs-6.17-rc6.fixes 2025-09-08 07:53:01 -07:00
ipc
kernel Fix a lost-timeout CPU hotplug bug in the hrtimer code, which 2025-09-14 08:38:05 -07:00
lib Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
mm 20 hotfixes. 15 are cc:stable and the remainder address post-6.16 issues 2025-09-10 21:19:34 -07:00
net A fix for a race condition around r_parent tracking that took a long 2025-09-13 10:45:11 -07:00
rust Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
samples
scripts Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
security
sound
tools Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.pylintrc
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Input updates for v6.17-rc5 2025-09-14 08:09:37 -07:00
Makefile Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.