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