* [ptxdist] [PATCH] kernel: fix modules.builtin.modinfo being executable
@ 2025-12-10 16:22 Fabian Pfitzner
0 siblings, 0 replies; only message in thread
From: Fabian Pfitzner @ 2025-12-10 16:22 UTC (permalink / raw)
To: ptxdist; +Cc: Fabian Pfitzner
Since kernel commit a26a6c93edfe ("kbuild: Strip trailing padding bytes from
modules.builtin.modinfo") [1], 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.
Fix this problem by removing the execution bit afterwards.
I also send a patch upstream to the kernel [2].
[1] https://lore.kernel.org/all/20251105-kbuild-fix-builtin-modinfo-for-kmod-v1-1-b419d8ad4606@kernel.org
[2] https://lore.kernel.org/all/20251209-modinfo-executable-v1-1-ed0c553a4390@pengutronix.de/#t
Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
---
rules/kernel.make | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/kernel.make b/rules/kernel.make
index 9cdc95a91b8b19bc1b5c19e9790bd9eb1c8c6d7c..e974304043f634add332dce10c7c2553f56b30a4 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -274,6 +274,7 @@ $(STATEDIR)/kernel.install:
@$(call targetinfo)
ifdef PTXCONF_KERNEL_MODULES_INSTALL
@$(call world/install, KERNEL)
+ @chmod -x $(KERNEL_PKGDIR)/lib/modules/*/modules.builtin.modinfo
endif
@$(call world/dtb, KERNEL)
@$(call world/dtbo, KERNEL)
---
base-commit: fd0dc47b258aac09ab961199a3c00ecddf98f244
change-id: 20251210-modinfo-executable-c6985ef6da30
Best regards,
--
Fabian Pfitzner <f.pfitzner@pengutronix.de>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-10 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-10 16:22 [ptxdist] [PATCH] kernel: fix modules.builtin.modinfo being executable Fabian Pfitzner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox