dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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