Blame SOURCES/0221-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Peter Jones <pjones@redhat.com>
f725e3
Date: Tue, 6 Oct 2015 16:09:25 -0400
f725e3
Subject: [PATCH] Make any of the loaders that link in efi mode honor secure
f725e3
 boot.
f725e3
f725e3
And in this case "honor" means "even if somebody does link this in, they
f725e3
won't register commands if SB is enabled."
f725e3
f725e3
Signed-off-by: Peter Jones <pjones@redhat.com>
f725e3
---
f725e3
 grub-core/Makefile.core.def        |  2 ++
f725e3
 grub-core/commands/iorw.c          |  7 +++++
f725e3
 grub-core/commands/memrw.c         |  7 +++++
f725e3
 grub-core/kern/efi/efi.c           | 28 ------------------
f725e3
 grub-core/kern/efi/sb.c            | 58 ++++++++++++++++++++++++++++++++++++++
f725e3
 grub-core/loader/efi/appleloader.c |  7 +++++
f725e3
 grub-core/loader/efi/chainloader.c |  1 +
f725e3
 grub-core/loader/i386/bsd.c        |  7 +++++
f725e3
 grub-core/loader/i386/linux.c      |  7 +++++
f725e3
 grub-core/loader/i386/pc/linux.c   |  7 +++++
f725e3
 grub-core/loader/multiboot.c       |  7 +++++
f725e3
 grub-core/loader/xnu.c             |  7 +++++
f725e3
 include/grub/efi/efi.h             |  1 -
f725e3
 include/grub/efi/sb.h              | 29 +++++++++++++++++++
f725e3
 include/grub/ia64/linux.h          |  0
f725e3
 include/grub/mips/linux.h          |  0
f725e3
 include/grub/powerpc/linux.h       |  0
f725e3
 include/grub/sparc64/linux.h       |  0
f725e3
 grub-core/Makefile.am              |  1 +
f725e3
 19 files changed, 147 insertions(+), 29 deletions(-)
f725e3
 create mode 100644 grub-core/kern/efi/sb.c
f725e3
 create mode 100644 include/grub/efi/sb.h
f725e3
 create mode 100644 include/grub/ia64/linux.h
f725e3
 create mode 100644 include/grub/mips/linux.h
f725e3
 create mode 100644 include/grub/powerpc/linux.h
f725e3
 create mode 100644 include/grub/sparc64/linux.h
