From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Jack Mitchell <ml@embed.me.uk>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] linux-yocto: enable strict kernel module signing by default
Date: Sat, 26 Nov 2022 12:45:26 +0200 [thread overview]
Message-ID: <Y4HuRpeFLL480ymN@nuoska> (raw)
In-Reply-To: <d2cd0198-ac04-159e-f4c3-42811cd677b5@embed.me.uk>
Hi,
On Fri, Nov 25, 2022 at 04:11:40PM +0000, Jack Mitchell wrote:
> On 25/11/2022 15:54, Mikko Rapeli wrote:
> > It's a good default and used in many Linux distributions.
> > Did not test out of tree modules if they do correct things but
> > any such failures should be fixed.
> >
> > One way to verify that kernel module signing also works:
> >
> > root@qemux86-64:~# dmesg|grep X.509
> > [ 1.298936] Loading compiled-in X.509 certificates
> > [ 1.328280] Loaded X.509 cert 'Build time autogenerated kernel key: ee1bed6d845358744c764683bf73b4404cc79287'
> >
> > These logs in dmesg show that signing in kernel is enabled and
> > key is found. Then if any kernel modules load, they were
> > signed correctly. Additionally modinfo tool from kmod shows kernel module
> > signing details:
>
> Hi Mikko,
>
> Do the kernel modules get properly stripped, last time I was looking at
> this it was skipped when signed and as such root filesystem sizes
> ballooned with signed modules.
Yes, possibly. Linux kernel build scripts can also do this stripping
though, and they do it correctly for kernel modules wile keeping signing
and other data intact.
We could provide EXTRA_OEMAKE += "INSTALL_MOD_STRIP=1" for kernel and
module builds to strip debug info.
$ cat linux/scripts/Makefile.modinst
...
# Strip
#
# INSTALL_MOD_STRIP, if defined, will cause modules to be stripped after
# they
# are installed. If INSTALL_MOD_STRIP is '1', then the default option
# --strip-debug will be used. Otherwise, INSTALL_MOD_STRIP value will be
# used
# as the options to the strip command.
ifdef INSTALL_MOD_STRIP
ifeq ($(INSTALL_MOD_STRIP),1)
strip-option := --strip-debug
else
strip-option := $(INSTALL_MOD_STRIP)
endif
...
Cheers,
-Mikko
next prev parent reply other threads:[~2022-11-26 10:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 15:54 [PATCH] linux-yocto: enable strict kernel module signing by default Mikko Rapeli
2022-11-25 15:57 ` Mikko Rapeli
2022-11-25 16:11 ` [OE-core] " Jack Mitchell
2022-11-26 10:45 ` Mikko Rapeli [this message]
2022-11-27 3:34 ` Bruce Ashfield
2022-11-27 18:47 ` Jack Mitchell
2022-11-28 11:12 ` Mikko Rapeli
2022-11-28 12:01 ` Ross Burton
2022-11-27 3:06 ` Bruce Ashfield
2022-11-28 7:12 ` Mikko Rapeli
2022-11-28 14:03 ` Bruce Ashfield
2022-11-28 14:23 ` Mikko Rapeli
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=Y4HuRpeFLL480ymN@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=ml@embed.me.uk \
--cc=openembedded-core@lists.openembedded.org \
/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