6a9155
From: Josh Boyer <jwboyer@fedoraproject.org>
6a9155
Date: Fri, 20 Jun 2014 08:53:24 -0400
6a9155
Subject: [PATCH] hibernate: Disable in a signed modules environment
6a9155
6a9155
There is currently no way to verify the resume image when returning
6a9155
from hibernate.  This might compromise the signed modules trust model,
6a9155
so until we can work with signed hibernate images we disable it in
6a9155
a secure modules environment.
6a9155
6a9155
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
6a9155
---
6a9155
 kernel/power/hibernate.c | 3 ++-
6a9155
 1 file changed, 2 insertions(+), 1 deletion(-)
6a9155
6a9155
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
088a50
index 690f78f210f2..037303a1cba9 100644
6a9155
--- a/kernel/power/hibernate.c
6a9155
+++ b/kernel/power/hibernate.c
208228
@@ -29,6 +29,7 @@
6a9155
 #include <linux/ctype.h>
6a9155
 #include <linux/genhd.h>
208228
 #include <linux/ktime.h>
6a9155
+#include <linux/module.h>
6a9155
 #include <trace/events/power.h>
6a9155
 
6a9155
 #include "power.h"
208228
@@ -66,7 +67,7 @@ static const struct platform_hibernation_ops *hibernation_ops;
6a9155
 
6a9155
 bool hibernation_available(void)
6a9155
 {
6a9155
-	return (nohibernate == 0);
6a9155
+	return ((nohibernate == 0) && !secure_modules());
6a9155
 }
6a9155
 
6a9155
 /**