Thread (13 messages) 13 messages, 6 authors, 2025-11-06

Re: [mainline]Error while running make modules_install command

From: Omar Sandoval <osandov@osandov.com>
Date: 2025-11-04 18:12:38
Also in: linux-kbuild, lkml, stable

On Tue, Nov 04, 2025 at 04:54:38PM +0530, Venkat Rao Bagalkote wrote:
On 04/11/25 4:47 pm, Samir M wrote:
quoted
Hello,


I am observing below error while running the make modules_install
command on latest mainline kernel on IBM Power11 server.


Error:
DEPMOD  /lib/modules/6.18.0-rc4
depmod: ERROR: kmod_builtin_iter_next:
quoted
unexpected string without modname prefix
IBM CI has also reported this error.


Error:


depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname
prefix
  INSTALL /boot
depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname
prefix
depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname
prefix


Git bisect is pointing to below commit as first bad commit.


d50f21091358b2b29dc06c2061106cdb0f030d03 is the first bad commit
commit d50f21091358b2b29dc06c2061106cdb0f030d03
Author: Dimitri John Ledkov [off-list ref]
Date:   Sun Oct 26 20:21:00 2025 +0000

    kbuild: align modinfo section for Secureboot Authenticode EDK2 compat

    Previously linker scripts would always generate vmlinuz that has
sections
    aligned. And thus padded (correct Authenticode calculation) and unpadded
    calculation would be same. As in https://github.com/rhboot/pesign
userspace
    tool would produce the same authenticode digest for both of the
following
    commands:

        pesign --padding --hash --in ./arch/x86_64/boot/bzImage
        pesign --nopadding --hash --in ./arch/x86_64/boot/bzImage

    The commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
    vmlinux.unstripped") added .modinfo section of variable length.
Depending
    on kernel configuration it may or may not be aligned.

    All userspace signing tooling correctly pads such section to calculation
    spec compliant authenticode digest.

    However, if bzImage is not further processed and is attempted to be
loaded
    directly by EDK2 firmware, it calculates unpadded Authenticode digest
and
    fails to correct accept/reject such kernel builds even when propoer
    Authenticode values are enrolled in db/dbx. One can say EDK2 requires
    aligned/padded kernels in Secureboot.

    Thus add ALIGN(8) to the .modinfo section, to esure kernels irrespective
of
    modinfo contents can be loaded by all existing EDK2 firmware builds.

    Fixes: 3e86e4d74c04 ("kbuild: keep .modinfo section in
vmlinux.unstripped")
    Cc: stable@vger.kernel.org
    Signed-off-by: Dimitri John Ledkov [off-list ref]
    Link:
https://patch.msgid.link/20251026202100.679989-1-dimitri.ledkov@surgut.co.uk
    Signed-off-by: Nathan Chancellor [off-list ref]

 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drgn's CI hit this same failure. FWIW, the commit fixed by this bisected
commit, 3e86e4d74c04 ("kbuild: keep .modinfo section in
vmlinux.unstripped"), also results in ELF segments of size 0 in vmlinux
for some configurations, which confused drgn until I added a workaround
(https://github.com/osandov/drgn/commit/2a9053de8796af866fd720a3c8c23013595d391a).
So there's some funkiness in this area.

Thanks,
Omar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help