summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2017-08-07 17:43:08 -0400
committerMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2017-08-07 17:43:08 -0400
commit5ca483b97b9d1c1373fd17346dbf207c18455019 (patch)
tree1fb0a93cc04aec36ffe64689027f72ea5f90a399
parent5d42729fe393fc11b20730b86aac7f4f861ca68e (diff)
downloadefi-boot-shim-5ca483b97b9d1c1373fd17346dbf207c18455019.tar.gz
efi-boot-shim-5ca483b97b9d1c1373fd17346dbf207c18455019.zip
debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch: dropped, included upstream.
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch71
-rw-r--r--debian/patches/series1
3 files changed, 2 insertions, 72 deletions
diff --git a/debian/changelog b/debian/changelog
index 147cdbc3..9ee00d3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ shim (12+1501864225.b586175-0) UNRELEASED; urgency=medium
makes it possible to build a shim for other architectures than amd64.
* debian/patches/second-stage-path: dropped.
* debian/patches/sbsigntool-no-pesign: refreshed.
+ * debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch: dropped,
+ included upstream.
-- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Fri, 04 Aug 2017 12:33:22 -0400
diff --git a/debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch b/debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch
deleted file mode 100644
index 61117d80..00000000
--- a/debian/patches/0001-shim-fix-the-mirroring-MokSBState-fail.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 1681bd7282e606e961c0d1bfafcf807a32bc912d Mon Sep 17 00:00:00 2001
-From: Ivan Hu <ivan.hu@canonical.com>
-Date: Tue, 22 Nov 2016 06:26:01 +0800
-Subject: [PATCH] shim: fix the mirroring MokSBState fail
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644806
-
-Some machines have already embedded MokSBStateRT varaible with
-EFI_VARIABLE_NON_VOLATILE attribute, and some users might disable shim
-vailidation manually by creating MokSBStateRT. It causes mirroring MokSBState
-fail because the variable cannot be set with different attribute again, and gets
-error massage every time when booting.
-
-Fix it with checking the MokSBStateRT existence and deleting it before
-mirroring it.
-
-Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
-Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
----
- shim.c | 34 ++++++++++++++++++++++++----------
- 1 file changed, 24 insertions(+), 10 deletions(-)
-
-diff --git a/shim.c b/shim.c
-index c69961b..90ea784 100644
---- a/shim.c
-+++ b/shim.c
-@@ -2013,18 +2013,32 @@ EFI_STATUS mirror_mok_sb_state()
- UINTN DataSize = 0;
-
- efi_status = get_variable(L"MokSBState", &Data, &DataSize, shim_lock_guid);
-- if (efi_status != EFI_SUCCESS)
-- return efi_status;
-+ if (efi_status == EFI_SUCCESS) {
-+ UINT8 *Data_RT = NULL;
-+ UINTN DataSize_RT = 0;
-+
-+ efi_status = get_variable(L"MokSBStateRT", &Data_RT,
-+ &DataSize_RT, shim_lock_guid);
-+ if (efi_status == EFI_SUCCESS) {
-+ efi_status = uefi_call_wrapper(RT->SetVariable, 5,
-+ L"MokSBStateRT",
-+ &shim_lock_guid,
-+ EFI_VARIABLE_BOOTSERVICE_ACCESS
-+ | EFI_VARIABLE_RUNTIME_ACCESS
-+ | EFI_VARIABLE_NON_VOLATILE,
-+ 0, NULL);
-+ }
-
-- efi_status = uefi_call_wrapper(RT->SetVariable, 5, L"MokSBStateRT",
-- &shim_lock_guid,
-- EFI_VARIABLE_BOOTSERVICE_ACCESS
-- | EFI_VARIABLE_RUNTIME_ACCESS,
-- DataSize, Data);
-- if (efi_status != EFI_SUCCESS) {
-- console_error(L"Failed to set MokSBStateRT", efi_status);
-+ efi_status = uefi_call_wrapper(RT->SetVariable, 5,
-+ L"MokSBStateRT",
-+ &shim_lock_guid,
-+ EFI_VARIABLE_BOOTSERVICE_ACCESS
-+ | EFI_VARIABLE_RUNTIME_ACCESS,
-+ DataSize, Data);
-+ if (efi_status != EFI_SUCCESS) {
-+ console_error(L"Failed to set MokSBStateRT", efi_status);
-+ }
- }
--
- return efi_status;
- }
-
---
-2.7.4
-
diff --git a/debian/patches/series b/debian/patches/series
index 20fe73c2..b8e0e105 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
sbsigntool-not-pesign
-0001-shim-fix-the-mirroring-MokSBState-fail.patch