kexec_file: Restrict at runtime if the kernel is locked down
authorChun-Yi Lee <joeyli.kernel@gmail.com>
Wed, 8 Nov 2017 15:11:33 +0000 (15:11 +0000)
committerBastian Blank <waldi@debian.org>
Fri, 22 Jun 2018 09:50:22 +0000 (10:50 +0100)
commit984313f49e8b14eb787181c7914fe22566ab0bbf
tree69a3cd07f0c6633db40d6c158d8a1e5e6f469179
parentb7af26da940a0bcb4aff476fd05cf352c8aceb35
kexec_file: Restrict at runtime if the kernel is locked down

When KEXEC_VERIFY_SIG is not enabled, kernel should not load images through
kexec_file systemcall if the kernel is locked down unless IMA can be used
to validate the image.

This code was showed in Matthew's patch but not in git:
https://lkml.org/lkml/2015/3/13/778

Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: kexec@lists.infradead.org

Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0008-kexec_file-Restrict-at-runtime-if-the-kernel-is-lock.patch
kernel/kexec_file.c