From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Mar 2026 14:01:38 +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 1w66ok-005jAv-0A for lore@lore.pengutronix.de; Fri, 27 Mar 2026 14:01:38 +0100 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1w66oj-0006JC-Tj; Fri, 27 Mar 2026 14:01:37 +0100 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1w66ob-0006IC-8E; Fri, 27 Mar 2026 14:01:29 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 71201148F3DD; Fri, 27 Mar 2026 14:01:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1774616484; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=kw0sJgOOo4TVKNsXY8llYrDRWyHBX1e8XvO1pmWB15c=; b=X1HS3fK535oNptALs3szSVtgw9BvLZMIy3Sv5MWSp5owyH1hwGBVL+GFtXkgfCtNdFiq4n sJ8+OPn39a3Wxos/C383DJBYi71Q96oJj/hCkiZF1sX6eAKZ1Zk8rZjGcOateYU7SO4tsR xcVmSn6MiP65wzImpgIYBVjBwd4f6FJ72apWEwKOj49POlhT7MvupnD4KOoFGMyWQrfZIJ 7gpK2zYg3zlTKHujsRUPRCD05HcenGUZFOjyd2QwjeDpD39U2WIO8q9E6EWLnuKSIZ+g9D nnYFAbdKCHkzmBcN/j4wGTcF89/hxgTLqS5q6QoMc+czPb5/i2WwzOsbac9Aew== Date: Fri, 27 Mar 2026 14:01:17 +0100 To: ptxdist@pengutronix.de Message-ID: <20260327-engraving-dipped-b51998608d5b@thorsis.com> Mail-Followup-To: ptxdist@pengutronix.de, Michael Olbrich , Fabian Pfitzner , ruggero rossi References: <20260113104815.6cfcc112@laptop-RR> <20260327095642.526947-1-ada@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.13 (2024-03-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.1 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH] kernel: Call chmod modules.builtin.modinfo for v6.x only 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: , From: Alexander Dahl via ptxdist Reply-To: ptxdist@pengutronix.de Cc: Alexander Dahl , Michael Olbrich , 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 Hello Bruno, Am Fri, Mar 27, 2026 at 01:43:29PM +0100 schrieb Bruno Thomsen: > Hi Alexander, > > Den fre. 27. mar. 2026 kl. 10.56 skrev Alexander Dahl via ptxdist > : > > > > kernel.install stage fails for kernel versions before v5.2 (which > > introduced modules.builtin.modinfo in the first place) like this: > > > > DEPMOD 4.9.327-rt197-tt > > depmod: WARNING: could not open modules.builtin.modinfo at [redacted]/platform-ncl/packages/linux-4.9.327/lib/modules/4.9.327-rt197-tt: No such file or directory > > chmod: cannot access '[redacted]/platform-ncl/packages/linux-4.9.327/lib/modules/*/modules.builtin.modinfo': No such file or directory > > make: *** [/usr/local/lib/ptxdist-2026.01.0/rules/kernel.make:287: [redacted]/platform-ncl/state/kernel.install] Error 1 > > ptxdist install kernel 3,75s user 1,63s system 101% cpu 5,308 total > > > > The chmod fix is only necessary for kernel v6.18 which introduced the > > faulty executable permissions. It was fixed for v6.19 with kernel commit > > 6d60354ea2f9 ("kbuild: Fix permissions of modules.builtin.modinfo"). > > > > Suggested-by: Michael Olbrich > > Tested-by: Ruggero Rossi > > Fixes: 844408110d04 ("kernel: fix modules.builtin.modinfo being executable") > > Signed-off-by: Alexander Dahl > > --- > > rules/kernel.make | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/rules/kernel.make b/rules/kernel.make > > index c1f10f62e..d366be714 100644 > > --- a/rules/kernel.make > > +++ b/rules/kernel.make > > @@ -285,7 +285,9 @@ $(STATEDIR)/kernel.install: > > @$(call targetinfo) > > ifdef PTXCONF_KERNEL_MODULES_INSTALL > > @$(call world/install, KERNEL) > > +ifeq ($(KERNEL_VERSION_MAJOR),6) > > @chmod -x $(KERNEL_PKGDIR)/lib/modules/*/modules.builtin.modinfo > > +endif > > Good fix, but it will break when using kernel version 7.0 which is > expected to be > released next month. Maybe do something like this (untested): > > ifeq ($(shell test $(KERNEL_VERSION_MAJOR) -ge 6; echo $$?),0) I actually noticed the same thing: fix is for kernel v6 only, and asked myself what's with v7 or later? Turns out that's sufficient, because as written in the commit message: only kernel v6.18 is affected. There is no chmod necessary for releases before _and_ after v6.18. In other words: the chmod call should be avoided for kernels up to v5.1 (intention of the patch), and is neither necessary for v5.2 or later v5 kernels, nor is it necessary for v7 and later (given there won't be regressions), because the flaw was introduced with v6.18 and fixed with v6.19. That's why I added a note in the commit message. I does not break things when calling on all v6 kernels though. I think Michael suggested to test on major version only, because it is easier to implement and less likely to break? Should we add a comment in the makefile for clarifying or is git history enough? Nevertheless, thanks for pointing it out. Greets Alex > > /Bruno > > > endif > > @$(call world/dtb, KERNEL) > > @$(call world/dtbo, KERNEL) > > > > base-commit: eedd3da887e42dcc0e6ffb95a348107e2a5bcf4f > > -- > > 2.47.3 > > > > >