ima: Support platform keyring for kernel appraisal
authorNayna Jain <nayna@linux.ibm.com>
Sat, 8 Dec 2018 20:27:05 +0000 (01:57 +0530)
committerMimi Zohar <zohar@linux.ibm.com>
Thu, 13 Dec 2018 03:09:33 +0000 (22:09 -0500)
commitd7cecb676dd364b28a5a8f5e4a30ce2e9cfdfcc3
tree8119e0996f551cbb0a7e6c2568f5986d40f1effc
parent386b49f51dc24d1f9139eb11f49aa075eeb35363
ima: Support platform keyring for kernel appraisal

On secure boot enabled systems, the bootloader verifies the kernel
image and possibly the initramfs signatures based on a set of keys. A
soft reboot(kexec) of the system, with the same kernel image and
initramfs, requires access to the original keys to verify the
signatures.

This patch allows IMA-appraisal access to those original keys, now
loaded on the platform keyring, needed for verifying the kernel image
and initramfs signatures.

[zohar@linux.ibm.com: only use platform keyring if it's enabled (Thiago)]
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Reviewed-by: James Morris <james.morris@microsoft.com>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_appraise.c