From: ruggero rossi via ptxdist <ptxdist@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: ruggero rossi <rugrossi@googlemail.com>,
Michael Olbrich <m.olbrich@pengutronix.de>,
Fabian Pfitzner <f.pfitzner@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] kernel: fix modules.builtin.modinfo being executable
Date: Mon, 12 Jan 2026 16:30:53 +0100 [thread overview]
Message-ID: <20260112163053.28f8406f@laptop-RR> (raw)
In-Reply-To: <20251212145210.3029772-1-m.olbrich@pengutronix.de>
Hello Everybody,
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.
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
endif
@$(call world/dtb, KERNEL)
@$(call world/dtbo, KERNEL)
Best regards,
Ruggero Rossi
On Fri, 12 Dec 2025 15:52:10 +0100
Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> Thanks, applied as 844408110d046a967ec1d588dd038d95a6065514.
>
> Michael
>
> [sent from post-receive hook]
>
> On Fri, 12 Dec 2025 15:52:10 +0100, Fabian Pfitzner
> <f.pfitzner@pengutronix.de> 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 <f.pfitzner@pengutronix.de>
> > Message-Id:
> > <20251210-modinfo-executable-v1-1-23c6f3fc999e@pengutronix.de>
> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> >
> > 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)
>
next prev parent reply other threads:[~2026-01-12 15:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 16:22 [ptxdist] [PATCH] " Fabian Pfitzner
2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich
2026-01-12 15:30 ` ruggero rossi via ptxdist [this message]
2026-01-13 9:05 ` Michael Olbrich
2026-01-13 9:48 ` ruggero rossi via ptxdist
2026-01-13 14:57 ` Uwe Kleine-König
2026-01-16 8:31 ` ruggero rossi via ptxdist
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260112163053.28f8406f@laptop-RR \
--to=ptxdist@pengutronix.de \
--cc=f.pfitzner@pengutronix.de \
--cc=m.olbrich@pengutronix.de \
--cc=rugrossi@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox