ea38f2f
From 6c56c15ec618a508b0eca98571780a8b7114cb92 Mon Sep 17 00:00:00 2001
6a91557
From: Josh Boyer <jwboyer@fedoraproject.org>
6a91557
Date: Fri, 20 Jun 2014 08:53:24 -0400
ea38f2f
Subject: [PATCH 14/20] 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
ea38f2f
index b26dbc48c75b..ab187ad3fc61 100644
6a91557
--- a/kernel/power/hibernate.c
6a91557
+++ b/kernel/power/hibernate.c
208228c
@@ -29,6 +29,7 @@
6a91557
 #include <linux/ctype.h>
6a91557
 #include <linux/genhd.h>
208228c
 #include <linux/ktime.h>
6a91557
+#include <linux/module.h>
6a91557
 #include <trace/events/power.h>
6a91557
 
6a91557
 #include "power.h"
ea38f2f
@@ -67,7 +68,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
 /**
18c8249
-- 
ea38f2f
2.9.3
18c8249