[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7779891b-7ff1-4846-aa49-5d4139c5cc38@infradead.org>
Date: Tue, 9 Dec 2025 10:02:34 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Fabian Pfitzner <f.pfitzner@...gutronix.de>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nsc@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kbuild: fix modules.builtin.modinfo being executable
On 12/9/25 7:59 AM, Fabian Pfitzner wrote:
> Since commit a26a6c93edfe ("kbuild: Strip trailing padding bytes from
> modules.builtin.modinfo") the resulting modules.builtin.modinfo file gets
> copied by objcopy resulting in an executable file.
>
> It seems, that objcopy detects this file as executable even though
> the file is not executable at all.
>
> This problem arises on x86_64 and arm-v7a, but for some reason does not
> happen on aarch64.
>
> Fix this problem by removing the execution bit afterwards.
>
> Signed-off-by: Fabian Pfitzner <f.pfitzner@...gutronix.de>
WFM. Thanks.
Acked-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org>
> ---
> scripts/Makefile.vmlinux | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
> index cd788cac9d91dadcf4e83a39142f9d7bc61ffed0..7ee6aad760495ac5357132954c32ff879d24f72e 100644
> --- a/scripts/Makefile.vmlinux
> +++ b/scripts/Makefile.vmlinux
> @@ -113,6 +113,7 @@ vmlinux: vmlinux.unstripped FORCE
> # what kmod expects to parse.
> quiet_cmd_modules_builtin_modinfo = GEN $@
> cmd_modules_builtin_modinfo = $(cmd_objcopy); \
> + chmod -x $@; \
> sed -i 's/\x00\+$$/\x00/g' $@
>
> OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
>
> ---
> base-commit: cb015814f8b6eebcbb8e46e111d108892c5e6821
> change-id: 20251209-modinfo-executable-2d2af74150c0
>
> Best regards,
--
~Randy
Powered by blists - more mailing lists