All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: yocto@yoctoproject.org
Subject: [meta-security 3/3] linux: add support for kernel modules signing
Date: Sun, 28 Jul 2019 18:31:50 +0300	[thread overview]
Message-ID: <20190728153150.9438-3-dbaryshkov@gmail.com> (raw)
In-Reply-To: <20190728153150.9438-1-dbaryshkov@gmail.com>

From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
---
 meta-integrity/recipes-kernel/linux/linux-%.bbappend  | 3 +++
 meta-integrity/recipes-kernel/linux/linux/modsign.cfg | 5 +++++
 meta-integrity/recipes-kernel/linux/linux/modsign.scc | 4 ++++
 3 files changed, 12 insertions(+)
 create mode 100644 meta-integrity/recipes-kernel/linux/linux/modsign.cfg
 create mode 100644 meta-integrity/recipes-kernel/linux/linux/modsign.scc

diff --git a/meta-integrity/recipes-kernel/linux/linux-%.bbappend b/meta-integrity/recipes-kernel/linux/linux-%.bbappend
index 931854ef8257..ca96c8d1901e 100644
--- a/meta-integrity/recipes-kernel/linux/linux-%.bbappend
+++ b/meta-integrity/recipes-kernel/linux/linux-%.bbappend
@@ -1,3 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
 
 SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ima', ' file://ima.cfg', '', d)}"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'modsign', ' file://modsign.scc file://modsign.cfg', '', d)}"
+
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'modsign', 'kernel-modsign', '', d)}
diff --git a/meta-integrity/recipes-kernel/linux/linux/modsign.cfg b/meta-integrity/recipes-kernel/linux/linux/modsign.cfg
new file mode 100644
index 000000000000..c0c4ebcf2e7b
--- /dev/null
+++ b/meta-integrity/recipes-kernel/linux/linux/modsign.cfg
@@ -0,0 +1,5 @@
+CONFIG_MODULE_SIG=y
+CONFIG_MODULE_SIG_FORCE=y
+CONFIG_MODULE_SIG_SHA256=y
+CONFIG_MODULE_SIG_HASH="sha256"
+CONFIG_MODULE_SIG_KEY="modsign_key.pem"
diff --git a/meta-integrity/recipes-kernel/linux/linux/modsign.scc b/meta-integrity/recipes-kernel/linux/linux/modsign.scc
new file mode 100644
index 000000000000..bce78ae9b145
--- /dev/null
+++ b/meta-integrity/recipes-kernel/linux/linux/modsign.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Kernel Module Signing (modsign) enablement"
+define KFEATURE_COMPATIBILITY all
+
+kconf non-hardware modsign.cfg
-- 
2.20.1



      parent reply	other threads:[~2019-07-28 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 15:31 [meta-security 1/3] meta-integrity: rename IMA_EVM_BASE to INTEGRITY_BASE Dmitry Eremin-Solenikov
2019-07-28 15:31 ` [meta-security 2/3] kernel-modsign.bbclass: add support for kernel modules signing Dmitry Eremin-Solenikov
2019-08-04 15:30   ` akuster808
2019-08-04 20:24     ` Dmitry Eremin-Solenikov
2019-08-04 20:52       ` akuster808
2019-08-04 21:04         ` Dmitry Eremin-Solenikov
2019-07-28 15:31 ` Dmitry Eremin-Solenikov [this message]

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=20190728153150.9438-3-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.