lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ab4297c-b4b5-4eb2-8389-cd9fe29d7bc3@linux.ibm.com>
Date: Wed, 5 Nov 2025 14:52:18 +0530
From: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
To: Nathan Chancellor <nathan@...nel.org>, Omar Sandoval <osandov@...ndov.com>
Cc: Samir M <samir@...ux.ibm.com>, linux-kernel@...r.kernel.org,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        linuxppc-dev@...ts.ozlabs.org, dimitri.ledkov@...gut.co.uk,
        stable@...r.kernel.org, Nicolas Schier <nsc@...nel.org>,
        Alexey Gladkov <legion@...nel.org>, linux-debuggers@...r.kernel.org
Subject: Re: [mainline]Error while running make modules_install command


On 05/11/25 6:26 am, 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@...gut.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
>   # ---------------------------------------------------------------------------
>

This change fixes the reported issue. You can add below tag as well, 
while sending a patch.


Tested-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>


Regards,

Venkat.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