From: Omar Sandoval <osandov@osandov.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
Samir M <samir@linux.ibm.com>,
linux-kernel@vger.kernel.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, dimitri.ledkov@surgut.co.uk,
stable@vger.kernel.org, Nicolas Schier <nsc@kernel.org>,
Alexey Gladkov <legion@kernel.org>,
linux-debuggers@vger.kernel.org
Subject: Re: [mainline]Error while running make modules_install command
Date: Wed, 5 Nov 2025 13:54:02 -0800 [thread overview]
Message-ID: <aQvHehCLxrXGcH5k@telecaster> (raw)
In-Reply-To: <20251105005603.GA769905@ax162>
On Tue, Nov 04, 2025 at 05:56:03PM -0700, Nathan Chancellor wrote:
> + Nicolas and Alexey, just as an FYI.
>
> Top of thread is:
>
> https://lore.kernel.org/7fef7507-ad64-4e51-9bb8-c9fb6532e51e@linux.ibm.com/
>
> On Tue, Nov 04, 2025 at 04:54:38PM +0530, Venkat Rao Bagalkote wrote:
> > 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@surgut.co.uk>
> > Date: Sun Oct 26 20:21:00 2025 +0000
> >
> > kbuild: align modinfo section for Secureboot Authenticode EDK2 compat
>
> Thank you for the bisect. I can reproduce this with at least kmod 29.1,
> which is the version I can see failing in drgn's CI from Ubuntu Jammy
> (but I did not see it with kmod 34, which is the latest version in Arch
> Linux at the moment).
>
> Could you and Omar verify if the following diff resolves the error for
> you? I think this would allow us to keep Dimitri's fix for the
> Authenticode EDK2 calculation (i.e., the alignment) while keeping kmod
> happy. builtin.modules.modinfo is the same after this diff as it was
> before Dimitri's change for me.
>
> Cheers,
> Nathan
>
> diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
> index ced4379550d7..c3f135350d7e 100644
> --- a/scripts/Makefile.vmlinux
> +++ b/scripts/Makefile.vmlinux
> @@ -102,11 +102,23 @@ vmlinux: vmlinux.unstripped FORCE
> # modules.builtin.modinfo
> # ---------------------------------------------------------------------------
>
> +# .modinfo in vmlinux is aligned to 8 bytes for compatibility with tools that
> +# expect sufficiently aligned sections but the additional NULL bytes used for
> +# padding to satisfy this requirement break certain versions of kmod with
> +#
> +# depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname prefix
> +#
> +# Strip the trailing padding bytes after extracting the .modinfo sections to
> +# comply with what kmod expects to parse.
> +quiet_cmd_modules_builtin_modinfo = GEN $@
> + cmd_modules_builtin_modinfo = $(cmd_objcopy); \
> + sed -i 's/\x00\+$$/\x00/g' $@
> +
> OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
>
> targets += modules.builtin.modinfo
> modules.builtin.modinfo: vmlinux.unstripped FORCE
> - $(call if_changed,objcopy)
> + $(call if_changed,modules_builtin_modinfo)
>
> # modules.builtin
> # ---------------------------------------------------------------------------
Thanks for the quick fix, this worked for me on a machine with kmod
version 28.
Tested-by: Omar Sandoval <osandov@fb.com>
Thanks,
Omar
next prev parent reply other threads:[~2025-11-05 21:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 11:17 [mainline]Error while running make modules_install command Samir M
2025-11-04 11:24 ` Venkat Rao Bagalkote
2025-11-04 18:12 ` Omar Sandoval
2025-11-04 20:35 ` Dimitri John Ledkov
2025-11-05 1:15 ` Nathan Chancellor
2025-11-05 12:51 ` Alexey Gladkov
2025-11-05 20:17 ` Nathan Chancellor
2025-11-05 21:53 ` Omar Sandoval
2025-11-06 1:08 ` Nathan Chancellor
2025-11-05 0:56 ` Nathan Chancellor
2025-11-05 9:22 ` Venkat Rao Bagalkote
2025-11-05 21:54 ` Omar Sandoval [this message]
2025-11-06 6:09 ` Samir M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aQvHehCLxrXGcH5k@telecaster \
--to=osandov@osandov.com \
--cc=dimitri.ledkov@surgut.co.uk \
--cc=legion@kernel.org \
--cc=linux-debuggers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=samir@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).