7c20258
From 144f2c697978d0fd083df96ceaa387d11c9fc7e0 Mon Sep 17 00:00:00 2001
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
6a91557
index a9dfa79b6bab..14c7356ff53a 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