linux/arch
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
..
alpha Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
arc ARC: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:46 -07:00
arm Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
arm64 Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
csky ftrace changes for v6.17: 2025-07-30 16:04:10 -07:00
hexagon hexagon: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:47 -07:00
loongarch LoongArch: KVM: Add address alignment check in pch_pic register access 2025-08-20 22:51:15 +08:00
m68k treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
microblaze ftrace changes for v6.17: 2025-07-30 16:04:10 -07:00
mips Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
nios2 nios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:47 -07:00
openrisc OpenRISC updates for 6.17 2025-08-04 08:37:46 -07:00
parisc parisc architecture fixes for kernel v6.17-rc1: 2025-08-01 16:15:53 -07:00
powerpc Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
riscv Linux 6.17-rc6 2025-09-19 13:43:11 -07:00
s390 Merge patch series "Add generated modalias to modules.builtin.modinfo" 2025-09-24 09:10:54 -07:00
sh Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
sparc Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
um Mostly cleanups, except: 2025-07-29 20:31:45 -07:00
x86 Fix a CPU topology parsing bug on AMD guests, and address 2025-09-14 08:39:48 -07:00
xtensa Xtensa updates for v6.17 2025-08-09 07:35:03 +03:00
.gitignore
Kconfig arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET 2025-08-28 16:58:43 -07:00