From 6a91557e4cd508858eca5aba5406a9109861d4de Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 20 Aug 2014 13:22:24 -0400 Subject: Patch file cleanup Do a couple things here: - Split the mega-patches into individual patches. Should help with rebasing. - Make all patches 'git am' acceptable. There should be no functional or actual code differences from before --- sb-hibernate.patch | 115 ----------------------------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 sb-hibernate.patch (limited to 'sb-hibernate.patch') diff --git a/sb-hibernate.patch b/sb-hibernate.patch deleted file mode 100644 index 4b1bd1673..000000000 --- a/sb-hibernate.patch +++ /dev/null @@ -1,115 +0,0 @@ -Bugzilla: N/A -Upstream-status: Fedora mustard - -From 9cdffb6980a2c573844b4b87f907da24d68fb916 Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Fri, 26 Oct 2012 14:02:09 -0400 -Subject: [PATCH] hibernate: Disable in a signed modules environment - -There is currently no way to verify the resume image when returning -from hibernate. This might compromise the signed modules trust model, -so until we can work with signed hibernate images we disable it in -a secure modules environment. - -Signed-off-by: Josh Boyer ---- - kernel/power/hibernate.c | 16 +++++++++++++++- - kernel/power/main.c | 7 ++++++- - kernel/power/user.c | 1 + - 3 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c -index 49e0a20fd010..777eff68e8ef 100644 ---- a/kernel/power/hibernate.c -+++ b/kernel/power/hibernate.c -@@ -29,6 +29,8 @@ - #include - #include - #include -+#include -+#include - - #include "power.h" - -@@ -642,6 +644,10 @@ int hibernate(void) - { - int error; - -+ if (secure_modules()) { -+ return -EPERM; -+ } -+ - lock_system_sleep(); - /* The snapshot device should not be opened while we're running */ - if (!atomic_add_unless(&snapshot_device_available, -1, 0)) { -@@ -734,7 +740,7 @@ static int software_resume(void) - /* - * If the user said "noresume".. bail out early. - */ -- if (noresume) -+ if (noresume || secure_modules()) - return 0; - - /* -@@ -900,6 +906,11 @@ static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, - int i; - char *start = buf; - -+ if (efi_enabled(EFI_SECURE_BOOT)) { -+ buf += sprintf(buf, "[%s]\n", "disabled"); -+ return buf-start; -+ } -+ - for (i = HIBERNATION_FIRST; i <= HIBERNATION_MAX; i++) { - if (!hibernation_modes[i]) - continue; -@@ -934,6 +945,9 @@ static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr, - char *p; - int mode = HIBERNATION_INVALID; - -+ if (secure_modules()) -+ return -EPERM; -+ - p = memchr(buf, '\n', n); - len = p ? p - buf : n; - -diff --git a/kernel/power/main.c b/kernel/power/main.c -index 573410d6647e..f5201093adc4 100644 ---- a/kernel/power/main.c -+++ b/kernel/power/main.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - #include "power.h" - -@@ -301,7 +302,11 @@ static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, - - #endif - #ifdef CONFIG_HIBERNATION -- s += sprintf(s, "%s\n", "disk"); -+ if (!efi_enabled(EFI_SECURE_BOOT)) { -+ s += sprintf(s, "%s\n", "disk"); -+ } else { -+ s += sprintf(s, "\n"); -+ } - #else - if (s != buf) - /* convert the last space to a newline */ -diff --git a/kernel/power/user.c b/kernel/power/user.c -index efe99dee9510..5f5d1026f1e2 100644 ---- a/kernel/power/user.c -+++ b/kernel/power/user.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - #include - --- -1.9.3 - -- cgit