18c8249
From 51abecb00c48941cc3db19701cc73e65082924bb Mon Sep 17 00:00:00 2001
6a91557
From: Josh Boyer <jwboyer@fedoraproject.org>
6a91557
Date: Fri, 20 Jun 2014 08:53:24 -0400
18c8249
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
088a50c
index 690f78f210f2..037303a1cba9 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"
208228c
@@ -66,7 +67,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
-- 
18c8249
2.4.3
18c8249