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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Apr 2018 10:13:03 +0000 (11:13 +0100)
commit5c75a9a1ee1453b25634788bd3af6934a7774470
treef8c9a6a597c77d28b87b1db2df0ae54fda2a71b8
parentad76b38ac1bf6547b508e57f12ad85456bd5d4d3
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