nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0342-verifiers-ARM-Xen-fallout-cleanup.patch

3efed6
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
3efed6
From: Daniel Kiper <daniel.kiper@oracle.com>
3efed6
Date: Thu, 6 Dec 2018 13:43:05 +0100
3efed6
Subject: [PATCH] verifiers: ARM Xen fallout cleanup
3efed6
3efed6
ARM Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for
3efed6
fine-grained signature-verification controlling).
3efed6
3efed6
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
3efed6
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
3efed6
[javierm: remove grub_file_filter_disable_compression() call leftovers]
3efed6
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3efed6
3efed6
Conflicts:
3efed6
	grub-core/loader/arm64/xen_boot.c
3efed6
---
3efed6
 grub-core/loader/arm64/xen_boot.c | 9 +++++----
3efed6
 include/grub/file.h               | 5 +++++
3efed6
 2 files changed, 10 insertions(+), 4 deletions(-)
3efed6
3efed6
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
b71686
index f35b16caa..318c833de 100644
3efed6
--- a/grub-core/loader/arm64/xen_boot.c
3efed6
+++ b/grub-core/loader/arm64/xen_boot.c
3efed6
@@ -427,9 +427,10 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
3efed6
 
3efed6
   grub_dprintf ("xen_loader", "Init module and node info\n");
3efed6
 
3efed6
-  if (nounzip)
3efed6
-    grub_file_filter_disable_compression ();
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_XEN_MODULE
3efed6
+                        | (nounzip ? GRUB_FILE_TYPE_NO_DECOMPRESS
3efed6
+                           : GRUB_FILE_TYPE_NONE));
3efed6
+
3efed6
   if (!file)
3efed6
     goto fail;
3efed6
 
3efed6
@@ -461,7 +462,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)),
3efed6
       goto fail;
3efed6
     }
3efed6
 
3efed6
-  file = grub_file_open (argv[0]);
3efed6
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_XEN_HYPERVISOR);
3efed6
   if (!file)
3efed6
     goto fail;
3efed6
 
3efed6
diff --git a/include/grub/file.h b/include/grub/file.h
b71686
index 9aae46355..cbbd29465 100644
3efed6
--- a/include/grub/file.h
3efed6
+++ b/include/grub/file.h
3efed6
@@ -42,6 +42,11 @@ enum grub_file_type
3efed6
     /* Multiboot module.  */
3efed6
     GRUB_FILE_TYPE_MULTIBOOT_MODULE,
3efed6
 
3efed6
+    /* Xen hypervisor - used on ARM only. */
3efed6
+    GRUB_FILE_TYPE_XEN_HYPERVISOR,
3efed6
+    /* Xen module - used on ARM only. */
3efed6
+    GRUB_FILE_TYPE_XEN_MODULE,
3efed6
+
3efed6
     GRUB_FILE_TYPE_BSD_KERNEL,
3efed6
     GRUB_FILE_TYPE_FREEBSD_ENV,
3efed6
     GRUB_FILE_TYPE_FREEBSD_MODULE,