public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Holger Kiehl <Holger.Kiehl@dwd.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	linux-kbuild@vger.kernel.org,
	Uday Shankar <ushankar@purestorage.com>
Subject: Re: Since 6.18.x make binrpm-pkg does not sign modules
Date: Sat, 10 Jan 2026 22:34:24 +0100	[thread overview]
Message-ID: <aWLF4BwQemwIZMMp@levanger> (raw)
In-Reply-To: <71bc53a4-9b54-c15a-96e-23fb338ac71@praktifix.dwd.de>

On Sat, Jan 10, 2026 at 12:43:26PM +0100, Holger Kiehl wrote:
> On Fri, 9 Jan 2026, Nicolas Schier wrote:
> 
> > On Fri, Jan 09, 2026 at 03:04:33PM +0100, Holger Kiehl wrote:
> > > Hello,
> > > 
> > > when building kernel with 'make binrpm-pkg' the modules in the
> > > /lib/modules directory of the rpm package are no longer signed
> > > although one sees the following during the build process:
> > > 
> > >    .
> > >    .
> > >    INSTALL /usr/src/kernels/linux-6.18.4/rpmbuild/BUILD/kernel-6.18.4-build/BUILDROOT/lib/modules/6.18.4/kernel/net/qrtr/qrtr.ko
> > >    .
> > >    .
> > >    SIGN    /usr/src/kernels/linux-6.18.4/rpmbuild/BUILD/kernel-6.18.4-build/BUILDROOT/lib/modules/6.18.4/kernel/net/qrtr/qrtr.ko
> > 
> > thanks for your report; well, that's interesting.  The modules signed
> > during the package build preparations ("SIGN    .../rpmbuild/BUILD/...")
> > is significantly larger than the one in the build tree (as expected, as
> > the latter is unsigned); but the one that lands in the rpm package is
> > _smaller_ than the module in the build tree.
> > 
> Reading the comment in scripts/package/kernel.spec
> 
>    # later, we make all modules executable so that find-debuginfo.sh strips
>    # them up. but they don't actually need to be executable, so remove the
>    # executable bit, taking care to do it _after_ find-debuginfo.sh has run
> 
> I would think that find-debuginfo.sh also strips the signature of the
> modules.

As the signature is just appended and not part of the actual ELF file,
that makes sense -- and signature would have become invalid due to the
stripping.

> As a quick test I replaced scripts/package/kernel.spec and
> scripts/package/mkspec in the 6.18.4 tree with those from 6.12.64 and
> then did a 'make binrpm-pkg'. Then the signature of the modules in
> the rpm package are not removed.

Thanks for the further debugging!
> 
> Looking back, it looks like this change was introduced with 6.15-rc1:
> 
> https://github.com/torvalds/linux/commit/a7c699d090a1f3795c3271c2b399230e182db06e
>    or
> https://lkml.org/lkml/2025/3/31/1313
> 
> The module signatures are needed if you run the kernel in lockdown mode.
> The kernel refuses to load unsigned modules.

Sure, signed modules should be supported by *rpm-plg targets.

A simple solution might be to call modules_sign target after the
find-debuginfo.sh run; but commit 16c36f8864e3 spunds to me as if we
should rather do something similiar as for the Debian packages:
modules_install with INSTALL_MOD_STRIP=1 and then install only the debug
infos manually.

Does that make sense?

Kind regards
Nicolas


  reply	other threads:[~2026-01-10 21:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 14:04 Since 6.18.x make binrpm-pkg does not sign modules Holger Kiehl
2026-01-09 21:06 ` Nicolas Schier
2026-01-10 11:43   ` Holger Kiehl
2026-01-10 21:34     ` Nicolas Schier [this message]
2026-01-11 17:41       ` Holger Kiehl
2026-01-15  8:30         ` Nicolas Schier
2026-01-20  0:04         ` Nathan Chancellor
2026-01-20 23:21           ` Holger Kiehl

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=aWLF4BwQemwIZMMp@levanger \
    --to=nsc@kernel.org \
    --cc=Holger.Kiehl@dwd.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ushankar@purestorage.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