f725e3
f725e3
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
f725e3
index 4fc74393335..b340ceeec7f 100644
f725e3
--- a/grub-core/Makefile.core.def
f725e3
+++ b/grub-core/Makefile.core.def
f725e3
@@ -175,6 +175,8 @@ kernel = {
f725e3
   efi = term/efi/console.c;
f725e3
   efi = lib/envblk.c;
f725e3
 
f725e3
+  common = kern/efi/sb.c;
f725e3
+
f725e3
   x86 = kern/i386/tsc.c;
f725e3
 
f725e3
   i386_efi = kern/i386/efi/init.c;
f725e3
diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
f725e3
index a0c164e54f0..41a7f3f0466 100644
f725e3
--- a/grub-core/commands/iorw.c
f725e3
+++ b/grub-core/commands/iorw.c
f725e3
@@ -23,6 +23,7 @@
f725e3
 #include <grub/env.h>
f725e3
 #include <grub/cpu/io.h>
f725e3
 #include <grub/i18n.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -118,6 +119,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
f725e3
 
f725e3
 GRUB_MOD_INIT(memrw)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_read_byte =
f725e3
     grub_register_extcmd ("inb", grub_cmd_read, 0,
f725e3
 			  N_("PORT"), N_("Read 8-bit value from PORT."),
f725e3
@@ -146,6 +150,9 @@ GRUB_MOD_INIT(memrw)
f725e3
 
f725e3
 GRUB_MOD_FINI(memrw)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_extcmd (cmd_read_byte);
f725e3
   grub_unregister_extcmd (cmd_read_word);
f725e3
   grub_unregister_extcmd (cmd_read_dword);
f725e3
diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c
f725e3
index 98769eadb34..088cbe9e2bc 100644
f725e3
--- a/grub-core/commands/memrw.c
f725e3
+++ b/grub-core/commands/memrw.c
f725e3
@@ -22,6 +22,7 @@
f725e3
 #include <grub/extcmd.h>
f725e3
 #include <grub/env.h>
f725e3
 #include <grub/i18n.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -120,6 +121,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
f725e3
 
f725e3
 GRUB_MOD_INIT(memrw)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_read_byte =
f725e3
     grub_register_extcmd ("read_byte", grub_cmd_read, 0,
f725e3
 			  N_("ADDR"), N_("Read 8-bit value from ADDR."),
f725e3
@@ -148,6 +152,9 @@ GRUB_MOD_INIT(memrw)
f725e3
 
f725e3
 GRUB_MOD_FINI(memrw)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_extcmd (cmd_read_byte);
f725e3
   grub_unregister_extcmd (cmd_read_word);
f725e3
   grub_unregister_extcmd (cmd_read_dword);
f725e3
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
f725e3
index c80d85b677e..7dfe2ef1455 100644
f725e3
--- a/grub-core/kern/efi/efi.c
f725e3
+++ b/grub-core/kern/efi/efi.c
f725e3
@@ -260,34 +260,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
f725e3
   return NULL;
f725e3
 }
f725e3
 
f725e3
-grub_efi_boolean_t
f725e3
-grub_efi_secure_boot (void)
f725e3
-{
f725e3
-  grub_efi_guid_t efi_var_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
f725e3
-  grub_size_t datasize;
f725e3
-  char *secure_boot = NULL;
f725e3
-  char *setup_mode = NULL;
f725e3
-  grub_efi_boolean_t ret = 0;
f725e3
-
f725e3
-  secure_boot = grub_efi_get_variable("SecureBoot", &efi_var_guid, &datasize);
f725e3
-
f725e3
-  if (datasize != 1 || !secure_boot)
f725e3
-    goto out;
f725e3
-
f725e3
-  setup_mode = grub_efi_get_variable("SetupMode", &efi_var_guid, &datasize);
f725e3
-
f725e3
-  if (datasize != 1 || !setup_mode)
f725e3
-    goto out;
f725e3
-
f725e3
-  if (*secure_boot && !*setup_mode)
f725e3
-    ret = 1;
f725e3
-
f725e3
- out:
f725e3
-  grub_free (secure_boot);
f725e3
-  grub_free (setup_mode);
f725e3
-  return ret;
f725e3
-}
f725e3
-
f725e3
 #pragma GCC diagnostic ignored "-Wcast-align"
f725e3
 
f725e3
 /* Search the mods section from the PE32/PE32+ image. This code uses
f725e3
diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c
f725e3
new file mode 100644
f725e3
index 00000000000..a41b6c5b851
f725e3
--- /dev/null
f725e3
+++ b/grub-core/kern/efi/sb.c
f725e3
@@ -0,0 +1,58 @@
f725e3
+/*
f725e3
+ *  GRUB  --  GRand Unified Bootloader
f725e3
+ *  Copyright (C) 2014 Free Software Foundation, Inc.
f725e3
+ *
f725e3
+ *  GRUB is free software: you can redistribute it and/or modify
f725e3
+ *  it under the terms of the GNU General Public License as published by
f725e3
+ *  the Free Software Foundation, either version 3 of the License, or
f725e3
+ *  (at your option) any later version.
f725e3
+ *
f725e3
+ *  GRUB is distributed in the hope that it will be useful,
f725e3
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f725e3
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f725e3
+ *  GNU General Public License for more details.
f725e3
+ *
f725e3
+ *  You should have received a copy of the GNU General Public License
f725e3
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f725e3
+ */
f725e3
+
f725e3
+#include <grub/err.h>
f725e3
+#include <grub/mm.h>
f725e3
+#include <grub/types.h>
f725e3
+#include <grub/cpu/linux.h>
f725e3
+#include <grub/efi/efi.h>
f725e3
+#include <grub/efi/pe32.h>
f725e3
+#include <grub/efi/linux.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
+
f725e3
+int
f725e3
+grub_efi_secure_boot (void)
f725e3
+{
f725e3
+#ifdef GRUB_MACHINE_EFI
f725e3
+  grub_efi_guid_t efi_var_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
f725e3
+  grub_size_t datasize;
f725e3
+  char *secure_boot = NULL;
f725e3
+  char *setup_mode = NULL;
f725e3
+  grub_efi_boolean_t ret = 0;
f725e3
+
f725e3
+  secure_boot = grub_efi_get_variable("SecureBoot", &efi_var_guid, &datasize);
f725e3
+
f725e3
+  if (datasize != 1 || !secure_boot)
f725e3
+    goto out;
f725e3
+
f725e3
+  setup_mode = grub_efi_get_variable("SetupMode", &efi_var_guid, &datasize);
f725e3
+
f725e3
+  if (datasize != 1 || !setup_mode)
f725e3
+    goto out;
f725e3
+
f725e3
+  if (*secure_boot && !*setup_mode)
f725e3
+    ret = 1;
f725e3
+
f725e3
+ out:
f725e3
+  grub_free (secure_boot);
f725e3
+  grub_free (setup_mode);
f725e3
+  return ret;
f725e3
+#else
f725e3
+  return 0;
f725e3
+#endif
f725e3
+}
f725e3
diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
f725e3
index 74888c463ba..69c2a10d351 100644
f725e3
--- a/grub-core/loader/efi/appleloader.c
f725e3
+++ b/grub-core/loader/efi/appleloader.c
f725e3
@@ -24,6 +24,7 @@
f725e3
 #include <grub/misc.h>
f725e3
 #include <grub/efi/api.h>
f725e3
 #include <grub/efi/efi.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 #include <grub/command.h>
f725e3
 #include <grub/i18n.h>
f725e3
 
f725e3
@@ -227,6 +228,9 @@ static grub_command_t cmd;
f725e3
 
f725e3
 GRUB_MOD_INIT(appleloader)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd = grub_register_command ("appleloader", grub_cmd_appleloader,
f725e3
 			       N_("[OPTS]"),
f725e3
 			       /* TRANSLATORS: This command is used on EFI to
f725e3
@@ -238,5 +242,8 @@ GRUB_MOD_INIT(appleloader)
f725e3
 
f725e3
 GRUB_MOD_FINI(appleloader)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_command (cmd);
f725e3
 }
f725e3
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
f725e3
index 87a91e16f17..aee8e6becf6 100644
f725e3
--- a/grub-core/loader/efi/chainloader.c
f725e3
+++ b/grub-core/loader/efi/chainloader.c
f725e3
@@ -34,6 +34,7 @@
f725e3
 #include <grub/efi/disk.h>
f725e3
 #include <grub/efi/pe32.h>
f725e3
 #include <grub/efi/linux.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 #include <grub/command.h>
f725e3
 #include <grub/i18n.h>
f725e3
 #include <grub/net.h>
f725e3
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
f725e3
index 8f691e0e2d1..b671f59b62a 100644
f725e3
--- a/grub-core/loader/i386/bsd.c
f725e3
+++ b/grub-core/loader/i386/bsd.c
f725e3
@@ -38,6 +38,7 @@
f725e3
 #ifdef GRUB_MACHINE_PCBIOS
f725e3
 #include <grub/machine/int.h>
f725e3
 #endif
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -2111,6 +2112,9 @@ static grub_command_t cmd_netbsd_module_elf, cmd_openbsd_ramdisk;
f725e3
 
f725e3
 GRUB_MOD_INIT (bsd)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   /* Net and OpenBSD kernels are often compressed.  */
f725e3
   grub_dl_load ("gzio");
f725e3
 
f725e3
@@ -2150,6 +2154,9 @@ GRUB_MOD_INIT (bsd)
f725e3
 
f725e3
 GRUB_MOD_FINI (bsd)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_extcmd (cmd_freebsd);
f725e3
   grub_unregister_extcmd (cmd_openbsd);
f725e3
   grub_unregister_extcmd (cmd_netbsd);
f725e3
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
f725e3
index 2ae176315b6..bd37c69b5d0 100644
f725e3
--- a/grub-core/loader/i386/linux.c
f725e3
+++ b/grub-core/loader/i386/linux.c
f725e3
@@ -35,6 +35,7 @@
f725e3
 #include <grub/i18n.h>
f725e3
 #include <grub/lib/cmdline.h>
f725e3
 #include <grub/linux.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -1137,6 +1138,9 @@ static grub_command_t cmd_linux, cmd_initrd;
f725e3
 
f725e3
 GRUB_MOD_INIT(linux)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_linux = grub_register_command ("linux", grub_cmd_linux,
f725e3
 				     0, N_("Load Linux."));
f725e3
   cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
f725e3
@@ -1146,6 +1150,9 @@ GRUB_MOD_INIT(linux)
f725e3
 
f725e3
 GRUB_MOD_FINI(linux)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_command (cmd_linux);
f725e3
   grub_unregister_command (cmd_initrd);
f725e3
 }
f725e3
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
f725e3
index b481e466846..b19527e8e17 100644
f725e3
--- a/grub-core/loader/i386/pc/linux.c
f725e3
+++ b/grub-core/loader/i386/pc/linux.c
f725e3
@@ -35,6 +35,7 @@
f725e3
 #include <grub/i386/floppy.h>
f725e3
 #include <grub/lib/cmdline.h>
f725e3
 #include <grub/linux.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -469,6 +470,9 @@ static grub_command_t cmd_linux, cmd_initrd;
f725e3
 
f725e3
 GRUB_MOD_INIT(linux16)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_linux =
f725e3
     grub_register_command ("linux16", grub_cmd_linux,
f725e3
 			   0, N_("Load Linux."));
f725e3
@@ -480,6 +484,9 @@ GRUB_MOD_INIT(linux16)
f725e3
 
f725e3
 GRUB_MOD_FINI(linux16)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_command (cmd_linux);
f725e3
   grub_unregister_command (cmd_initrd);
f725e3
 }
f725e3
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
f725e3
index 4b71f336353..e4e696e8f89 100644
f725e3
--- a/grub-core/loader/multiboot.c
f725e3
+++ b/grub-core/loader/multiboot.c
f725e3
@@ -42,6 +42,7 @@
f725e3
 #include <grub/video.h>
f725e3
 #include <grub/memory.h>
f725e3
 #include <grub/i18n.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -383,6 +384,9 @@ static grub_command_t cmd_multiboot, cmd_module;
f725e3
 
f725e3
 GRUB_MOD_INIT(multiboot)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_multiboot =
f725e3
 #ifdef GRUB_USE_MULTIBOOT2
f725e3
     grub_register_command ("multiboot2", grub_cmd_multiboot,
f725e3
@@ -403,6 +407,9 @@ GRUB_MOD_INIT(multiboot)
f725e3
 
f725e3
 GRUB_MOD_FINI(multiboot)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   grub_unregister_command (cmd_multiboot);
f725e3
   grub_unregister_command (cmd_module);
f725e3
 }
f725e3
diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
f725e3
index cdd9715cedd..faffccc9744 100644
f725e3
--- a/grub-core/loader/xnu.c
f725e3
+++ b/grub-core/loader/xnu.c
f725e3
@@ -33,6 +33,7 @@
f725e3
 #include <grub/extcmd.h>
f725e3
 #include <grub/env.h>
f725e3
 #include <grub/i18n.h>
f725e3
+#include <grub/efi/sb.h>
f725e3
 
f725e3
 GRUB_MOD_LICENSE ("GPLv3+");
f725e3
 
f725e3
@@ -1466,6 +1467,9 @@ static grub_extcmd_t cmd_splash;
f725e3
 
f725e3
 GRUB_MOD_INIT(xnu)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
   cmd_kernel = grub_register_command ("xnu_kernel", grub_cmd_xnu_kernel, 0,
f725e3
 				      N_("Load XNU image."));
f725e3
   cmd_kernel64 = grub_register_command ("xnu_kernel64", grub_cmd_xnu_kernel64,
f725e3
@@ -1506,6 +1510,9 @@ GRUB_MOD_INIT(xnu)
f725e3
 
f725e3
 GRUB_MOD_FINI(xnu)
f725e3
 {
f725e3
+  if (grub_efi_secure_boot())
f725e3
+    return;
f725e3
+
f725e3
 #ifndef GRUB_MACHINE_EMU
f725e3
   grub_unregister_command (cmd_resume);
f725e3
 #endif
f725e3
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
f725e3
index 22456327e13..9a2da0eb38d 100644
f725e3
--- a/include/grub/efi/efi.h
f725e3
+++ b/include/grub/efi/efi.h
f725e3
@@ -76,7 +76,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
f725e3
 				     const grub_efi_guid_t *guid,
f725e3
 				     void *data,
f725e3
 				     grub_size_t datasize);
f725e3
-grub_efi_boolean_t EXPORT_FUNC (grub_efi_secure_boot) (void);
f725e3
 int
f725e3
 EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
f725e3
 					     const grub_efi_device_path_t *dp2);
f725e3
diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h
f725e3
new file mode 100644
f725e3
index 00000000000..9629fbb0f9e
f725e3
--- /dev/null
f725e3
+++ b/include/grub/efi/sb.h
f725e3
@@ -0,0 +1,29 @@
f725e3
+/* sb.h - declare functions for EFI Secure Boot support */
f725e3
+/*
f725e3
+ *  GRUB  --  GRand Unified Bootloader
f725e3
+ *  Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
f725e3
+ *
f725e3
+ *  GRUB is free software: you can redistribute it and/or modify
f725e3
+ *  it under the terms of the GNU General Public License as published by
f725e3
+ *  the Free Software Foundation, either version 3 of the License, or
f725e3
+ *  (at your option) any later version.
f725e3
+ *
f725e3
+ *  GRUB is distributed in the hope that it will be useful,
f725e3
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f725e3
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f725e3
+ *  GNU General Public License for more details.
f725e3
+ *
f725e3
+ *  You should have received a copy of the GNU General Public License
f725e3
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f725e3
+ */
f725e3
+
f725e3
+#ifndef GRUB_EFI_SB_HEADER
f725e3
+#define GRUB_EFI_SB_HEADER	1
f725e3
+
f725e3
+#include <grub/types.h>
f725e3
+#include <grub/dl.h>
f725e3
+
f725e3
+/* Functions.  */
f725e3
+int EXPORT_FUNC (grub_efi_secure_boot) (void);
f725e3
+
f725e3
+#endif /* ! GRUB_EFI_SB_HEADER */
f725e3
diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h
f725e3
new file mode 100644
f725e3
index 00000000000..e69de29bb2d
f725e3
diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h
f725e3
new file mode 100644
f725e3
index 00000000000..e69de29bb2d
f725e3
diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h
f725e3
new file mode 100644
f725e3
index 00000000000..e69de29bb2d
f725e3
diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h
f725e3
new file mode 100644
f725e3
index 00000000000..e69de29bb2d
f725e3
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
f725e3
index cb7fd9f98e8..be29e327f77 100644
f725e3
--- a/grub-core/Makefile.am
f725e3
+++ b/grub-core/Makefile.am
f725e3
@@ -67,6 +67,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
f725e3
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/sb.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
f725e3
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h