OSDN Git Service

integrity: Introduce a Linux keyring called machine
authorEric Snowberg <eric.snowberg@oracle.com>
Wed, 26 Jan 2022 02:58:28 +0000 (21:58 -0500)
committerJarkko Sakkinen <jarkko@kernel.org>
Tue, 8 Mar 2022 11:55:52 +0000 (13:55 +0200)
commitd19967764ba876f5c82dabaa28f983b21eb642a2
treeebfe7a4f013e4bc28177ad7dc247071a05615def
parente561752c317023c1f68df3950641747475fdcb29
integrity: Introduce a Linux keyring called machine

Many UEFI Linux distributions boot using shim.  The UEFI shim provides
what is called Machine Owner Keys (MOK). Shim uses both the UEFI Secure
Boot DB and MOK keys to validate the next step in the boot chain.  The
MOK facility can be used to import user generated keys.  These keys can
be used to sign an end-users development kernel build.  When Linux
boots, both UEFI Secure Boot DB and MOK keys get loaded in the Linux
.platform keyring.

Define a new Linux keyring called machine.  This keyring shall contain just
MOK keys and not the remaining keys in the platform keyring. This new
machine keyring will be used in follow on patches.  Unlike keys in the
platform keyring, keys contained in the machine keyring will be trusted
within the kernel if the end-user has chosen to do so.

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Tested-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
security/integrity/Kconfig
security/integrity/Makefile
security/integrity/digsig.c
security/integrity/integrity.h
security/integrity/platform_certs/machine_keyring.c [new file with mode: 0644]