From: Josh Boyer Date: Tue, 22 Nov 2016 08:46:15 +0000 (+0000) Subject: UBUNTU: SAUCE: (efi-lockdown) hibernate: Disable when the kernel is locked down X-Git-Tag: Ubuntu-4.13.0-10.11~193 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c3b6c3f19f12e1245ed72fed36ef5e672a51519a;p=mirror_ubuntu-artful-kernel.git UBUNTU: SAUCE: (efi-lockdown) hibernate: Disable when the kernel is locked down There is currently no way to verify the resume image when returning from hibernate. This might compromise the signed modules trust model, so until we can work with signed hibernate images we disable it when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by: David Howells (cherry picked from commit 693ea9dae1c8724abb2d37648ee2ded900de0ceb git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git) Signed-off-by: Seth Forshee --- diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index e1914c7b85b1..7859ba79e181 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -70,7 +70,7 @@ static const struct platform_hibernation_ops *hibernation_ops; bool hibernation_available(void) { - return (nohibernate == 0); + return nohibernate == 0 && !kernel_is_locked_down(); } /**