[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQpCE_XTU-bZHFbk@telecaster>
Date: Tue, 4 Nov 2025 10:12:35 -0800
From: Omar Sandoval <osandov@...ndov.com>
To: linux-kbuild@...r.kernel.org, nathan@...nel.org,
dimitri.ledkov@...gut.co.uk
Cc: Samir M <samir@...ux.ibm.com>, linux-kernel@...r.kernel.org,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, stable@...r.kernel.org,
Venkat Rao Bagalkote <venkat88@...ux.ibm.com>,
linux-debuggers@...r.kernel.org
Subject: Re: [mainline]Error while running make modules_install command
On Tue, Nov 04, 2025 at 04:54:38PM +0530, Venkat Rao Bagalkote wrote:
>
> On 04/11/25 4:47 pm, Samir M wrote:
> > 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:
> > 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 <dimitri.ledkov@...gut.co.uk>
> 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@...r.kernel.org
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@...gut.co.uk>
> Link:
> https://patch.msgid.link/20251026202100.679989-1-dimitri.ledkov@surgut.co.uk
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
>
> 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
Powered by blists - more mailing lists