From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 13 Jan 2026 10:05:56 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfaLc-000pV7-2s for lore@lore.pengutronix.de; Tue, 13 Jan 2026 10:05:56 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vfaLc-0000ND-A3; Tue, 13 Jan 2026 10:05:56 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfaLT-0000Mj-Nz; Tue, 13 Jan 2026 10:05:47 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfaLU-000Ohs-0g; Tue, 13 Jan 2026 10:05:47 +0100 Received: from mol by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1vfaLT-009piI-1S; Tue, 13 Jan 2026 10:05:47 +0100 Date: Tue, 13 Jan 2026 10:05:47 +0100 From: Michael Olbrich To: ruggero rossi via ptxdist Message-ID: Mail-Followup-To: ruggero rossi via ptxdist , ruggero rossi , Fabian Pfitzner References: <20251210-modinfo-executable-v1-1-23c6f3fc999e@pengutronix.de> <20251212145210.3029772-1-m.olbrich@pengutronix.de> <20260112163053.28f8406f@laptop-RR> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260112163053.28f8406f@laptop-RR> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-IRC: #ptxdist @freenode Subject: Re: [ptxdist] [APPLIED] kernel: fix modules.builtin.modinfo being executable X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Fabian Pfitzner , ruggero rossi Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, On Mon, Jan 12, 2026 at 04:30:53PM +0100, ruggero rossi via ptxdist wrote: > migrating to PTXDIST 2026.01.0, I found a problem compiling the kernel. > In my (quite old) kernel, there are no modules.builtin.modinfo files, > and ptxdist install fails. Older than 5.2, right? That's the version the file was introduced from what I can tell from the git history. > It seems that the reason is this patch. > > The following patch solved my problem: > > --- /usr/local/lib/ptxdist-2026.01.0/rules/kernel.make 2025-12-12 > 09:44:06.000000000 +0100 +++ kernel.make 2026-01-12 > 16:14:44.223920509 +0100 @@ -285,7 +285,11 @@ > @$(call targetinfo) > ifdef PTXCONF_KERNEL_MODULES_INSTALL > @$(call world/install, KERNEL) > - @chmod -x $(KERNEL_PKGDIR)/lib/modules/*/modules.builtin.modinfo > + @for fileName in > $(KERNEL_PKGDIR)/lib/modules/*/modules.builtin.modinfo; do \ > + if "$fileName" ; then \ > + chmod -x "$filename" ; \ > + fi ;\ > + done I don't like patterns like this, because it silently fails if there is a typo. And we know, that this is only needed for 6.18 or later. And all 6.x versions install this file. So maybe wrap it with: ifeq ($(KERNEL_VERSION_MAJOR),6) ... endif Michael > endif > @$(call world/dtb, KERNEL) > @$(call world/dtbo, KERNEL) > > Best regards, > > Ruggero Rossi > > > On Fri, 12 Dec 2025 15:52:10 +0100 > Michael Olbrich wrote: > > > Thanks, applied as 844408110d046a967ec1d588dd038d95a6065514. > > > > Michael > > > > [sent from post-receive hook] > > > > On Fri, 12 Dec 2025 15:52:10 +0100, Fabian Pfitzner > > wrote: > > > 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 > > > Message-Id: > > > <20251210-modinfo-executable-v1-1-23c6f3fc999e@pengutronix.de> > > > Signed-off-by: Michael Olbrich > > > > > > diff --git a/rules/kernel.make b/rules/kernel.make > > > index 9cdc95a91b8b..e974304043f6 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) > > > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |