nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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