diff -Nru grub2-2.02/debian/changelog grub2-2.02/debian/changelog --- grub2-2.02/debian/changelog 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/changelog 2022-11-15 11:13:43.000000000 +0000 @@ -1,32 +1,10 @@ -grub2 (2.02-2ubuntu8.24~uefi3) bionic; urgency=medium +grub2 (2.02-2ubuntu8.25) bionic; urgency=medium - [ Julian Andres Klode ] - * Backport initrd-less fallback support as pre-requisite for other patches - (in LP: #1901553) - - debian/patches/add-initrd-less-boot-fallback.patch: add initrd-less - capabilities. If a kernel fails to boot without initrd, grub will - fallback to trying to boot the kernel with an initrd. Patch by Chris Glass. - * systemd backports: - - Use absolute path to grub-editenv in debian/grub-common.service below to - make bionic systemd happy. - - Pass --with systemd to dh + [ Colin Watson ] + * Move kernel maintainer script snippets into grub2-common (thanks, + Bastian Blank; closes: #910959) (LP: #1995751) - [ Dimitri John Ledkov ] - * 10_linux: emit messages when initrdless boot is configured, attempted and - fails triggering fallback. LP: #1901553 - * grub-common.service: port init.d script to systemd unit. Add warning - message, when initrdless boot fails triggering fallback. LP: #1901553 - * debian/grub-common.service: change type to oneshot, add wantedby - sleep.target, after sleep.target. The service will now start after resume - from hybernation. (LP: #1929860) - * grub-initrd-fallback.service: add wantedby sleep.target, after - sleep.target. The service will now start after resume from hybernation. - LP: #1929860 - * grub-initrd-fallback.service, debian/grub-common.service: only start units - when booted with grub. Use presence of /boot/grub/grub.cfg as proxy. - LP: #1925507 - - -- Julian Andres Klode Tue, 05 Oct 2021 15:08:40 +0200 + -- Julian Andres Klode Tue, 15 Nov 2022 12:13:43 +0100 grub2 (2.02-2ubuntu8.23) bionic; urgency=medium diff -Nru grub2-2.02/debian/control grub2-2.02/debian/control --- grub2-2.02/debian/control 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/control 2022-11-15 11:13:43.000000000 +0000 @@ -91,9 +91,9 @@ # of the package is not very useful in a utilities-only build. Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-ppc64el any-sparc any-sparc64 any-mipsel any-ia64 any-arm any-arm64 Depends: grub-common (= ${binary:Version}), dpkg (>= 1.15.4) | install-info, ${shlibs:Depends}, ${misc:Depends} -Replaces: grub, grub-legacy, ${legacy-doc-br}, grub-common (<< 1.99-1), grub-pc (<< 2.00-4), grub-ieee1275 (<< 2.00-4), grub-efi (<< 1.99-1), grub-coreboot (<< 2.00-4), grub-linuxbios (<< 1.99-1), grub-efi-ia32 (<< 2.00-4), grub-efi-amd64 (<< 2.00-4), grub-efi-ia64 (<< 2.00-4), grub-yeeloong (<< 2.00-4) +Replaces: grub, grub-legacy, ${legacy-doc-br}, grub-common (<< 1.99-1), grub-pc (<< 2.02-2ubuntu8.25), grub-coreboot (<< 2.02-2ubuntu8.25), grub-efi-ia32 (<< 2.02-2ubuntu8.25), grub-efi-amd64 (<< 2.04-1ubuntu47.4), grub-efi-ia64 (<< 2.02-2ubuntu8.25), grub-efi-arm (<< 2.02-2ubuntu8.25), grub-efi-arm64 (<< 2.04-1ubuntu47.4), grub-ieee1275 (<< 2.02-2ubuntu8.25), grub-uboot (<< 2.02-2ubuntu8.25), grub-xen (<< 2.02-2ubuntu8.25), grub-yeeloong (<< 2.02-2ubuntu8.25) Conflicts: grub-legacy -Breaks: grub (<< 0.97-54), ${legacy-doc-br}, shim (<< 13) +Breaks: grub (<< 0.97-54), ${legacy-doc-br}, shim (<< 13), grub-pc (<< 2.02-2ubuntu8.25), grub-coreboot (<< 2.02-2ubuntu8.25), grub-efi-ia32 (<< 2.02-2ubuntu8.25), grub-efi-amd64 (<< 2.04-1ubuntu47.4), grub-efi-ia64 (<< 2.02-2ubuntu8.25), grub-efi-arm (<< 2.02-2ubuntu8.25), grub-efi-arm64 (<< 2.04-1ubuntu47.4), grub-ieee1275 (<< 2.02-2ubuntu8.25), grub-uboot (<< 2.02-2ubuntu8.25), grub-xen (<< 2.02-2ubuntu8.25), grub-yeeloong (<< 2.02-2ubuntu8.25) Multi-Arch: foreign Description: GRand Unified Bootloader (common files for version 2) This package contains common files shared by the distinct flavours of GRUB. diff -Nru grub2-2.02/debian/grub2-common.install grub2-2.02/debian/grub2-common.install --- grub2-2.02/debian/grub2-common.install 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/grub2-common.install 2022-11-15 11:13:43.000000000 +0000 @@ -1,5 +1,7 @@ ../../debian/default usr/share/grub ../../debian/update-grub usr/sbin +../../debian/kernel/zz-update-grub etc/kernel/postinst.d +../../debian/kernel/zz-update-grub etc/kernel/postrm.d usr/sbin/grub-install usr/sbin/grub-reboot diff -Nru grub2-2.02/debian/grub-common.service grub2-2.02/debian/grub-common.service --- grub2-2.02/debian/grub-common.service 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/grub-common.service 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -[Unit] -Description=Record successful boot for GRUB -After=sleep.target -ConditionPathExists=/boot/grub/grub.cfg - -[Service] -Type=oneshot -Restart=no -ExecStartPre=/bin/sh -c '[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub' -ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset recordfail -ExecStartPost=/bin/sh -c 'if grub-editenv /boot/grub/grubenv list | grep -q initrdless_boot_fallback_triggered=1; then echo "grub: GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered."; fi' -StandardOutput=kmsg - -[Install] -WantedBy=multi-user.target sleep.target diff -Nru grub2-2.02/debian/install.in grub2-2.02/debian/install.in --- grub2-2.02/debian/install.in 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/install.in 2022-11-15 11:13:43.000000000 +0000 @@ -1,2 +0,0 @@ -../../debian/kernel/zz-update-grub etc/kernel/postinst.d -../../debian/kernel/zz-update-grub etc/kernel/postrm.d diff -Nru grub2-2.02/debian/patches/0001-fdt-Move-prop_entry_size-to-fdt.h.patch grub2-2.02/debian/patches/0001-fdt-Move-prop_entry_size-to-fdt.h.patch --- grub2-2.02/debian/patches/0001-fdt-Move-prop_entry_size-to-fdt.h.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0001-fdt-Move-prop_entry_size-to-fdt.h.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From e93fd6b776a7e6cef36c445d00436e5a23cfeba5 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 11 Jun 2018 17:24:58 +0100 Subject: [PATCH] fdt: Move prop_entry_size to fdt.h @@ -12,15 +13,11 @@ Bug-Ubuntu: https://bugs.launchpad.net/bugs/1851190 Last-Update: 2019-11-04 Applied-Upstream: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=e93fd6b776a7e6cef36c445d00436e5a23cfeba5 ---- - grub-core/lib/fdt.c | 25 ++++++++++--------------- - include/grub/fdt.h | 5 +++++ - 2 files changed, 15 insertions(+), 15 deletions(-) -diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c -index b5d520f..5a7de88 100644 ---- a/grub-core/lib/fdt.c -+++ b/grub-core/lib/fdt.c +Index: grub2-2.02/grub-core/lib/fdt.c +=================================================================== +--- grub2-2.02.orig/grub-core/lib/fdt.c ++++ grub2-2.02/grub-core/lib/fdt.c @@ -41,11 +41,6 @@ GRUB_MOD_LICENSE ("GPLv3+"); (2 * sizeof(grub_uint32_t) \ + ALIGN_UP (grub_strlen (name) + 1, sizeof(grub_uint32_t))) @@ -33,7 +30,7 @@ #define SKIP_NODE_NAME(name, token, end) \ name = (char *) ((token) + 1); \ while (name < (char *) end) \ -@@ -86,7 +81,7 @@ static grub_uint32_t *get_next_node (const void *fdt, char *node_name) +@@ -86,7 +81,7 @@ static grub_uint32_t *get_next_node (con case FDT_PROP: /* Skip property token and following data (len, nameoff and property value). */ @@ -42,7 +39,7 @@ / sizeof(*token); break; case FDT_NOP: -@@ -150,7 +145,7 @@ static int add_subnode (void *fdt, int parentoffset, const char *name) +@@ -150,7 +145,7 @@ static int add_subnode (void *fdt, int p { case FDT_PROP: /* Skip len, nameoff and property value. */ @@ -51,7 +48,7 @@ / sizeof(*token); break; case FDT_BEGIN_NODE: -@@ -249,12 +244,12 @@ static grub_uint32_t *find_prop (void *fdt, unsigned int nodeoffset, +@@ -249,12 +244,12 @@ static grub_uint32_t *find_prop (void *f && !grub_strcmp (name, (char *) fdt + grub_fdt_get_off_dt_strings (fdt) + nameoff)) { @@ -66,7 +63,7 @@ } else if (grub_be_to_cpu32(*prop) == FDT_NOP) prop++; -@@ -330,7 +325,7 @@ int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset, +@@ -330,7 +325,7 @@ int grub_fdt_find_subnode (const void *f value). */ if (token >= end - 1) return -1; @@ -75,7 +72,7 @@ / sizeof(*token); break; case FDT_NOP: -@@ -396,12 +391,12 @@ int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name, +@@ -396,12 +391,12 @@ int grub_fdt_set_prop (void *fdt, unsign unsigned int needed_space = 0; if (!prop) @@ -90,7 +87,7 @@ return -1; } if (!prop_name_present) { -@@ -418,10 +413,10 @@ int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name, +@@ -418,10 +413,10 @@ int grub_fdt_set_prop (void *fdt, unsign + sizeof(grub_uint32_t)); prop = (void *) (node_name + ALIGN_UP(grub_strlen(node_name) + 1, 4)); @@ -103,7 +100,7 @@ *prop = grub_cpu_to_be32_compile_time (FDT_PROP); *(prop + 2) = grub_cpu_to_be32 (nameoff); } -@@ -429,7 +424,7 @@ int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name, +@@ -429,7 +424,7 @@ int grub_fdt_set_prop (void *fdt, unsign /* Insert padding bytes at the end of the value; if they are not needed, they will be overwritten by the following memcpy. */ @@ -112,10 +109,10 @@ grub_memcpy (prop + 3, val, len); return 0; -diff --git a/include/grub/fdt.h b/include/grub/fdt.h -index fdfca75..70ffac1 100644 ---- a/include/grub/fdt.h -+++ b/include/grub/fdt.h +Index: grub2-2.02/include/grub/fdt.h +=================================================================== +--- grub2-2.02.orig/include/grub/fdt.h ++++ grub2-2.02/include/grub/fdt.h @@ -49,6 +49,11 @@ struct grub_fdt_empty_tree { #define GRUB_FDT_EMPTY_TREE_SZ sizeof (struct grub_fdt_empty_tree) diff -Nru grub2-2.02/debian/patches/0001-i386-linux-Add-support-for-ext_lfb_base.patch grub2-2.02/debian/patches/0001-i386-linux-Add-support-for-ext_lfb_base.patch --- grub2-2.02/debian/patches/0001-i386-linux-Add-support-for-ext_lfb_base.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0001-i386-linux-Add-support-for-ext_lfb_base.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 886edba8770ccbc3def0af2a7d6b346d00d0af2f Mon Sep 17 00:00:00 2001 From: Arindam Nath Date: Thu, 12 Jul 2018 19:02:49 +0530 Subject: i386/linux: Add support for ext_lfb_base @@ -25,11 +26,11 @@ include/grub/i386/linux.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) -diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index ae0be0f..10314be 100644 ---- a/grub-core/loader/i386/linux.c -+++ b/grub-core/loader/i386/linux.c -@@ -309,6 +309,12 @@ grub_linux_setup_video (struct linux_kernel_params *params) +Index: grub2-2.02/grub-core/loader/i386/linux.c +=================================================================== +--- grub2-2.02.orig/grub-core/loader/i386/linux.c ++++ grub2-2.02/grub-core/loader/i386/linux.c +@@ -309,6 +309,12 @@ grub_linux_setup_video (struct linux_ker params->lfb_line_len = mode_info.pitch; params->lfb_base = (grub_size_t) framebuffer; @@ -42,10 +43,10 @@ params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536); params->red_mask_size = mode_info.red_mask_size; -diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h -index 110ecf8..3c96aad 100644 ---- a/include/grub/i386/linux.h -+++ b/include/grub/i386/linux.h +Index: grub2-2.02/include/grub/i386/linux.h +=================================================================== +--- grub2-2.02.orig/include/grub/i386/linux.h ++++ grub2-2.02/include/grub/i386/linux.h @@ -43,6 +43,9 @@ #define GRUB_LINUX_CL_MAGIC 0xA33F diff -Nru grub2-2.02/debian/patches/0002-efi-fdt-Set-address-size-cells-to-2-for-empty-tree.patch grub2-2.02/debian/patches/0002-efi-fdt-Set-address-size-cells-to-2-for-empty-tree.patch --- grub2-2.02/debian/patches/0002-efi-fdt-Set-address-size-cells-to-2-for-empty-tree.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0002-efi-fdt-Set-address-size-cells-to-2-for-empty-tree.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 347210a5d5ce655b95315f320faa515afb723c11 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 11 Jun 2018 17:24:59 +0100 Subject: [PATCH] efi/fdt: Set address/size cells to 2 for empty tree @@ -22,14 +23,11 @@ Bug-Ubuntu: https://bugs.launchpad.net/bugs/1851190 Last-Update: 2019-11-04 Applied-Upstream: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=347210a5d5ce655b95315f320faa515afb723c11 ---- - grub-core/loader/efi/fdt.c | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c -index 3266f65..3649852 100644 ---- a/grub-core/loader/efi/fdt.c -+++ b/grub-core/loader/efi/fdt.c + +Index: grub2-2.02/grub-core/loader/efi/fdt.c +=================================================================== +--- grub2-2.02.orig/grub-core/loader/efi/fdt.c ++++ grub2-2.02/grub-core/loader/efi/fdt.c @@ -28,6 +28,12 @@ static void *loaded_fdt; static void *fdt; @@ -43,7 +41,7 @@ void * grub_fdt_load (grub_size_t additional_size) { -@@ -45,8 +51,11 @@ grub_fdt_load (grub_size_t additional_size) +@@ -45,8 +51,11 @@ grub_fdt_load (grub_size_t additional_si else raw_fdt = grub_efi_get_firmware_fdt(); @@ -57,7 +55,7 @@ size += additional_size; grub_dprintf ("linux", "allocating %ld bytes for fdt\n", size); -@@ -62,6 +71,8 @@ grub_fdt_load (grub_size_t additional_size) +@@ -62,6 +71,8 @@ grub_fdt_load (grub_size_t additional_si else { grub_fdt_create_empty_tree (fdt, size); diff -Nru grub2-2.02/debian/patches/0082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch grub2-2.02/debian/patches/0082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch --- grub2-2.02/debian/patches/0082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0082-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 6d5cd112c65caf7c46518a79a27fe7930ec4714e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 15 Apr 2020 15:45:02 -0400 Subject: yylex: Make lexer fatal errors actually be fatal @@ -46,7 +47,7 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l -index 7b44c37..b7203c8 100644 +index 7b44c37b7..b7203c823 100644 --- a/grub-core/script/yylex.l +++ b/grub-core/script/yylex.l @@ -37,11 +37,11 @@ diff -Nru grub2-2.02/debian/patches/0083-safemath-Add-some-arithmetic-primitives-that-check-f.patch grub2-2.02/debian/patches/0083-safemath-Add-some-arithmetic-primitives-that-check-f.patch --- grub2-2.02/debian/patches/0083-safemath-Add-some-arithmetic-primitives-that-check-f.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0083-safemath-Add-some-arithmetic-primitives-that-check-f.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 79fe92c7e4ae4b6fd13a3db8f1a2ae7729e0e265 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 15 Jun 2020 10:58:42 -0400 Subject: safemath: Add some arithmetic primitives that check for overflow @@ -24,7 +25,7 @@ create mode 100644 include/grub/safemath.h diff --git a/INSTALL b/INSTALL -index f3c20ed..f8bd911 100644 +index 342c158e9..991479b52 100644 --- a/INSTALL +++ b/INSTALL @@ -11,27 +11,9 @@ GRUB depends on some software packages installed into your system. If @@ -58,7 +59,7 @@ * GNU Bison 2.3 or later * GNU gettext 0.17 or later diff --git a/include/grub/compiler.h b/include/grub/compiler.h -index c9e1d7a..8f3be3a 100644 +index c9e1d7a73..8f3be3ae7 100644 --- a/include/grub/compiler.h +++ b/include/grub/compiler.h @@ -48,4 +48,12 @@ @@ -76,7 +77,7 @@ #endif /* ! GRUB_COMPILER_HEADER */ diff --git a/include/grub/safemath.h b/include/grub/safemath.h new file mode 100644 -index 0000000..c17b89b +index 000000000..c17b89bba --- /dev/null +++ b/include/grub/safemath.h @@ -0,0 +1,37 @@ diff -Nru grub2-2.02/debian/patches/0084-calloc-Make-sure-we-always-have-an-overflow-checking.patch grub2-2.02/debian/patches/0084-calloc-Make-sure-we-always-have-an-overflow-checking.patch --- grub2-2.02/debian/patches/0084-calloc-Make-sure-we-always-have-an-overflow-checking.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0084-calloc-Make-sure-we-always-have-an-overflow-checking.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 9e7a74bc530afaad40667b397218615fde3e44ef Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 15 Jun 2020 12:15:29 -0400 Subject: calloc: Make sure we always have an overflow-checking calloc() @@ -11,24 +12,23 @@ Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- - grub-core/kern/emu/misc.c | 12 ++++++++++++ - grub-core/kern/emu/mm.c | 10 ++++++++++ - grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++++++++++ - grub-core/lib/libgcrypt_wrap/mem.c | 11 +++++++++-- - grub-core/lib/posix_wrap/stdlib.h | 8 +++++++- + grub-core/kern/emu/misc.c | 12 +++++++++ + grub-core/kern/emu/mm.c | 10 ++++++++ + grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++ + grub-core/lib/libgcrypt_wrap/mem.c | 11 ++++++-- + grub-core/lib/posix_wrap/stdlib.h | 8 +++++- include/grub/emu/misc.h | 1 + - include/grub/mm.h | 6 ++++++ + include/grub/mm.h | 6 +++++ 7 files changed, 85 insertions(+), 3 deletions(-) -diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c -index 7666133..1413a8b 100644 ---- a/grub-core/kern/emu/misc.c -+++ b/grub-core/kern/emu/misc.c -@@ -83,6 +83,18 @@ grub_util_error (const char *fmt, ...) - exit (1); +Index: bionic-security/grub-core/kern/emu/misc.c +=================================================================== +--- bionic-security.orig/grub-core/kern/emu/misc.c ++++ bionic-security/grub-core/kern/emu/misc.c +@@ -84,6 +84,18 @@ grub_util_error (const char *fmt, ...) } -+void * + void * +xcalloc (grub_size_t nmemb, grub_size_t size) +{ + void *p; @@ -40,18 +40,18 @@ + return p; +} + - void * ++void * xmalloc (grub_size_t size) { -diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c -index f262e95..145b01d 100644 ---- a/grub-core/kern/emu/mm.c -+++ b/grub-core/kern/emu/mm.c -@@ -25,6 +25,16 @@ - #include + void *p; +Index: bionic-security/grub-core/kern/emu/mm.c +=================================================================== +--- bionic-security.orig/grub-core/kern/emu/mm.c ++++ bionic-security/grub-core/kern/emu/mm.c +@@ -26,6 +26,16 @@ #include -+void * + void * +grub_calloc (grub_size_t nmemb, grub_size_t size) +{ + void *ret; @@ -61,13 +61,14 @@ + return ret; +} + - void * ++void * grub_malloc (grub_size_t size) { -diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c -index ee88ff6..f2822a8 100644 ---- a/grub-core/kern/mm.c -+++ b/grub-core/kern/mm.c + void *ret; +Index: bionic-security/grub-core/kern/mm.c +=================================================================== +--- bionic-security.orig/grub-core/kern/mm.c ++++ bionic-security/grub-core/kern/mm.c @@ -67,8 +67,10 @@ #include #include @@ -79,7 +80,7 @@ # undef grub_malloc # undef grub_zalloc # undef grub_realloc -@@ -375,6 +377,30 @@ grub_memalign (grub_size_t align, grub_size_t size) +@@ -375,6 +377,30 @@ grub_memalign (grub_size_t align, grub_s return 0; } @@ -110,11 +111,10 @@ /* Allocate SIZE bytes and return the pointer. */ void * grub_malloc (grub_size_t size) -@@ -561,6 +587,20 @@ grub_mm_dump (unsigned lineno) - grub_printf ("\n"); +@@ -562,6 +588,20 @@ grub_mm_dump (unsigned lineno) } -+void * + void * +grub_debug_calloc (const char *file, int line, grub_size_t nmemb, grub_size_t size) +{ + void *ptr; @@ -128,13 +128,14 @@ + return ptr; +} + - void * ++void * grub_debug_malloc (const char *file, int line, grub_size_t size) { -diff --git a/grub-core/lib/libgcrypt_wrap/mem.c b/grub-core/lib/libgcrypt_wrap/mem.c -index beeb661..74c6eaf 100644 ---- a/grub-core/lib/libgcrypt_wrap/mem.c -+++ b/grub-core/lib/libgcrypt_wrap/mem.c + void *ptr; +Index: bionic-security/grub-core/lib/libgcrypt_wrap/mem.c +=================================================================== +--- bionic-security.orig/grub-core/lib/libgcrypt_wrap/mem.c ++++ bionic-security/grub-core/lib/libgcrypt_wrap/mem.c @@ -4,6 +4,7 @@ #include #include @@ -167,10 +168,10 @@ if (!ret) grub_fatal ("gcry_xcalloc failed"); return ret; -diff --git a/grub-core/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h -index 3b46f47..7a8d385 100644 ---- a/grub-core/lib/posix_wrap/stdlib.h -+++ b/grub-core/lib/posix_wrap/stdlib.h +Index: bionic-security/grub-core/lib/posix_wrap/stdlib.h +=================================================================== +--- bionic-security.orig/grub-core/lib/posix_wrap/stdlib.h ++++ bionic-security/grub-core/lib/posix_wrap/stdlib.h @@ -21,6 +21,7 @@ #include @@ -193,11 +194,11 @@ } static inline void * -diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h -index df6085b..fba01f6 100644 ---- a/include/grub/emu/misc.h -+++ b/include/grub/emu/misc.h -@@ -51,6 +51,7 @@ grub_util_device_is_mapped (const char *dev); +Index: bionic-security/include/grub/emu/misc.h +=================================================================== +--- bionic-security.orig/include/grub/emu/misc.h ++++ bionic-security/include/grub/emu/misc.h +@@ -51,6 +51,7 @@ grub_util_device_is_mapped (const char * #define GRUB_HOST_PRIxLONG_LONG "llx" #endif @@ -205,10 +206,10 @@ void * EXPORT_FUNC(xmalloc) (grub_size_t size) WARN_UNUSED_RESULT; void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) WARN_UNUSED_RESULT; char * EXPORT_FUNC(xstrdup) (const char *str) WARN_UNUSED_RESULT; -diff --git a/include/grub/mm.h b/include/grub/mm.h -index 28e2e53..9c38dd3 100644 ---- a/include/grub/mm.h -+++ b/include/grub/mm.h +Index: bionic-security/include/grub/mm.h +=================================================================== +--- bionic-security.orig/include/grub/mm.h ++++ bionic-security/include/grub/mm.h @@ -29,6 +29,7 @@ #endif diff -Nru grub2-2.02/debian/patches/0085-calloc-Use-calloc-at-most-places.patch grub2-2.02/debian/patches/0085-calloc-Use-calloc-at-most-places.patch --- grub2-2.02/debian/patches/0085-calloc-Use-calloc-at-most-places.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0085-calloc-Use-calloc-at-most-places.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 06f4fe53388df99fff7fd23620705901903de8a0 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 15 Jun 2020 12:26:01 -0400 Subject: calloc: Use calloc() at most places @@ -39,9 +40,9 @@ grub-core/efiemu/mm.c | 6 +++--- grub-core/font/font.c | 3 +-- grub-core/fs/affs.c | 6 +++--- - grub-core/fs/btrfs.c | 4 ++-- + grub-core/fs/btrfs.c | 6 +++--- grub-core/fs/hfs.c | 2 +- - grub-core/fs/hfsplus.c | 2 +- + grub-core/fs/hfsplus.c | 6 +++--- grub-core/fs/iso9660.c | 2 +- grub-core/fs/ntfs.c | 4 ++-- grub-core/fs/sfs.c | 2 +- @@ -51,7 +52,7 @@ grub-core/gfxmenu/gui_string_util.c | 2 +- grub-core/gfxmenu/widget-box.c | 4 ++-- grub-core/io/gzio.c | 2 +- - grub-core/kern/efi/efi.c | 4 ++-- + grub-core/kern/efi/efi.c | 6 +++--- grub-core/kern/emu/hostdisk.c | 2 +- grub-core/kern/fs.c | 2 +- grub-core/kern/misc.c | 2 +- @@ -63,7 +64,9 @@ grub-core/lib/priority_queue.c | 2 +- grub-core/lib/reed_solomon.c | 7 +++---- grub-core/lib/relocator.c | 10 +++++----- + grub-core/lib/zstd/fse_decompress.c | 2 +- grub-core/loader/arm/linux.c | 2 +- + grub-core/loader/efi/chainloader.c | 2 +- grub-core/loader/i386/bsdXX.c | 2 +- grub-core/loader/i386/xnu.c | 4 ++-- grub-core/loader/macho.c | 2 +- @@ -100,17 +103,17 @@ util/grub-fstest.c | 4 ++-- util/grub-install-common.c | 2 +- util/grub-install.c | 4 ++-- - util/grub-mkimagexx.c | 4 ++-- + util/grub-mkimagexx.c | 6 ++---- util/grub-mkrescue.c | 4 ++-- util/grub-mkstandalone.c | 2 +- util/grub-pe2elf.c | 12 +++++------- util/grub-probe.c | 4 ++-- - 84 files changed, 170 insertions(+), 167 deletions(-) + 86 files changed, 176 insertions(+), 175 deletions(-) -diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c -index 34a7ff1..a06cce3 100644 ---- a/grub-core/bus/usb/usbhub.c -+++ b/grub-core/bus/usb/usbhub.c +Index: bionic-security/grub-core/bus/usb/usbhub.c +=================================================================== +--- bionic-security.orig/grub-core/bus/usb/usbhub.c ++++ bionic-security/grub-core/bus/usb/usbhub.c @@ -149,8 +149,8 @@ grub_usb_add_hub (grub_usb_device_t dev) grub_usb_set_configuration (dev, 1); @@ -122,7 +125,7 @@ if (!dev->children || !dev->ports) { grub_free (dev->children); -@@ -268,8 +268,8 @@ grub_usb_controller_dev_register_iter (grub_usb_controller_t controller, void *d +@@ -268,8 +268,8 @@ grub_usb_controller_dev_register_iter (g /* Query the number of ports the root Hub has. */ hub->nports = controller->dev->hubports (controller); @@ -133,11 +136,11 @@ if (!hub->devices || !hub->ports) { grub_free (hub->devices); -diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c -index df10302..cd81507 100644 ---- a/grub-core/commands/efi/lsefisystab.c -+++ b/grub-core/commands/efi/lsefisystab.c -@@ -71,7 +71,8 @@ grub_cmd_lsefisystab (struct grub_command *cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/commands/efi/lsefisystab.c +=================================================================== +--- bionic-security.orig/grub-core/commands/efi/lsefisystab.c ++++ bionic-security/grub-core/commands/efi/lsefisystab.c +@@ -71,7 +71,8 @@ grub_cmd_lsefisystab (struct grub_comman grub_printf ("Vendor: "); for (vendor_utf16 = st->firmware_vendor; *vendor_utf16; vendor_utf16++); @@ -147,11 +150,11 @@ if (!vendor) return grub_errno; *grub_utf16_to_utf8 ((grub_uint8_t *) vendor, st->firmware_vendor, -diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c -index b32f3c7..bc7936c 100644 ---- a/grub-core/commands/legacycfg.c -+++ b/grub-core/commands/legacycfg.c -@@ -314,7 +314,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)), +Index: bionic-security/grub-core/commands/legacycfg.c +=================================================================== +--- bionic-security.orig/grub-core/commands/legacycfg.c ++++ bionic-security/grub-core/commands/legacycfg.c +@@ -314,7 +314,7 @@ grub_cmd_legacy_kernel (struct grub_comm if (argc < 2) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); @@ -160,7 +163,7 @@ if (!cutargs) return grub_errno; cutargc = argc - 1; -@@ -436,7 +436,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)), +@@ -436,7 +436,7 @@ grub_cmd_legacy_kernel (struct grub_comm { char rbuf[3] = "-r"; bsdargc = cutargc + 2; @@ -169,7 +172,7 @@ if (!bsdargs) { err = grub_errno; -@@ -559,7 +559,7 @@ grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused +@@ -559,7 +559,7 @@ grub_cmd_legacy_initrdnounzip (struct gr return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"), "module"); @@ -178,11 +181,11 @@ if (!newargs) return grub_errno; grub_memcpy (newargs + 1, args, argc * sizeof (newargs[0])); -diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c -index 58d4dad..16c52ed 100644 ---- a/grub-core/commands/menuentry.c -+++ b/grub-core/commands/menuentry.c -@@ -154,7 +154,7 @@ grub_normal_add_menu_entry (int argc, const char **args, +Index: bionic-security/grub-core/commands/menuentry.c +=================================================================== +--- bionic-security.orig/grub-core/commands/menuentry.c ++++ bionic-security/grub-core/commands/menuentry.c +@@ -154,7 +154,7 @@ grub_normal_add_menu_entry (int argc, co goto fail; /* Save argc, args to pass as parameters to block arg later. */ @@ -191,11 +194,11 @@ if (! menu_args) goto fail; -diff --git a/grub-core/commands/nativedisk.c b/grub-core/commands/nativedisk.c -index 2f56a87..d69214f 100644 ---- a/grub-core/commands/nativedisk.c -+++ b/grub-core/commands/nativedisk.c -@@ -194,7 +194,7 @@ grub_cmd_nativedisk (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/commands/nativedisk.c +=================================================================== +--- bionic-security.orig/grub-core/commands/nativedisk.c ++++ bionic-security/grub-core/commands/nativedisk.c +@@ -194,7 +194,7 @@ grub_cmd_nativedisk (grub_command_t cmd else path_prefix = prefix; @@ -204,11 +207,11 @@ if (!mods) return grub_errno; -diff --git a/grub-core/commands/parttool.c b/grub-core/commands/parttool.c -index 693e2cb..36dadc0 100644 ---- a/grub-core/commands/parttool.c -+++ b/grub-core/commands/parttool.c -@@ -59,7 +59,13 @@ grub_parttool_register(const char *part_name, +Index: bionic-security/grub-core/commands/parttool.c +=================================================================== +--- bionic-security.orig/grub-core/commands/parttool.c ++++ bionic-security/grub-core/commands/parttool.c +@@ -59,7 +59,13 @@ grub_parttool_register(const char *part_ for (nargs = 0; args[nargs].name != 0; nargs++); cur->nargs = nargs; cur->args = (struct grub_parttool_argdesc *) @@ -223,7 +226,7 @@ grub_memcpy (cur->args, args, (nargs + 1) * sizeof (struct grub_parttool_argdesc)); -@@ -257,7 +263,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)), +@@ -257,7 +263,7 @@ grub_cmd_parttool (grub_command_t cmd __ return err; } @@ -232,7 +235,7 @@ for (i = 1; i < argc; i++) if (! parsed[i]) -@@ -290,7 +296,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)), +@@ -290,7 +296,7 @@ grub_cmd_parttool (grub_command_t cmd __ } ptool = cur; pargs = (struct grub_parttool_args *) @@ -241,11 +244,11 @@ for (j = i; j < argc; j++) if (! parsed[j]) { -diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c -index f00b184..4019164 100644 ---- a/grub-core/commands/regexp.c -+++ b/grub-core/commands/regexp.c -@@ -116,7 +116,7 @@ grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args) +Index: bionic-security/grub-core/commands/regexp.c +=================================================================== +--- bionic-security.orig/grub-core/commands/regexp.c ++++ bionic-security/grub-core/commands/regexp.c +@@ -116,7 +116,7 @@ grub_cmd_regexp (grub_extcmd_context_t c if (ret) goto fail; @@ -254,11 +257,11 @@ if (! matches) goto fail; -diff --git a/grub-core/commands/search_wrap.c b/grub-core/commands/search_wrap.c -index d7fd26b..47fc8eb 100644 ---- a/grub-core/commands/search_wrap.c -+++ b/grub-core/commands/search_wrap.c -@@ -122,7 +122,7 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args) +Index: bionic-security/grub-core/commands/search_wrap.c +=================================================================== +--- bionic-security.orig/grub-core/commands/search_wrap.c ++++ bionic-security/grub-core/commands/search_wrap.c +@@ -122,7 +122,7 @@ grub_cmd_search (grub_extcmd_context_t c for (i = 0; state[SEARCH_HINT_BAREMETAL].args[i]; i++) nhints++; @@ -267,11 +270,11 @@ if (!hints) return grub_errno; j = 0; -diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c -index 6f901c0..2be0192 100644 ---- a/grub-core/disk/diskfilter.c -+++ b/grub-core/disk/diskfilter.c -@@ -1134,7 +1134,7 @@ grub_diskfilter_make_raid (grub_size_t uuidlen, char *uuid, int nmemb, +Index: bionic-security/grub-core/disk/diskfilter.c +=================================================================== +--- bionic-security.orig/grub-core/disk/diskfilter.c ++++ bionic-security/grub-core/disk/diskfilter.c +@@ -1134,7 +1134,7 @@ grub_diskfilter_make_raid (grub_size_t u array->lvs->segments->node_count = nmemb; array->lvs->segments->raid_member_size = disk_size; array->lvs->segments->nodes @@ -280,7 +283,7 @@ array->lvs->segments->stripe_size = stripe_size; for (i = 0; i < nmemb; i++) { -@@ -1226,7 +1226,7 @@ insert_array (grub_disk_t disk, const struct grub_diskfilter_pv_id *id, +@@ -1226,7 +1226,7 @@ insert_array (grub_disk_t disk, const st grub_partition_t p; for (p = disk->partition; p; p = p->parent) s++; @@ -289,11 +292,11 @@ s = 0; for (p = disk->partition; p; p = p->parent) pv->partmaps[s++] = xstrdup (p->partmap->name); -diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c -index 235c0fe..d887d4b 100644 ---- a/grub-core/disk/ieee1275/ofdisk.c -+++ b/grub-core/disk/ieee1275/ofdisk.c -@@ -297,7 +297,7 @@ dev_iterate (const struct grub_ieee1275_devalias *alias) +Index: bionic-security/grub-core/disk/ieee1275/ofdisk.c +=================================================================== +--- bionic-security.orig/grub-core/disk/ieee1275/ofdisk.c ++++ bionic-security/grub-core/disk/ieee1275/ofdisk.c +@@ -297,7 +297,7 @@ dev_iterate (const struct grub_ieee1275_ /* Power machines documentation specify 672 as maximum SAS disks in one system. Using a slightly larger value to be safe. */ table_size = 768; @@ -302,10 +305,10 @@ if (!table) { -diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c -index 0f978ad..d3d2009 100644 ---- a/grub-core/disk/ldm.c -+++ b/grub-core/disk/ldm.c +Index: bionic-security/grub-core/disk/ldm.c +=================================================================== +--- bionic-security.orig/grub-core/disk/ldm.c ++++ bionic-security/grub-core/disk/ldm.c @@ -323,8 +323,8 @@ make_vg (grub_disk_t disk, lv->segments->type = GRUB_DISKFILTER_MIRROR; lv->segments->node_count = 0; @@ -339,7 +342,7 @@ if (!lv->segments->nodes) goto fail2; } -@@ -1017,7 +1017,7 @@ grub_util_ldm_embed (struct grub_disk *disk, unsigned int *nsectors, +@@ -1017,7 +1017,7 @@ grub_util_ldm_embed (struct grub_disk *d *nsectors = lv->size; if (*nsectors > max_nsectors) *nsectors = max_nsectors; @@ -348,10 +351,10 @@ if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) -diff --git a/grub-core/disk/luks.c b/grub-core/disk/luks.c -index 86c50c6..18b3a8b 100644 ---- a/grub-core/disk/luks.c -+++ b/grub-core/disk/luks.c +Index: bionic-security/grub-core/disk/luks.c +=================================================================== +--- bionic-security.orig/grub-core/disk/luks.c ++++ bionic-security/grub-core/disk/luks.c @@ -336,7 +336,7 @@ luks_recover_key (grub_disk_t source, && grub_be_to_cpu32 (header.keyblock[i].stripes) > max_stripes) max_stripes = grub_be_to_cpu32 (header.keyblock[i].stripes); @@ -361,10 +364,10 @@ if (!split_key) return grub_errno; -diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c -index 7b265c7..d1df640 100644 ---- a/grub-core/disk/lvm.c -+++ b/grub-core/disk/lvm.c +Index: bionic-security/grub-core/disk/lvm.c +=================================================================== +--- bionic-security.orig/grub-core/disk/lvm.c ++++ bionic-security/grub-core/disk/lvm.c @@ -173,7 +173,7 @@ grub_lvm_detect (grub_disk_t disk, first one. */ @@ -394,10 +397,10 @@ stripe = seg->nodes; p = grub_strstr (p, "stripes = ["); -diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c -index b18a923..c1b331e 100644 ---- a/grub-core/disk/xen/xendisk.c -+++ b/grub-core/disk/xen/xendisk.c +Index: bionic-security/grub-core/disk/xen/xendisk.c +=================================================================== +--- bionic-security.orig/grub-core/disk/xen/xendisk.c ++++ bionic-security/grub-core/disk/xen/xendisk.c @@ -426,7 +426,7 @@ grub_xendisk_init (void) if (!ctr) return; @@ -407,11 +410,11 @@ if (!virtdisks) return; if (grub_xenstore_dir ("device/vbd", fill, &ctr)) -diff --git a/grub-core/efiemu/loadcore.c b/grub-core/efiemu/loadcore.c -index 44085ef..2b92462 100644 ---- a/grub-core/efiemu/loadcore.c -+++ b/grub-core/efiemu/loadcore.c -@@ -201,7 +201,7 @@ grub_efiemu_count_symbols (const Elf_Ehdr *e) +Index: bionic-security/grub-core/efiemu/loadcore.c +=================================================================== +--- bionic-security.orig/grub-core/efiemu/loadcore.c ++++ bionic-security/grub-core/efiemu/loadcore.c +@@ -201,7 +201,7 @@ grub_efiemu_count_symbols (const Elf_Ehd grub_efiemu_nelfsyms = (unsigned) s->sh_size / (unsigned) s->sh_entsize; grub_efiemu_elfsyms = (struct grub_efiemu_elf_sym *) @@ -420,10 +423,10 @@ /* Relocators */ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff); -diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c -index 52a032f..9b8e0d0 100644 ---- a/grub-core/efiemu/mm.c -+++ b/grub-core/efiemu/mm.c +Index: bionic-security/grub-core/efiemu/mm.c +=================================================================== +--- bionic-security.orig/grub-core/efiemu/mm.c ++++ bionic-security/grub-core/efiemu/mm.c @@ -554,11 +554,11 @@ grub_efiemu_mmap_sort_and_uniq (void) /* Initialize variables*/ grub_memset (present, 0, sizeof (int) * GRUB_EFI_MAX_MEMORY_TYPE); @@ -447,11 +450,11 @@ if (!efiemu_mmap) { grub_efiemu_unload (); -diff --git a/grub-core/font/font.c b/grub-core/font/font.c -index 53d76a6..68967dc 100644 ---- a/grub-core/font/font.c -+++ b/grub-core/font/font.c -@@ -293,8 +293,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct +Index: bionic-security/grub-core/font/font.c +=================================================================== +--- bionic-security.orig/grub-core/font/font.c ++++ bionic-security/grub-core/font/font.c +@@ -293,8 +293,7 @@ load_font_index (grub_file_t file, grub_ font->num_chars = sect_length / FONT_CHAR_INDEX_ENTRY_SIZE; /* Allocate the character index array. */ @@ -461,11 +464,11 @@ if (!font->char_index) return 1; font->bmp_idx = grub_malloc (0x10000 * sizeof (grub_uint16_t)); -diff --git a/grub-core/fs/affs.c b/grub-core/fs/affs.c -index f673897..9107379 100644 ---- a/grub-core/fs/affs.c -+++ b/grub-core/fs/affs.c -@@ -301,7 +301,7 @@ grub_affs_read_symlink (grub_fshelp_node_t node) +Index: bionic-security/grub-core/fs/affs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/affs.c ++++ bionic-security/grub-core/fs/affs.c +@@ -301,7 +301,7 @@ grub_affs_read_symlink (grub_fshelp_node return 0; } latin1[symlink_size] = 0; @@ -474,7 +477,7 @@ if (!utf8) { grub_free (latin1); -@@ -422,7 +422,7 @@ grub_affs_iterate_dir (grub_fshelp_node_t dir, +@@ -422,7 +422,7 @@ grub_affs_iterate_dir (grub_fshelp_node_ return 1; } @@ -483,7 +486,7 @@ if (!hashtable) return 1; -@@ -628,7 +628,7 @@ grub_affs_label (grub_device_t device, char **label) +@@ -628,7 +628,7 @@ grub_affs_label (grub_device_t device, c len = file.namelen; if (len > sizeof (file.name)) len = sizeof (file.name); @@ -492,11 +495,11 @@ if (*label) *grub_latin1_to_utf8 ((grub_uint8_t *) *label, file.name, len) = '\0'; } -diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c -index 4849c1c..ed2a893 100644 ---- a/grub-core/fs/btrfs.c -+++ b/grub-core/fs/btrfs.c -@@ -375,7 +375,7 @@ lower_bound (struct grub_btrfs_data *data, +Index: bionic-security/grub-core/fs/btrfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/btrfs.c ++++ bionic-security/grub-core/fs/btrfs.c +@@ -375,7 +375,7 @@ lower_bound (struct grub_btrfs_data *dat { desc->allocated = 16; desc->depth = 0; @@ -505,7 +508,7 @@ if (!desc->data) return grub_errno; } -@@ -1739,7 +1739,7 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)), +@@ -1739,7 +1739,7 @@ grub_btrfs_embed (grub_device_t device _ *nsectors = 64 * 2 - 1; if (*nsectors > max_nsectors) *nsectors = max_nsectors; @@ -514,11 +517,11 @@ if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) -diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c -index fc36831..3fd4eec 100644 ---- a/grub-core/fs/hfs.c -+++ b/grub-core/fs/hfs.c -@@ -1360,7 +1360,7 @@ grub_hfs_label (grub_device_t device, char **label) +Index: bionic-security/grub-core/fs/hfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/hfs.c ++++ bionic-security/grub-core/fs/hfs.c +@@ -1360,7 +1360,7 @@ grub_hfs_label (grub_device_t device, ch grub_size_t len = data->sblock.volname[0]; if (len > sizeof (data->sblock.volname) - 1) len = sizeof (data->sblock.volname) - 1; @@ -527,11 +530,11 @@ if (*label) macroman_to_utf8 (*label, data->sblock.volname + 1, len + 1, 0); -diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c -index 21159e8..f16323e 100644 ---- a/grub-core/fs/hfsplus.c -+++ b/grub-core/fs/hfsplus.c -@@ -1012,7 +1012,7 @@ grub_hfsplus_label (grub_device_t device, char **label) +Index: bionic-security/grub-core/fs/hfsplus.c +=================================================================== +--- bionic-security.orig/grub-core/fs/hfsplus.c ++++ bionic-security/grub-core/fs/hfsplus.c +@@ -1012,7 +1012,7 @@ grub_hfsplus_label (grub_device_t device return 0; } @@ -540,11 +543,11 @@ if (! *label) return grub_errno; -diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c -index c9c8374..092b8f4 100644 ---- a/grub-core/fs/iso9660.c -+++ b/grub-core/fs/iso9660.c -@@ -331,7 +331,7 @@ grub_iso9660_convert_string (grub_uint8_t *us, int len) +Index: bionic-security/grub-core/fs/iso9660.c +=================================================================== +--- bionic-security.orig/grub-core/fs/iso9660.c ++++ bionic-security/grub-core/fs/iso9660.c +@@ -331,7 +331,7 @@ grub_iso9660_convert_string (grub_uint8_ int i; grub_uint16_t t[MAX_NAMELEN / 2 + 1]; @@ -553,11 +556,11 @@ if (! p) return NULL; -diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c -index 6f84688..9827f9b 100644 ---- a/grub-core/fs/ntfs.c -+++ b/grub-core/fs/ntfs.c -@@ -556,8 +556,8 @@ get_utf8 (grub_uint8_t *in, grub_size_t len) +Index: bionic-security/grub-core/fs/ntfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/ntfs.c ++++ bionic-security/grub-core/fs/ntfs.c +@@ -556,8 +556,8 @@ get_utf8 (grub_uint8_t *in, grub_size_t grub_uint16_t *tmp; grub_size_t i; @@ -568,11 +571,11 @@ if (!buf || !tmp) { grub_free (buf); -diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c -index 57b8d8d..6639317 100644 ---- a/grub-core/fs/sfs.c -+++ b/grub-core/fs/sfs.c -@@ -266,7 +266,7 @@ grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) +Index: bionic-security/grub-core/fs/sfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/sfs.c ++++ bionic-security/grub-core/fs/sfs.c +@@ -266,7 +266,7 @@ grub_sfs_read_block (grub_fshelp_node_t node->next_extent = node->block; node->cache_size = 0; @@ -581,11 +584,11 @@ if (!node->cache) { grub_errno = 0; -diff --git a/grub-core/fs/tar.c b/grub-core/fs/tar.c -index 39bf197..4864451 100644 ---- a/grub-core/fs/tar.c -+++ b/grub-core/fs/tar.c -@@ -120,7 +120,7 @@ grub_cpio_find_file (struct grub_archelp_data *data, char **name, +Index: bionic-security/grub-core/fs/tar.c +=================================================================== +--- bionic-security.orig/grub-core/fs/tar.c ++++ bionic-security/grub-core/fs/tar.c +@@ -120,7 +120,7 @@ grub_cpio_find_file (struct grub_archelp if (data->linkname_alloc < linksize + 1) { char *n; @@ -594,11 +597,11 @@ if (!n) return grub_errno; grub_free (data->linkname); -diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c -index 839bff8..ebf1625 100644 ---- a/grub-core/fs/udf.c -+++ b/grub-core/fs/udf.c -@@ -836,7 +836,7 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) +Index: bionic-security/grub-core/fs/udf.c +=================================================================== +--- bionic-security.orig/grub-core/fs/udf.c ++++ bionic-security/grub-core/fs/udf.c +@@ -836,7 +836,7 @@ read_string (const grub_uint8_t *raw, gr { unsigned i; utf16len = sz - 1; @@ -607,7 +610,7 @@ if (!utf16) return NULL; for (i = 0; i < utf16len; i++) -@@ -846,7 +846,7 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) +@@ -846,7 +846,7 @@ read_string (const grub_uint8_t *raw, gr { unsigned i; utf16len = (sz - 1) / 2; @@ -616,11 +619,11 @@ if (!utf16) return NULL; for (i = 0; i < utf16len; i++) -diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c -index 6e1fff9..f6b95d4 100644 ---- a/grub-core/fs/zfs/zfs.c -+++ b/grub-core/fs/zfs/zfs.c -@@ -3325,7 +3325,7 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol, +Index: bionic-security/grub-core/fs/zfs/zfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/zfs/zfs.c ++++ bionic-security/grub-core/fs/zfs/zfs.c +@@ -3325,7 +3325,7 @@ dnode_get_fullpath (const char *fullpath } subvol->nkeys = 0; zap_iterate (&keychain_dn, 8, count_zap_keys, &ctx, data); @@ -629,7 +632,7 @@ if (!subvol->keyring) { grub_free (fsname); -@@ -4336,7 +4336,7 @@ grub_zfs_embed (grub_device_t device __attribute__ ((unused)), +@@ -4336,7 +4336,7 @@ grub_zfs_embed (grub_device_t device __a *nsectors = (VDEV_BOOT_SIZE >> GRUB_DISK_SECTOR_BITS); if (*nsectors > max_nsectors) *nsectors = max_nsectors; @@ -638,10 +641,10 @@ if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) -diff --git a/grub-core/gfxmenu/gui_string_util.c b/grub-core/gfxmenu/gui_string_util.c -index a9a415e..ba1e1ea 100644 ---- a/grub-core/gfxmenu/gui_string_util.c -+++ b/grub-core/gfxmenu/gui_string_util.c +Index: bionic-security/grub-core/gfxmenu/gui_string_util.c +=================================================================== +--- bionic-security.orig/grub-core/gfxmenu/gui_string_util.c ++++ bionic-security/grub-core/gfxmenu/gui_string_util.c @@ -55,7 +55,7 @@ canonicalize_path (const char *path) if (*p == '/') components++; @@ -651,11 +654,11 @@ if (! path_array) return 0; -diff --git a/grub-core/gfxmenu/widget-box.c b/grub-core/gfxmenu/widget-box.c -index b606028..470597d 100644 ---- a/grub-core/gfxmenu/widget-box.c -+++ b/grub-core/gfxmenu/widget-box.c -@@ -303,10 +303,10 @@ grub_gfxmenu_create_box (const char *pixmaps_prefix, +Index: bionic-security/grub-core/gfxmenu/widget-box.c +=================================================================== +--- bionic-security.orig/grub-core/gfxmenu/widget-box.c ++++ bionic-security/grub-core/gfxmenu/widget-box.c +@@ -303,10 +303,10 @@ grub_gfxmenu_create_box (const char *pix box->content_height = 0; box->raw_pixmaps = (struct grub_video_bitmap **) @@ -668,11 +671,11 @@ /* Initialize all pixmap pointers to NULL so that proper destruction can be performed if an error is encountered partway through construction. */ -diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c -index 0f2ea6b..603df6c 100644 ---- a/grub-core/io/gzio.c -+++ b/grub-core/io/gzio.c -@@ -542,7 +542,7 @@ huft_build (unsigned *b, /* code lengths in bits (all assumed <= BMAX) */ +Index: bionic-security/grub-core/io/gzio.c +=================================================================== +--- bionic-security.orig/grub-core/io/gzio.c ++++ bionic-security/grub-core/io/gzio.c +@@ -542,7 +542,7 @@ huft_build (unsigned *b, /* code lengths z = 1 << j; /* table entries for j-bit table */ /* allocate and link in new table */ @@ -681,11 +684,11 @@ if (! q) { if (h) -diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index d467785..2eff9cd 100644 ---- a/grub-core/kern/efi/efi.c -+++ b/grub-core/kern/efi/efi.c -@@ -193,7 +193,7 @@ grub_efi_set_variable(const char *var, const grub_efi_guid_t *guid, +Index: bionic-security/grub-core/kern/efi/efi.c +=================================================================== +--- bionic-security.orig/grub-core/kern/efi/efi.c ++++ bionic-security/grub-core/kern/efi/efi.c +@@ -193,7 +193,7 @@ grub_efi_set_variable(const char *var, c len = grub_strlen (var); len16 = len * GRUB_MAX_UTF16_PER_UTF8; @@ -694,7 +697,7 @@ if (!var16) return grub_errno; len16 = grub_utf8_to_utf16 (var16, len16, (grub_uint8_t *) var, len, NULL); -@@ -228,7 +228,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, +@@ -228,7 +228,7 @@ grub_efi_get_variable (const char *var, len = grub_strlen (var); len16 = len * GRUB_MAX_UTF16_PER_UTF8; @@ -703,10 +706,10 @@ if (!var16) return NULL; len16 = grub_utf8_to_utf16 (var16, len16, (grub_uint8_t *) var, len, NULL); -diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c -index d66e12d..0427bd9 100644 ---- a/grub-core/kern/emu/hostdisk.c -+++ b/grub-core/kern/emu/hostdisk.c +Index: bionic-security/grub-core/kern/emu/hostdisk.c +=================================================================== +--- bionic-security.orig/grub-core/kern/emu/hostdisk.c ++++ bionic-security/grub-core/kern/emu/hostdisk.c @@ -627,7 +627,7 @@ static char * grub_util_path_concat_real (size_t n, int ext, va_list ap) { @@ -716,11 +719,11 @@ char *r, *p, *pi; size_t i; int first = 1; -diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c -index 9085895..23f4301 100644 ---- a/grub-core/kern/fs.c -+++ b/grub-core/kern/fs.c -@@ -151,7 +151,7 @@ grub_fs_blocklist_open (grub_file_t file, const char *name) +Index: bionic-security/grub-core/kern/fs.c +=================================================================== +--- bionic-security.orig/grub-core/kern/fs.c ++++ bionic-security/grub-core/kern/fs.c +@@ -151,7 +151,7 @@ grub_fs_blocklist_open (grub_file_t file while (p); /* Allocate a block list. */ @@ -729,11 +732,11 @@ if (! blocks) return 0; -diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index 3a14d67..6bdbbce 100644 ---- a/grub-core/kern/misc.c -+++ b/grub-core/kern/misc.c -@@ -693,7 +693,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args, +Index: bionic-security/grub-core/kern/misc.c +=================================================================== +--- bionic-security.orig/grub-core/kern/misc.c ++++ bionic-security/grub-core/kern/misc.c +@@ -693,7 +693,7 @@ parse_printf_args (const char *fmt0, str args->ptr = args->prealloc; else { @@ -742,11 +745,11 @@ if (!args->ptr) { grub_errno = GRUB_ERR_NONE; -diff --git a/grub-core/kern/parser.c b/grub-core/kern/parser.c -index 78175aa..619db31 100644 ---- a/grub-core/kern/parser.c -+++ b/grub-core/kern/parser.c -@@ -213,7 +213,7 @@ grub_parser_split_cmdline (const char *cmdline, +Index: bionic-security/grub-core/kern/parser.c +=================================================================== +--- bionic-security.orig/grub-core/kern/parser.c ++++ bionic-security/grub-core/kern/parser.c +@@ -213,7 +213,7 @@ grub_parser_split_cmdline (const char *c return grub_errno; grub_memcpy (args, buffer, bp - buffer); @@ -755,10 +758,10 @@ if (!*argv) { grub_free (args); -diff --git a/grub-core/kern/uboot/uboot.c b/grub-core/kern/uboot/uboot.c -index 6800a4b..948b08b 100644 ---- a/grub-core/kern/uboot/uboot.c -+++ b/grub-core/kern/uboot/uboot.c +Index: bionic-security/grub-core/kern/uboot/uboot.c +=================================================================== +--- bionic-security.orig/grub-core/kern/uboot/uboot.c ++++ bionic-security/grub-core/kern/uboot/uboot.c @@ -168,7 +168,7 @@ grub_uboot_dev_enum (void) return num_devices; @@ -768,11 +771,11 @@ if (!enum_devices) return 0; -diff --git a/grub-core/lib/libgcrypt/cipher/ac.c b/grub-core/lib/libgcrypt/cipher/ac.c -index f5e946a..63f6fcd 100644 ---- a/grub-core/lib/libgcrypt/cipher/ac.c -+++ b/grub-core/lib/libgcrypt/cipher/ac.c -@@ -185,7 +185,7 @@ ac_data_mpi_copy (gcry_ac_mpi_t *data_mpis, unsigned int data_mpis_n, +Index: bionic-security/grub-core/lib/libgcrypt/cipher/ac.c +=================================================================== +--- bionic-security.orig/grub-core/lib/libgcrypt/cipher/ac.c ++++ bionic-security/grub-core/lib/libgcrypt/cipher/ac.c +@@ -185,7 +185,7 @@ ac_data_mpi_copy (gcry_ac_mpi_t *data_mp gcry_mpi_t mpi; char *label; @@ -781,7 +784,7 @@ if (! data_mpis_new) { err = gcry_error_from_errno (errno); -@@ -572,7 +572,7 @@ _gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, +@@ -572,7 +572,7 @@ _gcry_ac_data_to_sexp (gcry_ac_data_t da } /* Add MPI list. */ @@ -790,7 +793,7 @@ if (! arg_list) { err = gcry_error_from_errno (errno); -@@ -1283,7 +1283,7 @@ ac_data_construct (const char *identifier, int include_flags, +@@ -1283,7 +1283,7 @@ ac_data_construct (const char *identifie /* We build a list of arguments to pass to gcry_sexp_build_array(). */ data_length = _gcry_ac_data_length (data); @@ -799,7 +802,7 @@ if (! arg_list) { err = gcry_error_from_errno (errno); -@@ -1593,7 +1593,7 @@ _gcry_ac_key_pair_generate (gcry_ac_handle_t handle, unsigned int nbits, +@@ -1593,7 +1593,7 @@ _gcry_ac_key_pair_generate (gcry_ac_hand arg_list_n += 2; /* Allocate list. */ @@ -808,11 +811,11 @@ if (! arg_list) { err = gcry_error_from_errno (errno); -diff --git a/grub-core/lib/libgcrypt/cipher/primegen.c b/grub-core/lib/libgcrypt/cipher/primegen.c -index 2788e34..b12e79b 100644 ---- a/grub-core/lib/libgcrypt/cipher/primegen.c -+++ b/grub-core/lib/libgcrypt/cipher/primegen.c -@@ -383,7 +383,7 @@ prime_generate_internal (int need_q_factor, +Index: bionic-security/grub-core/lib/libgcrypt/cipher/primegen.c +=================================================================== +--- bionic-security.orig/grub-core/lib/libgcrypt/cipher/primegen.c ++++ bionic-security/grub-core/lib/libgcrypt/cipher/primegen.c +@@ -383,7 +383,7 @@ prime_generate_internal (int need_q_fact } /* Allocate an array to track pool usage. */ @@ -821,7 +824,7 @@ if (!pool_in_use) { err = gpg_err_code_from_errno (errno); -@@ -765,7 +765,7 @@ gen_prime (unsigned int nbits, int secret, int randomlevel, +@@ -765,7 +765,7 @@ gen_prime (unsigned int nbits, int secre if (nbits < 16) log_fatal ("can't generate a prime with less than %d bits\n", 16); @@ -830,11 +833,11 @@ /* Make nbits fit into gcry_mpi_t implementation. */ val_2 = mpi_alloc_set_ui( 2 ); val_3 = mpi_alloc_set_ui( 3); -diff --git a/grub-core/lib/libgcrypt/cipher/pubkey.c b/grub-core/lib/libgcrypt/cipher/pubkey.c -index 9109821..ca087ad 100644 ---- a/grub-core/lib/libgcrypt/cipher/pubkey.c -+++ b/grub-core/lib/libgcrypt/cipher/pubkey.c -@@ -2941,7 +2941,7 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t s_pkey) +Index: bionic-security/grub-core/lib/libgcrypt/cipher/pubkey.c +=================================================================== +--- bionic-security.orig/grub-core/lib/libgcrypt/cipher/pubkey.c ++++ bionic-security/grub-core/lib/libgcrypt/cipher/pubkey.c +@@ -2941,7 +2941,7 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gc * array to a format string, so we have to do it this way :-(. */ /* FIXME: There is now such a format specifier, so we can change the code to be more clear. */ @@ -843,7 +846,7 @@ if (!arg_list) { rc = gpg_err_code_from_syserror (); -@@ -3233,7 +3233,7 @@ gcry_pk_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_hash, gcry_sexp_t s_skey) +@@ -3233,7 +3233,7 @@ gcry_pk_sign (gcry_sexp_t *r_sig, gcry_s } strcpy (p, "))"); @@ -852,11 +855,11 @@ if (!arg_list) { rc = gpg_err_code_from_syserror (); -diff --git a/grub-core/lib/priority_queue.c b/grub-core/lib/priority_queue.c -index 659be0b..7d5e7c0 100644 ---- a/grub-core/lib/priority_queue.c -+++ b/grub-core/lib/priority_queue.c -@@ -92,7 +92,7 @@ grub_priority_queue_new (grub_size_t elsize, +Index: bionic-security/grub-core/lib/priority_queue.c +=================================================================== +--- bionic-security.orig/grub-core/lib/priority_queue.c ++++ bionic-security/grub-core/lib/priority_queue.c +@@ -92,7 +92,7 @@ grub_priority_queue_new (grub_size_t els { struct grub_priority_queue *ret; void *els; @@ -865,10 +868,10 @@ if (!els) return 0; ret = (struct grub_priority_queue *) grub_malloc (sizeof (*ret)); -diff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c -index ee9fa7b..467305b 100644 ---- a/grub-core/lib/reed_solomon.c -+++ b/grub-core/lib/reed_solomon.c +Index: bionic-security/grub-core/lib/reed_solomon.c +=================================================================== +--- bionic-security.orig/grub-core/lib/reed_solomon.c ++++ bionic-security/grub-core/lib/reed_solomon.c @@ -20,6 +20,7 @@ #include #include @@ -877,7 +880,7 @@ #define xmalloc malloc #define grub_memset memset #define grub_memcpy memcpy -@@ -158,11 +159,9 @@ rs_encode (gf_single_t *data, grub_size_t s, grub_size_t rs) +@@ -158,11 +159,9 @@ rs_encode (gf_single_t *data, grub_size_ gf_single_t *rs_polynomial; int i, j; gf_single_t *m; @@ -891,11 +894,11 @@ rs_polynomial[rs] = 1; /* Multiply with X - a^r */ for (j = 0; j < rs; j++) -diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c -index ea3ebc7..5847aac 100644 ---- a/grub-core/lib/relocator.c -+++ b/grub-core/lib/relocator.c -@@ -495,9 +495,9 @@ malloc_in_range (struct grub_relocator *rel, +Index: bionic-security/grub-core/lib/relocator.c +=================================================================== +--- bionic-security.orig/grub-core/lib/relocator.c ++++ bionic-security/grub-core/lib/relocator.c +@@ -495,9 +495,9 @@ malloc_in_range (struct grub_relocator * } #endif @@ -907,7 +910,7 @@ if (!events || !eventt || !counter) { grub_dprintf ("relocator", "events or counter allocation failed %d\n", -@@ -963,7 +963,7 @@ malloc_in_range (struct grub_relocator *rel, +@@ -963,7 +963,7 @@ malloc_in_range (struct grub_relocator * #endif unsigned cural = 0; int oom = 0; @@ -916,7 +919,7 @@ if (!res->subchunks) oom = 1; res->nsubchunks = nallocs; -@@ -1562,8 +1562,8 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr, +@@ -1562,8 +1562,8 @@ grub_relocator_prepare_relocs (struct gr count[(chunk->src & 0xff) + 1]++; } } @@ -927,10 +930,10 @@ if (!from || !to) { grub_free (from); -diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c -index a6c51d7..3bc6b5c 100644 ---- a/grub-core/loader/arm/linux.c -+++ b/grub-core/loader/arm/linux.c +Index: bionic-security/grub-core/loader/arm/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/arm/linux.c ++++ bionic-security/grub-core/loader/arm/linux.c @@ -85,7 +85,7 @@ linux_prepare_atag (void) /* some place for cmdline, initrd and terminator. */ @@ -940,11 +943,11 @@ if (!tmp_atag) return grub_errno; -diff --git a/grub-core/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c -index af6741d..a8d8bf7 100644 ---- a/grub-core/loader/i386/bsdXX.c -+++ b/grub-core/loader/i386/bsdXX.c -@@ -48,7 +48,7 @@ read_headers (grub_file_t file, const char *filename, Elf_Ehdr *e, char **shdr) +Index: bionic-security/grub-core/loader/i386/bsdXX.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/bsdXX.c ++++ bionic-security/grub-core/loader/i386/bsdXX.c +@@ -48,7 +48,7 @@ read_headers (grub_file_t file, const ch if (e->e_ident[EI_CLASS] != SUFFIX (ELFCLASS)) return grub_error (GRUB_ERR_BAD_OS, N_("invalid arch-dependent ELF magic")); @@ -953,11 +956,11 @@ if (! *shdr) return grub_errno; -diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c -index 59ef73a..ee0eaad 100644 ---- a/grub-core/loader/i386/xnu.c -+++ b/grub-core/loader/i386/xnu.c -@@ -295,7 +295,7 @@ grub_xnu_devprop_add_property_utf8 (struct grub_xnu_devprop_device_descriptor *d +Index: bionic-security/grub-core/loader/i386/xnu.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/xnu.c ++++ bionic-security/grub-core/loader/i386/xnu.c +@@ -295,7 +295,7 @@ grub_xnu_devprop_add_property_utf8 (stru return grub_errno; len = grub_strlen (name); @@ -966,7 +969,7 @@ if (!utf16) { grub_free (utf8); -@@ -331,7 +331,7 @@ grub_xnu_devprop_add_property_utf16 (struct grub_xnu_devprop_device_descriptor * +@@ -331,7 +331,7 @@ grub_xnu_devprop_add_property_utf16 (str grub_uint16_t *utf16; grub_err_t err; @@ -975,11 +978,11 @@ if (!utf16) return grub_errno; grub_memcpy (utf16, name, sizeof (grub_uint16_t) * namelen); -diff --git a/grub-core/loader/macho.c b/grub-core/loader/macho.c -index 59b195e..f61341a 100644 ---- a/grub-core/loader/macho.c -+++ b/grub-core/loader/macho.c -@@ -97,7 +97,7 @@ grub_macho_file (grub_file_t file, const char *filename, int is_64bit) +Index: bionic-security/grub-core/loader/macho.c +=================================================================== +--- bionic-security.orig/grub-core/loader/macho.c ++++ bionic-security/grub-core/loader/macho.c +@@ -97,7 +97,7 @@ grub_macho_file (grub_file_t file, const if (grub_file_seek (macho->file, sizeof (struct grub_macho_fat_header)) == (grub_off_t) -1) goto fail; @@ -988,11 +991,11 @@ if (!archs) goto fail; if (grub_file_read (macho->file, archs, -diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c -index 5e649ed..f331db7 100644 ---- a/grub-core/loader/multiboot_elfxx.c -+++ b/grub-core/loader/multiboot_elfxx.c -@@ -200,7 +200,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) +Index: bionic-security/grub-core/loader/multiboot_elfxx.c +=================================================================== +--- bionic-security.orig/grub-core/loader/multiboot_elfxx.c ++++ bionic-security/grub-core/loader/multiboot_elfxx.c +@@ -200,7 +200,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi { grub_uint8_t *shdr, *shdrptr; @@ -1001,11 +1004,11 @@ if (!shdr) return grub_errno; -diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c -index df8dfdb..dc7d540 100644 ---- a/grub-core/loader/xnu.c -+++ b/grub-core/loader/xnu.c -@@ -792,7 +792,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/xnu.c +=================================================================== +--- bionic-security.orig/grub-core/loader/xnu.c ++++ bionic-security/grub-core/loader/xnu.c +@@ -792,7 +792,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd _ if (grub_be_to_cpu32 (head.magic) == GRUB_MACHO_FAT_MAGIC) { narchs = grub_be_to_cpu32 (head.nfat_arch); @@ -1014,11 +1017,11 @@ if (! archs) { grub_file_close (file); -diff --git a/grub-core/mmap/mmap.c b/grub-core/mmap/mmap.c -index 6a31cba..57b4e9a 100644 ---- a/grub-core/mmap/mmap.c -+++ b/grub-core/mmap/mmap.c -@@ -143,9 +143,9 @@ grub_mmap_iterate (grub_memory_hook_t hook, void *hook_data) +Index: bionic-security/grub-core/mmap/mmap.c +=================================================================== +--- bionic-security.orig/grub-core/mmap/mmap.c ++++ bionic-security/grub-core/mmap/mmap.c +@@ -143,9 +143,9 @@ grub_mmap_iterate (grub_memory_hook_t ho /* Initialize variables. */ ctx.scanline_events = (struct grub_mmap_scan *) @@ -1030,11 +1033,11 @@ if (! ctx.scanline_events || !present) { -diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c -index de9239c..01fdf98 100644 ---- a/grub-core/net/bootp.c -+++ b/grub-core/net/bootp.c -@@ -1252,7 +1252,7 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/net/bootp.c +=================================================================== +--- bionic-security.orig/grub-core/net/bootp.c ++++ bionic-security/grub-core/net/bootp.c +@@ -1252,7 +1252,7 @@ grub_cmd_bootp (struct grub_command *cmd if (ncards == 0) return grub_error (GRUB_ERR_NET_NO_CARD, N_("no network card found")); @@ -1043,11 +1046,11 @@ if (!ifaces) return grub_errno; -diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c -index 5d9afe0..e332d5e 100644 ---- a/grub-core/net/dns.c -+++ b/grub-core/net/dns.c -@@ -285,8 +285,8 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)), +Index: bionic-security/grub-core/net/dns.c +=================================================================== +--- bionic-security.orig/grub-core/net/dns.c ++++ bionic-security/grub-core/net/dns.c +@@ -285,8 +285,8 @@ recv_hook (grub_net_udp_socket_t sock __ ptr++; ptr += 4; } @@ -1058,7 +1061,7 @@ if (!*data->addresses) { grub_errno = GRUB_ERR_NONE; -@@ -406,8 +406,8 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)), +@@ -406,8 +406,8 @@ recv_hook (grub_net_udp_socket_t sock __ dns_cache[h].addresses = 0; dns_cache[h].name = grub_strdup (data->oname); dns_cache[h].naddresses = *data->naddresses; @@ -1078,11 +1081,11 @@ if (!sockets) return grub_errno; -diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index fbac15e..25c150f 100644 ---- a/grub-core/net/net.c -+++ b/grub-core/net/net.c -@@ -333,8 +333,8 @@ grub_cmd_ipv6_autoconf (struct grub_command *cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/net/net.c +=================================================================== +--- bionic-security.orig/grub-core/net/net.c ++++ bionic-security/grub-core/net/net.c +@@ -333,8 +333,8 @@ grub_cmd_ipv6_autoconf (struct grub_comm ncards++; } @@ -1093,11 +1096,11 @@ if (!ifaces || !slaacs) { grub_free (ifaces); -diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c -index b0ab47d..d57fb72 100644 ---- a/grub-core/normal/charset.c -+++ b/grub-core/normal/charset.c -@@ -203,7 +203,7 @@ grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg, +Index: bionic-security/grub-core/normal/charset.c +=================================================================== +--- bionic-security.orig/grub-core/normal/charset.c ++++ bionic-security/grub-core/normal/charset.c +@@ -203,7 +203,7 @@ grub_utf8_to_ucs4_alloc (const char *msg { grub_size_t msg_len = grub_strlen (msg); @@ -1106,7 +1109,7 @@ if (!*unicode_msg) return -1; -@@ -488,7 +488,7 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, +@@ -488,7 +488,7 @@ grub_unicode_aglomerate_comb (const grub } else { @@ -1115,7 +1118,7 @@ if (!n) { grub_errno = GRUB_ERR_NONE; -@@ -842,7 +842,7 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t *logical, +@@ -842,7 +842,7 @@ grub_bidi_line_logical_to_visual (const } \ } @@ -1124,7 +1127,7 @@ if (!visual) return -1; -@@ -1165,8 +1165,8 @@ grub_bidi_logical_to_visual (const grub_uint32_t *logical, +@@ -1165,8 +1165,8 @@ grub_bidi_logical_to_visual (const grub_ { const grub_uint32_t *line_start = logical, *ptr; struct grub_unicode_glyph *visual_ptr; @@ -1135,10 +1138,10 @@ if (!visual_ptr) return -1; for (ptr = logical; ptr <= logical + logical_len; ptr++) -diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c -index a36180d..9003609 100644 ---- a/grub-core/normal/cmdline.c -+++ b/grub-core/normal/cmdline.c +Index: bionic-security/grub-core/normal/cmdline.c +=================================================================== +--- bionic-security.orig/grub-core/normal/cmdline.c ++++ bionic-security/grub-core/normal/cmdline.c @@ -41,7 +41,7 @@ grub_err_t grub_set_history (int newsize) { @@ -1157,7 +1160,7 @@ if (!hist_lines[pos]) { grub_print_error (); -@@ -349,7 +349,7 @@ grub_cmdline_get (const char *prompt_translated) +@@ -349,7 +349,7 @@ grub_cmdline_get (const char *prompt_tra char *ret; unsigned nterms; @@ -1166,7 +1169,7 @@ if (!buf) return 0; -@@ -377,7 +377,7 @@ grub_cmdline_get (const char *prompt_translated) +@@ -377,7 +377,7 @@ grub_cmdline_get (const char *prompt_tra FOR_ACTIVE_TERM_OUTPUTS(cur) nterms++; @@ -1175,7 +1178,7 @@ if (!cl_terms) { grub_free (buf); -@@ -385,7 +385,7 @@ grub_cmdline_get (const char *prompt_translated) +@@ -385,7 +385,7 @@ grub_cmdline_get (const char *prompt_tra } cl_term_cur = cl_terms; @@ -1184,7 +1187,7 @@ if (!unicode_msg) { grub_free (buf); -@@ -495,7 +495,7 @@ grub_cmdline_get (const char *prompt_translated) +@@ -495,7 +495,7 @@ grub_cmdline_get (const char *prompt_tra grub_uint32_t *insert; insertlen = grub_strlen (insertu8); @@ -1193,7 +1196,7 @@ if (!insert) { grub_free (insertu8); -@@ -602,7 +602,7 @@ grub_cmdline_get (const char *prompt_translated) +@@ -602,7 +602,7 @@ grub_cmdline_get (const char *prompt_tra grub_free (kill_buf); @@ -1202,11 +1205,11 @@ if (grub_errno) { grub_print_error (); -diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c -index eeeee55..a86f056 100644 ---- a/grub-core/normal/menu_entry.c -+++ b/grub-core/normal/menu_entry.c -@@ -95,8 +95,8 @@ init_line (struct screen *screen, struct line *linep) +Index: bionic-security/grub-core/normal/menu_entry.c +=================================================================== +--- bionic-security.orig/grub-core/normal/menu_entry.c ++++ bionic-security/grub-core/normal/menu_entry.c +@@ -95,8 +95,8 @@ init_line (struct screen *screen, struct { linep->len = 0; linep->max_len = 80; @@ -1217,7 +1220,7 @@ if (! linep->buf || !linep->pos) { grub_free (linep->buf); -@@ -287,7 +287,7 @@ update_screen (struct screen *screen, struct per_term_screen *term_screen, +@@ -287,7 +287,7 @@ update_screen (struct screen *screen, st pos = linep->pos + (term_screen - screen->terms); if (!*pos) @@ -1226,7 +1229,7 @@ if (i == region_start || linep == screen->lines + screen->line || (i > region_start && mode == ALL_LINES)) -@@ -471,7 +471,7 @@ insert_string (struct screen *screen, const char *s, int update) +@@ -471,7 +471,7 @@ insert_string (struct screen *screen, co /* Insert the string. */ current_linep = screen->lines + screen->line; @@ -1235,7 +1238,7 @@ if (!unicode_msg) return 0; -@@ -1023,7 +1023,7 @@ complete (struct screen *screen, int continuous, int update) +@@ -1023,7 +1023,7 @@ complete (struct screen *screen, int con if (completion_buffer.buf) { buflen = grub_strlen (completion_buffer.buf); @@ -1244,7 +1247,7 @@ if (!ucs4) { -@@ -1268,7 +1268,7 @@ grub_menu_entry_run (grub_menu_entry_t entry) +@@ -1268,7 +1268,7 @@ grub_menu_entry_run (grub_menu_entry_t e for (i = 0; i < (unsigned) screen->num_lines; i++) { grub_free (screen->lines[i].pos); @@ -1253,7 +1256,7 @@ if (! screen->lines[i].pos) { grub_print_error (); -@@ -1278,7 +1278,7 @@ grub_menu_entry_run (grub_menu_entry_t entry) +@@ -1278,7 +1278,7 @@ grub_menu_entry_run (grub_menu_entry_t e } } @@ -1262,11 +1265,11 @@ if (!screen->terms) { grub_print_error (); -diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c -index e22bb91..18240e7 100644 ---- a/grub-core/normal/menu_text.c -+++ b/grub-core/normal/menu_text.c -@@ -78,7 +78,7 @@ grub_print_message_indented_real (const char *msg, int margin_left, +Index: bionic-security/grub-core/normal/menu_text.c +=================================================================== +--- bionic-security.orig/grub-core/normal/menu_text.c ++++ bionic-security/grub-core/normal/menu_text.c +@@ -78,7 +78,7 @@ grub_print_message_indented_real (const grub_size_t msg_len = grub_strlen (msg) + 2; int ret = 0; @@ -1275,7 +1278,7 @@ if (!unicode_msg) return 0; -@@ -211,7 +211,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry, +@@ -211,7 +211,7 @@ print_entry (int y, int highlight, grub_ title = entry ? entry->title : ""; title_len = grub_strlen (title); @@ -1284,10 +1287,10 @@ if (! unicode_title) /* XXX How to show this error? */ return; -diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c -index ac5d69f..93a3a0d 100644 ---- a/grub-core/normal/term.c -+++ b/grub-core/normal/term.c +Index: bionic-security/grub-core/normal/term.c +=================================================================== +--- bionic-security.orig/grub-core/normal/term.c ++++ bionic-security/grub-core/normal/term.c @@ -264,7 +264,7 @@ grub_term_save_pos (void) FOR_ACTIVE_TERM_OUTPUTS(cur) cnt++; @@ -1297,7 +1300,7 @@ if (!ret) return NULL; -@@ -1013,7 +1013,7 @@ grub_xnputs (const char *str, grub_size_t msg_len) +@@ -1013,7 +1013,7 @@ grub_xnputs (const char *str, grub_size_ grub_error_push (); @@ -1306,11 +1309,11 @@ grub_error_pop (); -diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c -index 7adc0f3..a5bd075 100644 ---- a/grub-core/osdep/linux/getroot.c -+++ b/grub-core/osdep/linux/getroot.c -@@ -168,7 +168,7 @@ grub_util_raid_getmembers (const char *name, int bootable) +Index: bionic-security/grub-core/osdep/linux/getroot.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/linux/getroot.c ++++ bionic-security/grub-core/osdep/linux/getroot.c +@@ -168,7 +168,7 @@ grub_util_raid_getmembers (const char *n if (ret != 0) grub_util_error (_("ioctl GET_ARRAY_INFO error: %s"), strerror (errno)); @@ -1319,7 +1322,7 @@ for (i = 0, j = 0; j < info.nr_disks; i++) { -@@ -241,7 +241,7 @@ grub_find_root_devices_from_btrfs (const char *dir) +@@ -241,7 +241,7 @@ grub_find_root_devices_from_btrfs (const return NULL; } @@ -1328,7 +1331,7 @@ for (i = 1; i <= fsi.max_id && j < fsi.num_devices; i++) { -@@ -396,7 +396,7 @@ grub_find_root_devices_from_mountinfo (const char *dir, char **relroot) +@@ -396,7 +396,7 @@ grub_find_root_devices_from_mountinfo (c if (relroot) *relroot = NULL; @@ -1337,11 +1340,11 @@ again: fp = grub_util_fopen ("/proc/self/mountinfo", "r"); -diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c -index 5478030..89dc70d 100644 ---- a/grub-core/osdep/unix/config.c -+++ b/grub-core/osdep/unix/config.c -@@ -130,7 +130,7 @@ grub_util_load_config (struct grub_util_config *cfg) +Index: bionic-security/grub-core/osdep/unix/config.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/unix/config.c ++++ bionic-security/grub-core/osdep/unix/config.c +@@ -130,7 +130,7 @@ grub_util_load_config (struct grub_util_ if (num_cfgpaths == 0) goto out; @@ -1350,10 +1353,10 @@ i = 0; if (grub_util_is_regular (cfgfile)) sorted_cfgpaths[i++] = xstrdup (cfgfile); -diff --git a/grub-core/osdep/windows/getroot.c b/grub-core/osdep/windows/getroot.c -index 661d954..eada663 100644 ---- a/grub-core/osdep/windows/getroot.c -+++ b/grub-core/osdep/windows/getroot.c +Index: bionic-security/grub-core/osdep/windows/getroot.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/windows/getroot.c ++++ bionic-security/grub-core/osdep/windows/getroot.c @@ -59,7 +59,7 @@ grub_get_mount_point (const TCHAR *path) for (ptr = path; *ptr; ptr++); @@ -1363,11 +1366,11 @@ /* When pointing to EFI system partition GetVolumePathName fails for ESP root and returns abberant information for everything -diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c -index 85507af..3cf6bff 100644 ---- a/grub-core/osdep/windows/hostdisk.c -+++ b/grub-core/osdep/windows/hostdisk.c -@@ -111,7 +111,7 @@ grub_util_get_windows_path_real (const char *path) +Index: bionic-security/grub-core/osdep/windows/hostdisk.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/windows/hostdisk.c ++++ bionic-security/grub-core/osdep/windows/hostdisk.c +@@ -111,7 +111,7 @@ grub_util_get_windows_path_real (const c while (1) { @@ -1385,11 +1388,11 @@ memcpy (pattern, name_windows, l * sizeof (pattern[0])); pattern[l] = '\\'; pattern[l + 1] = '*'; -diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c -index e8ffd62..6297de6 100644 ---- a/grub-core/osdep/windows/init.c -+++ b/grub-core/osdep/windows/init.c -@@ -161,7 +161,7 @@ grub_util_host_init (int *argc __attribute__ ((unused)), +Index: bionic-security/grub-core/osdep/windows/init.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/windows/init.c ++++ bionic-security/grub-core/osdep/windows/init.c +@@ -161,7 +161,7 @@ grub_util_host_init (int *argc __attribu LPWSTR *targv; targv = CommandLineToArgvW (tcmdline, argc); @@ -1398,11 +1401,11 @@ for (i = 0; i < *argc; i++) (*argv)[i] = grub_util_tchar_to_utf8 (targv[i]); -diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c -index 1c96959..7ca27f9 100644 ---- a/grub-core/osdep/windows/platform.c -+++ b/grub-core/osdep/windows/platform.c -@@ -232,8 +232,8 @@ grub_install_register_efi (grub_device_t efidir_grub_dev, +Index: bionic-security/grub-core/osdep/windows/platform.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/windows/platform.c ++++ bionic-security/grub-core/osdep/windows/platform.c +@@ -232,8 +232,8 @@ grub_install_register_efi (grub_device_t grub_util_error ("%s", _("no EFI routines are available when running in BIOS mode")); distrib8_len = grub_strlen (efi_distributor); @@ -1413,11 +1416,11 @@ distrib16_len = grub_utf8_to_utf16 (distributor16, distrib8_len * GRUB_MAX_UTF16_PER_UTF8, (const grub_uint8_t *) efi_distributor, distrib8_len, 0); -diff --git a/grub-core/osdep/windows/relpath.c b/grub-core/osdep/windows/relpath.c -index cb08617..478e8ef 100644 ---- a/grub-core/osdep/windows/relpath.c -+++ b/grub-core/osdep/windows/relpath.c -@@ -72,7 +72,7 @@ grub_make_system_path_relative_to_its_root (const char *path) +Index: bionic-security/grub-core/osdep/windows/relpath.c +=================================================================== +--- bionic-security.orig/grub-core/osdep/windows/relpath.c ++++ bionic-security/grub-core/osdep/windows/relpath.c +@@ -72,7 +72,7 @@ grub_make_system_path_relative_to_its_ro if (dirwindows[0] && dirwindows[1] == ':') offset = 2; } @@ -1426,11 +1429,11 @@ if (dirwindows[offset] != '\\' && dirwindows[offset] != '/' && dirwindows[offset]) -diff --git a/grub-core/partmap/gpt.c b/grub-core/partmap/gpt.c -index 83bcba7..5fae4ca 100644 ---- a/grub-core/partmap/gpt.c -+++ b/grub-core/partmap/gpt.c -@@ -199,7 +199,7 @@ gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, +Index: bionic-security/grub-core/partmap/gpt.c +=================================================================== +--- bionic-security.orig/grub-core/partmap/gpt.c ++++ bionic-security/grub-core/partmap/gpt.c +@@ -199,7 +199,7 @@ gpt_partition_map_embed (struct grub_dis *nsectors = ctx.len; if (*nsectors > max_nsectors) *nsectors = max_nsectors; @@ -1439,11 +1442,11 @@ if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) -diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c -index 6d4b455..81ca6b9 100644 ---- a/grub-core/partmap/msdos.c -+++ b/grub-core/partmap/msdos.c -@@ -337,7 +337,7 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, +Index: bionic-security/grub-core/partmap/msdos.c +=================================================================== +--- bionic-security.orig/grub-core/partmap/msdos.c ++++ bionic-security/grub-core/partmap/msdos.c +@@ -337,7 +337,7 @@ pc_partition_map_embed (struct grub_disk avail_nsectors = *nsectors; if (*nsectors > max_nsectors) *nsectors = max_nsectors; @@ -1452,11 +1455,11 @@ if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) -diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c -index a8502d9..ac01dec 100644 ---- a/grub-core/script/execute.c -+++ b/grub-core/script/execute.c -@@ -552,7 +552,7 @@ gettext_append (struct grub_script_argv *result, const char *orig_str) +Index: bionic-security/grub-core/script/execute.c +=================================================================== +--- bionic-security.orig/grub-core/script/execute.c ++++ bionic-security/grub-core/script/execute.c +@@ -552,7 +552,7 @@ gettext_append (struct grub_script_argv for (iptr = orig_str; *iptr; iptr++) if (*iptr == '$') dollar_cnt++; @@ -1465,11 +1468,11 @@ if (parse_string (orig_str, gettext_save_allow, &ctx, 0)) goto fail; -diff --git a/grub-core/tests/fake_input.c b/grub-core/tests/fake_input.c -index 2d60852..b5eb516 100644 ---- a/grub-core/tests/fake_input.c -+++ b/grub-core/tests/fake_input.c -@@ -49,7 +49,7 @@ grub_terminal_input_fake_sequence (int *seq_in, int nseq_in) +Index: bionic-security/grub-core/tests/fake_input.c +=================================================================== +--- bionic-security.orig/grub-core/tests/fake_input.c ++++ bionic-security/grub-core/tests/fake_input.c +@@ -49,7 +49,7 @@ grub_terminal_input_fake_sequence (int * saved = grub_term_inputs; if (seq) grub_free (seq); @@ -1478,11 +1481,11 @@ if (!seq) return; -diff --git a/grub-core/tests/video_checksum.c b/grub-core/tests/video_checksum.c -index 74d5b65..44d0810 100644 ---- a/grub-core/tests/video_checksum.c -+++ b/grub-core/tests/video_checksum.c -@@ -336,7 +336,7 @@ grub_video_capture_write_bmp (const char *fname, +Index: bionic-security/grub-core/tests/video_checksum.c +=================================================================== +--- bionic-security.orig/grub-core/tests/video_checksum.c ++++ bionic-security/grub-core/tests/video_checksum.c +@@ -336,7 +336,7 @@ grub_video_capture_write_bmp (const char { case 4: { @@ -1491,7 +1494,7 @@ grub_uint32_t rmask = ((1 << mode_info->red_mask_size) - 1); grub_uint32_t gmask = ((1 << mode_info->green_mask_size) - 1); grub_uint32_t bmask = ((1 << mode_info->blue_mask_size) - 1); -@@ -367,7 +367,7 @@ grub_video_capture_write_bmp (const char *fname, +@@ -367,7 +367,7 @@ grub_video_capture_write_bmp (const char } case 3: { @@ -1500,7 +1503,7 @@ grub_uint32_t rmask = ((1 << mode_info->red_mask_size) - 1); grub_uint32_t gmask = ((1 << mode_info->green_mask_size) - 1); grub_uint32_t bmask = ((1 << mode_info->blue_mask_size) - 1); -@@ -407,7 +407,7 @@ grub_video_capture_write_bmp (const char *fname, +@@ -407,7 +407,7 @@ grub_video_capture_write_bmp (const char } case 2: { @@ -1509,11 +1512,11 @@ grub_uint16_t rmask = ((1 << mode_info->red_mask_size) - 1); grub_uint16_t gmask = ((1 << mode_info->green_mask_size) - 1); grub_uint16_t bmask = ((1 << mode_info->blue_mask_size) - 1); -diff --git a/grub-core/video/capture.c b/grub-core/video/capture.c -index 4f83c74..4d3195e 100644 ---- a/grub-core/video/capture.c -+++ b/grub-core/video/capture.c -@@ -89,7 +89,7 @@ grub_video_capture_start (const struct grub_video_mode_info *mode_info, +Index: bionic-security/grub-core/video/capture.c +=================================================================== +--- bionic-security.orig/grub-core/video/capture.c ++++ bionic-security/grub-core/video/capture.c +@@ -89,7 +89,7 @@ grub_video_capture_start (const struct g framebuffer.mode_info = *mode_info; framebuffer.mode_info.blit_format = grub_video_get_blit_format (&framebuffer.mode_info); @@ -1522,11 +1525,11 @@ if (!framebuffer.ptr) return grub_errno; -diff --git a/grub-core/video/emu/sdl.c b/grub-core/video/emu/sdl.c -index a2f639f..0ebab6f 100644 ---- a/grub-core/video/emu/sdl.c -+++ b/grub-core/video/emu/sdl.c -@@ -172,7 +172,7 @@ grub_video_sdl_set_palette (unsigned int start, unsigned int count, +Index: bionic-security/grub-core/video/emu/sdl.c +=================================================================== +--- bionic-security.orig/grub-core/video/emu/sdl.c ++++ bionic-security/grub-core/video/emu/sdl.c +@@ -172,7 +172,7 @@ grub_video_sdl_set_palette (unsigned int if (start + count > mode_info.number_of_colors) count = mode_info.number_of_colors - start; @@ -1535,11 +1538,11 @@ for (i = 0; i < count; i++) { tmp[i].r = palette_data[i].r; -diff --git a/grub-core/video/i386/pc/vga.c b/grub-core/video/i386/pc/vga.c -index 01f4711..b2f776c 100644 ---- a/grub-core/video/i386/pc/vga.c -+++ b/grub-core/video/i386/pc/vga.c -@@ -127,7 +127,7 @@ grub_video_vga_setup (unsigned int width, unsigned int height, +Index: bionic-security/grub-core/video/i386/pc/vga.c +=================================================================== +--- bionic-security.orig/grub-core/video/i386/pc/vga.c ++++ bionic-security/grub-core/video/i386/pc/vga.c +@@ -127,7 +127,7 @@ grub_video_vga_setup (unsigned int width vga_height = height ? : 480; @@ -1548,11 +1551,11 @@ framebuffer.front_page = 0; framebuffer.back_page = 0; if (!framebuffer.temporary_buffer) -diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c -index e1a01e9..e85df3c 100644 ---- a/grub-core/video/readers/png.c -+++ b/grub-core/video/readers/png.c -@@ -309,7 +309,7 @@ grub_png_decode_image_header (struct grub_png_data *data) +Index: bionic-security/grub-core/video/readers/png.c +=================================================================== +--- bionic-security.orig/grub-core/video/readers/png.c ++++ bionic-security/grub-core/video/readers/png.c +@@ -309,7 +309,7 @@ grub_png_decode_image_header (struct gru if (data->is_16bit || data->is_gray || data->is_palette) #endif { @@ -1561,11 +1564,11 @@ if (grub_errno) return grub_errno; -diff --git a/include/grub/unicode.h b/include/grub/unicode.h -index a0403e9..4de986a 100644 ---- a/include/grub/unicode.h -+++ b/include/grub/unicode.h -@@ -293,7 +293,7 @@ grub_unicode_glyph_dup (const struct grub_unicode_glyph *in) +Index: bionic-security/include/grub/unicode.h +=================================================================== +--- bionic-security.orig/include/grub/unicode.h ++++ bionic-security/include/grub/unicode.h +@@ -293,7 +293,7 @@ grub_unicode_glyph_dup (const struct gru grub_memcpy (out, in, sizeof (*in)); if (in->ncomb > ARRAY_SIZE (out->combining_inline)) { @@ -1574,7 +1577,7 @@ if (!out->combining_ptr) { grub_free (out); -@@ -315,7 +315,7 @@ grub_unicode_set_glyph (struct grub_unicode_glyph *out, +@@ -315,7 +315,7 @@ grub_unicode_set_glyph (struct grub_unic grub_memcpy (out, in, sizeof (*in)); if (in->ncomb > ARRAY_SIZE (out->combining_inline)) { @@ -1583,10 +1586,10 @@ if (!out->combining_ptr) return; grub_memcpy (out->combining_ptr, in->combining_ptr, -diff --git a/util/getroot.c b/util/getroot.c -index cdd4115..6ae35ec 100644 ---- a/util/getroot.c -+++ b/util/getroot.c +Index: bionic-security/util/getroot.c +=================================================================== +--- bionic-security.orig/util/getroot.c ++++ bionic-security/util/getroot.c @@ -200,7 +200,7 @@ make_device_name (const char *drive) char *ret, *ptr; const char *iptr; @@ -1596,10 +1599,10 @@ ptr = ret; for (iptr = drive; *iptr; iptr++) { -diff --git a/util/grub-file.c b/util/grub-file.c -index 50c18b6..b2e7dd6 100644 ---- a/util/grub-file.c -+++ b/util/grub-file.c +Index: bionic-security/util/grub-file.c +=================================================================== +--- bionic-security.orig/util/grub-file.c ++++ bionic-security/util/grub-file.c @@ -54,7 +54,7 @@ main (int argc, char *argv[]) grub_util_host_init (&argc, &argv); @@ -1609,11 +1612,11 @@ if (argc == 2 && strcmp (argv[1], "--version") == 0) { -diff --git a/util/grub-fstest.c b/util/grub-fstest.c -index a358ae4..793aefa 100644 ---- a/util/grub-fstest.c -+++ b/util/grub-fstest.c -@@ -650,7 +650,7 @@ argp_parser (int key, char *arg, struct argp_state *state) +Index: bionic-security/util/grub-fstest.c +=================================================================== +--- bionic-security.orig/util/grub-fstest.c ++++ bionic-security/util/grub-fstest.c +@@ -650,7 +650,7 @@ argp_parser (int key, char *arg, struct if (args_count < num_disks) { if (args_count == 0) @@ -1631,11 +1634,11 @@ argp_parse (&argp, argc, argv, 0, 0, 0); -diff --git a/util/grub-install-common.c b/util/grub-install-common.c -index c9d5e3d..0fbfca2 100644 ---- a/util/grub-install-common.c -+++ b/util/grub-install-common.c -@@ -280,7 +280,7 @@ handle_install_list (struct install_list *il, const char *val, +Index: bionic-security/util/grub-install-common.c +=================================================================== +--- bionic-security.orig/util/grub-install-common.c ++++ bionic-security/util/grub-install-common.c +@@ -280,7 +280,7 @@ handle_install_list (struct install_list il->n_entries++; } il->n_alloc = il->n_entries + 1; @@ -1644,11 +1647,11 @@ ptr = val; for (ce = il->entries; ; ce++) { -diff --git a/util/grub-install.c b/util/grub-install.c -index b8f9110..ff1baee 100644 ---- a/util/grub-install.c -+++ b/util/grub-install.c -@@ -660,7 +660,7 @@ device_map_check_duplicates (const char *dev_map) +Index: bionic-security/util/grub-install.c +=================================================================== +--- bionic-security.orig/util/grub-install.c ++++ bionic-security/util/grub-install.c +@@ -660,7 +660,7 @@ device_map_check_duplicates (const char if (! fp) return; @@ -1666,32 +1669,10 @@ for (curdev = grub_devices, curdrive = grub_drives; *curdev; curdev++, curdrive++) -diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c -index e63f148..3d92b5a 100644 ---- a/util/grub-mkimagexx.c -+++ b/util/grub-mkimagexx.c -@@ -1784,7 +1784,7 @@ SUFFIX (locate_sections) (Elf_Ehdr *e, const char *kernel_path, - if (image_target->elf_target == EM_AARCH64) - layout->align = 4096; - -- section_addresses = xmalloc (sizeof (*section_addresses) * num_sections); -+ section_addresses = xcalloc (num_sections, sizeof (*section_addresses)); - memset (section_addresses, 0, sizeof (*section_addresses) * num_sections); - - layout->kernel_size = 0; -@@ -1933,7 +1933,7 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path, - layout, - image_target); - -- section_vaddresses = xmalloc (sizeof (*section_addresses) * num_sections); -+ section_vaddresses = xcalloc (num_sections, sizeof (*section_addresses)); - - for (i = 0; i < num_sections; i++) - section_vaddresses[i] = section_addresses[i] + image_target->vaddr_offset; -diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c -index 10dc202..257e7dd 100644 ---- a/util/grub-mkrescue.c -+++ b/util/grub-mkrescue.c +Index: bionic-security/util/grub-mkrescue.c +=================================================================== +--- bionic-security.orig/util/grub-mkrescue.c ++++ bionic-security/util/grub-mkrescue.c @@ -437,8 +437,8 @@ main (int argc, char *argv[]) xorriso = xstrdup ("xorriso"); label_font = grub_util_path_concat (2, pkgdatadir, "unicode.pf2"); @@ -1703,10 +1684,10 @@ xorriso_tail_argc = 0; /* Program name */ -diff --git a/util/grub-mkstandalone.c b/util/grub-mkstandalone.c -index 4907d44..edf3097 100644 ---- a/util/grub-mkstandalone.c -+++ b/util/grub-mkstandalone.c +Index: bionic-security/util/grub-mkstandalone.c +=================================================================== +--- bionic-security.orig/util/grub-mkstandalone.c ++++ bionic-security/util/grub-mkstandalone.c @@ -296,7 +296,7 @@ main (int argc, char *argv[]) grub_util_host_init (&argc, &argv); grub_util_disable_fd_syncs (); @@ -1716,11 +1697,11 @@ argp_parse (&argp, argc, argv, 0, 0, 0); -diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c -index 0d4084a..1133129 100644 ---- a/util/grub-pe2elf.c -+++ b/util/grub-pe2elf.c -@@ -100,9 +100,9 @@ write_section_data (FILE* fp, const char *name, char *image, +Index: bionic-security/util/grub-pe2elf.c +=================================================================== +--- bionic-security.orig/util/grub-pe2elf.c ++++ bionic-security/util/grub-pe2elf.c +@@ -100,9 +100,9 @@ write_section_data (FILE* fp, const char char *pe_strtab = (image + pe_chdr->symtab_offset + pe_chdr->num_symbols * sizeof (struct grub_pe32_symbol)); @@ -1732,7 +1713,7 @@ idx = 1; idx_reloc = pe_chdr->num_sections + 1; -@@ -233,7 +233,7 @@ write_reloc_section (FILE* fp, const char *name, char *image, +@@ -233,7 +233,7 @@ write_reloc_section (FILE* fp, const cha pe_sec = pe_shdr + shdr[i].sh_link; pe_rel = (struct grub_pe32_reloc *) (image + pe_sec->relocations_offset); @@ -1741,7 +1722,7 @@ num_rels = 0; modified = 0; -@@ -365,12 +365,10 @@ write_symbol_table (FILE* fp, const char *name, char *image, +@@ -365,12 +365,10 @@ write_symbol_table (FILE* fp, const char pe_symtab = (struct grub_pe32_symbol *) (image + pe_chdr->symtab_offset); pe_strtab = (char *) (pe_symtab + pe_chdr->num_symbols); @@ -1756,11 +1737,11 @@ for (i = 0; i < (int) pe_chdr->num_symbols; i += pe_symtab->num_aux + 1, pe_symtab += pe_symtab->num_aux + 1) -diff --git a/util/grub-probe.c b/util/grub-probe.c -index 8ac527d..1de558d 100644 ---- a/util/grub-probe.c -+++ b/util/grub-probe.c -@@ -305,8 +305,8 @@ probe (const char *path, char **device_names, char delim) +Index: bionic-security/util/grub-probe.c +=================================================================== +--- bionic-security.orig/util/grub-probe.c ++++ bionic-security/util/grub-probe.c +@@ -305,8 +305,8 @@ probe (const char *path, char **device_n grub_util_pull_device (*curdev); ndev++; } @@ -1771,3 +1752,25 @@ for (curdev = device_names, curdrive = drives_names; *curdev; curdev++, curdrive++) +Index: bionic-security/util/grub-mkimagexx.c +=================================================================== +--- bionic-security.orig/util/grub-mkimagexx.c ++++ bionic-security/util/grub-mkimagexx.c +@@ -1784,7 +1784,7 @@ SUFFIX (locate_sections) (Elf_Ehdr *e, c + if (image_target->elf_target == EM_AARCH64) + layout->align = 4096; + +- section_addresses = xmalloc (sizeof (*section_addresses) * num_sections); ++ section_addresses = xcalloc (num_sections, sizeof (*section_addresses)); + memset (section_addresses, 0, sizeof (*section_addresses) * num_sections); + + layout->kernel_size = 0; +@@ -1933,7 +1933,7 @@ SUFFIX (grub_mkimage_load_image) (const + layout, + image_target); + +- section_vaddresses = xmalloc (sizeof (*section_addresses) * num_sections); ++ section_vaddresses = xcalloc (num_sections, sizeof (*section_addresses)); + + for (i = 0; i < num_sections; i++) + section_vaddresses[i] = section_addresses[i] + image_target->vaddr_offset; diff -Nru grub2-2.02/debian/patches/0086-malloc-Use-overflow-checking-primitives-where-we-do-.patch grub2-2.02/debian/patches/0086-malloc-Use-overflow-checking-primitives-where-we-do-.patch --- grub2-2.02/debian/patches/0086-malloc-Use-overflow-checking-primitives-where-we-do-.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0086-malloc-Use-overflow-checking-primitives-where-we-do-.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 012c6974aaafae101681100dbe7abd5ef55d825d Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 15 Jun 2020 12:28:27 -0400 Subject: malloc: Use overflow checking primitives where we do complex @@ -28,35 +29,35 @@ Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- - grub-core/commands/legacycfg.c | 29 +++++++++++++++++++----- - grub-core/commands/wildcard.c | 36 ++++++++++++++++++++++++----- - grub-core/disk/ldm.c | 32 ++++++++++++++++++-------- - grub-core/font/font.c | 7 +++++- - grub-core/fs/btrfs.c | 28 +++++++++++++++-------- - grub-core/fs/ext2.c | 10 ++++++++- - grub-core/fs/iso9660.c | 51 +++++++++++++++++++++++++++++------------- - grub-core/fs/sfs.c | 27 +++++++++++++++++----- - grub-core/fs/squash4.c | 45 ++++++++++++++++++++++++++++--------- - grub-core/fs/udf.c | 41 +++++++++++++++++++++------------ - grub-core/fs/xfs.c | 11 +++++---- - grub-core/fs/zfs/zfs.c | 22 ++++++++++++------ - grub-core/fs/zfs/zfscrypt.c | 7 +++++- - grub-core/lib/arg.c | 20 +++++++++++++++-- - grub-core/loader/i386/bsd.c | 8 ++++++- - grub-core/net/dns.c | 9 +++++++- - grub-core/normal/charset.c | 10 +++++++-- - grub-core/normal/cmdline.c | 14 ++++++++++-- - grub-core/normal/menu_entry.c | 13 +++++++++-- - grub-core/script/argv.c | 16 +++++++++++-- - grub-core/script/lexer.c | 21 ++++++++++++++--- - grub-core/video/bitmap.c | 25 +++++++++++++-------- - grub-core/video/readers/png.c | 13 +++++++++-- + grub-core/commands/legacycfg.c | 29 +++++++++++++++---- + grub-core/commands/wildcard.c | 36 ++++++++++++++++++++---- + grub-core/disk/ldm.c | 32 +++++++++++++++------ + grub-core/font/font.c | 7 ++++- + grub-core/fs/btrfs.c | 28 +++++++++++++------ + grub-core/fs/ext2.c | 10 ++++++- + grub-core/fs/iso9660.c | 51 ++++++++++++++++++++++++---------- + grub-core/fs/sfs.c | 27 ++++++++++++++---- + grub-core/fs/squash4.c | 45 ++++++++++++++++++++++-------- + grub-core/fs/udf.c | 41 +++++++++++++++++---------- + grub-core/fs/xfs.c | 11 +++++--- + grub-core/fs/zfs/zfs.c | 22 ++++++++++----- + grub-core/fs/zfs/zfscrypt.c | 7 ++++- + grub-core/lib/arg.c | 20 +++++++++++-- + grub-core/loader/i386/bsd.c | 8 +++++- + grub-core/net/dns.c | 9 +++++- + grub-core/normal/charset.c | 10 +++++-- + grub-core/normal/cmdline.c | 14 ++++++++-- + grub-core/normal/menu_entry.c | 13 +++++++-- + grub-core/script/argv.c | 16 +++++++++-- + grub-core/script/lexer.c | 21 ++++++++++++-- + grub-core/video/bitmap.c | 25 +++++++++++------ + grub-core/video/readers/png.c | 13 +++++++-- 23 files changed, 382 insertions(+), 113 deletions(-) -diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c -index bc7936c..51e2185 100644 ---- a/grub-core/commands/legacycfg.c -+++ b/grub-core/commands/legacycfg.c +Index: bionic-security/grub-core/commands/legacycfg.c +=================================================================== +--- bionic-security.orig/grub-core/commands/legacycfg.c ++++ bionic-security/grub-core/commands/legacycfg.c @@ -32,6 +32,7 @@ #include #include @@ -116,10 +117,10 @@ grub_free (parsed); grub_free (suffix); return grub_errno; -diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c -index 9b4e727..18b2b5e 100644 ---- a/grub-core/commands/wildcard.c -+++ b/grub-core/commands/wildcard.c +Index: bionic-security/grub-core/commands/wildcard.c +=================================================================== +--- bionic-security.orig/grub-core/commands/wildcard.c ++++ bionic-security/grub-core/commands/wildcard.c @@ -23,6 +23,7 @@ #include #include @@ -150,7 +151,7 @@ if (! p) { grub_free (dest); -@@ -115,8 +122,15 @@ make_regex (const char *start, const char *end, regex_t *regexp) +@@ -115,8 +122,15 @@ make_regex (const char *start, const cha char ch; int i = 0; unsigned len = end - start; @@ -167,7 +168,7 @@ if (! buffer) return 1; -@@ -226,6 +240,7 @@ match_devices_iter (const char *name, void *data) +@@ -226,6 +240,7 @@ match_devices_iter (const char *name, vo struct match_devices_ctx *ctx = data; char **t; char *buffer; @@ -175,7 +176,7 @@ /* skip partitions if asked to. */ if (ctx->noparts && grub_strchr (name, ',')) -@@ -239,11 +254,16 @@ match_devices_iter (const char *name, void *data) +@@ -239,11 +254,16 @@ match_devices_iter (const char *name, vo if (regexec (ctx->regexp, buffer, 0, 0, 0)) { grub_dprintf ("expand", "not matched\n"); @@ -218,10 +219,10 @@ grub_free (buffer); return 1; } -diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c -index d3d2009..cfd5f6c 100644 ---- a/grub-core/disk/ldm.c -+++ b/grub-core/disk/ldm.c +Index: bionic-security/grub-core/disk/ldm.c +=================================================================== +--- bionic-security.orig/grub-core/disk/ldm.c ++++ bionic-security/grub-core/disk/ldm.c @@ -25,6 +25,7 @@ #include #include @@ -289,10 +290,10 @@ if (!t) goto fail2; comp->segments = t; -diff --git a/grub-core/font/font.c b/grub-core/font/font.c -index 68967dc..d63354f 100644 ---- a/grub-core/font/font.c -+++ b/grub-core/font/font.c +Index: bionic-security/grub-core/font/font.c +=================================================================== +--- bionic-security.orig/grub-core/font/font.c ++++ bionic-security/grub-core/font/font.c @@ -30,6 +30,7 @@ #include #include @@ -316,10 +317,10 @@ if (!str) return 0; -diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c -index ed2a893..24449b6 100644 ---- a/grub-core/fs/btrfs.c -+++ b/grub-core/fs/btrfs.c +Index: bionic-security/grub-core/fs/btrfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/btrfs.c ++++ bionic-security/grub-core/fs/btrfs.c @@ -29,6 +29,7 @@ #include #include @@ -328,7 +329,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -292,9 +293,13 @@ save_ref (struct grub_btrfs_leaf_descriptor *desc, +@@ -292,9 +293,13 @@ save_ref (struct grub_btrfs_leaf_descrip if (desc->allocated < desc->depth) { void *newdata; @@ -345,7 +346,7 @@ if (!newdata) return grub_errno; desc->data = newdata; -@@ -589,15 +594,20 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id, int do_rescan) +@@ -589,15 +594,20 @@ find_device (struct grub_btrfs_data *dat if (data->n_devices_attached > data->n_devices_allocated) { void *tmp; @@ -372,10 +373,10 @@ return NULL; } } -diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c -index b8ad75a..b4bd019 100644 ---- a/grub-core/fs/ext2.c -+++ b/grub-core/fs/ext2.c +Index: bionic-security/grub-core/fs/ext2.c +=================================================================== +--- bionic-security.orig/grub-core/fs/ext2.c ++++ bionic-security/grub-core/fs/ext2.c @@ -46,6 +46,7 @@ #include #include @@ -384,7 +385,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -703,6 +704,7 @@ grub_ext2_read_symlink (grub_fshelp_node_t node) +@@ -703,6 +704,7 @@ grub_ext2_read_symlink (grub_fshelp_node { char *symlink; struct grub_fshelp_node *diro = node; @@ -392,7 +393,7 @@ if (! diro->inode_read) { -@@ -717,7 +719,13 @@ grub_ext2_read_symlink (grub_fshelp_node_t node) +@@ -717,7 +719,13 @@ grub_ext2_read_symlink (grub_fshelp_node } } @@ -407,10 +408,10 @@ if (! symlink) return 0; -diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c -index 092b8f4..f45841e 100644 ---- a/grub-core/fs/iso9660.c -+++ b/grub-core/fs/iso9660.c +Index: bionic-security/grub-core/fs/iso9660.c +=================================================================== +--- bionic-security.orig/grub-core/fs/iso9660.c ++++ bionic-security/grub-core/fs/iso9660.c @@ -28,6 +28,7 @@ #include #include @@ -434,7 +435,7 @@ if (! ctx->symlink) return; -@@ -560,17 +566,24 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry, +@@ -560,17 +566,24 @@ susp_iterate_dir (struct grub_iso9660_su { grub_size_t off = 0, csize = 1; char *old; @@ -461,7 +462,7 @@ } if (!ctx->filename) { -@@ -776,14 +789,18 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, +@@ -776,14 +789,18 @@ grub_iso9660_iterate_dir (grub_fshelp_no if (node->have_dirents >= node->alloc_dirents) { struct grub_fshelp_node *new_node; @@ -486,7 +487,7 @@ if (ctx.filename_alloc) grub_free (ctx.filename); grub_free (node); -@@ -799,14 +816,18 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, +@@ -799,14 +816,18 @@ grub_iso9660_iterate_dir (grub_fshelp_no * sizeof (node->dirents[0]) < grub_strlen (ctx.symlink) + 1) { struct grub_fshelp_node *new_node; @@ -511,10 +512,10 @@ if (ctx.filename_alloc) grub_free (ctx.filename); grub_free (node); -diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c -index 6639317..3ddc6b5 100644 ---- a/grub-core/fs/sfs.c -+++ b/grub-core/fs/sfs.c +Index: bionic-security/grub-core/fs/sfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/sfs.c ++++ bionic-security/grub-core/fs/sfs.c @@ -26,6 +26,7 @@ #include #include @@ -523,7 +524,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -307,10 +308,15 @@ grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) +@@ -307,10 +308,15 @@ grub_sfs_read_block (grub_fshelp_node_t if (node->cache && node->cache_size >= node->cache_allocated) { struct cache_entry *e = node->cache; @@ -541,7 +542,7 @@ grub_errno = 0; grub_free (node->cache); node->cache = 0; -@@ -477,10 +483,16 @@ grub_sfs_create_node (struct grub_fshelp_node **node, +@@ -477,10 +483,16 @@ grub_sfs_create_node (struct grub_fshelp grub_size_t len = grub_strlen (name); grub_uint8_t *name_u8; int ret; @@ -559,7 +560,7 @@ if (!name_u8) { grub_free (*node); -@@ -724,8 +736,13 @@ grub_sfs_label (grub_device_t device, char **label) +@@ -724,8 +736,13 @@ grub_sfs_label (grub_device_t device, ch data = grub_sfs_mount (disk); if (data) { @@ -575,10 +576,10 @@ if (*label) *grub_latin1_to_utf8 ((grub_uint8_t *) *label, (const grub_uint8_t *) data->label, -diff --git a/grub-core/fs/squash4.c b/grub-core/fs/squash4.c -index 2c967c6..f9bef38 100644 ---- a/grub-core/fs/squash4.c -+++ b/grub-core/fs/squash4.c +Index: bionic-security/grub-core/fs/squash4.c +=================================================================== +--- bionic-security.orig/grub-core/fs/squash4.c ++++ bionic-security/grub-core/fs/squash4.c @@ -26,6 +26,7 @@ #include #include @@ -587,7 +588,7 @@ #include #include "xz.h" -@@ -459,7 +460,17 @@ grub_squash_read_symlink (grub_fshelp_node_t node) +@@ -459,7 +460,17 @@ grub_squash_read_symlink (grub_fshelp_no { char *ret; grub_err_t err; @@ -606,7 +607,7 @@ err = read_chunk (node->data, ret, grub_le_to_cpu32 (node->ino.symlink.namelen), -@@ -506,11 +517,16 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, +@@ -506,11 +517,16 @@ grub_squash_iterate_dir (grub_fshelp_nod { grub_fshelp_node_t node; @@ -626,7 +627,7 @@ if (hook (".", GRUB_FSHELP_DIR, node, hook_data)) return 1; -@@ -518,12 +534,15 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, +@@ -518,12 +534,15 @@ grub_squash_iterate_dir (grub_fshelp_nod { grub_err_t err; @@ -645,7 +646,7 @@ node->stsize--; err = read_chunk (dir->data, &node->ino, sizeof (node->ino), -@@ -557,6 +576,7 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, +@@ -557,6 +576,7 @@ grub_squash_iterate_dir (grub_fshelp_nod enum grub_fshelp_filetype filetype = GRUB_FSHELP_REG; struct grub_squash_dirent di; struct grub_squash_inode ino; @@ -653,7 +654,7 @@ err = read_chunk (dir->data, &di, sizeof (di), grub_le_to_cpu64 (dir->data->sb.diroffset) -@@ -589,13 +609,16 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, +@@ -589,13 +609,16 @@ grub_squash_iterate_dir (grub_fshelp_nod if (grub_le_to_cpu16 (di.type) == SQUASH_TYPE_SYMLINK) filetype = GRUB_FSHELP_SYMLINK; @@ -674,10 +675,10 @@ node->ino = ino; node->stack[node->stsize].ino_chunk = grub_le_to_cpu32 (dh.ino_chunk); -diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c -index ebf1625..99b001f 100644 ---- a/grub-core/fs/udf.c -+++ b/grub-core/fs/udf.c +Index: bionic-security/grub-core/fs/udf.c +=================================================================== +--- bionic-security.orig/grub-core/fs/udf.c ++++ bionic-security/grub-core/fs/udf.c @@ -28,6 +28,7 @@ #include #include @@ -686,7 +687,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -853,9 +854,19 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) +@@ -853,9 +854,19 @@ read_string (const grub_uint8_t *raw, gr utf16[i] = (raw[2 * i + 1] << 8) | raw[2*i + 2]; } if (!outbuf) @@ -707,7 +708,7 @@ grub_free (utf16); return outbuf; } -@@ -949,7 +960,7 @@ grub_udf_read_symlink (grub_fshelp_node_t node) +@@ -949,7 +960,7 @@ grub_udf_read_symlink (grub_fshelp_node_ grub_size_t sz = U64 (node->block.fe.file_size); grub_uint8_t *raw; const grub_uint8_t *ptr; @@ -716,7 +717,7 @@ if (sz < 4) return NULL; -@@ -957,14 +968,16 @@ grub_udf_read_symlink (grub_fshelp_node_t node) +@@ -957,14 +968,16 @@ grub_udf_read_symlink (grub_fshelp_node_ if (!raw) return NULL; if (grub_udf_read_file (node, NULL, NULL, 0, sz, (char *) raw) < 0) @@ -738,7 +739,7 @@ grub_free (raw); return NULL; } -@@ -975,17 +988,17 @@ grub_udf_read_symlink (grub_fshelp_node_t node) +@@ -975,17 +988,17 @@ grub_udf_read_symlink (grub_fshelp_node_ { grub_size_t s; if ((grub_size_t) (ptr - raw + 4) > sz) @@ -760,7 +761,7 @@ /* Fallthrough. */ case 2: /* in 4 bytes. out: 1 byte. */ -@@ -1010,11 +1023,11 @@ grub_udf_read_symlink (grub_fshelp_node_t node) +@@ -1010,11 +1023,11 @@ grub_udf_read_symlink (grub_fshelp_node_ if (optr != out) *optr++ = '/'; if (!read_string (ptr + 4, s - 4, optr)) @@ -774,7 +775,7 @@ } ptr += s; } -@@ -1022,7 +1035,7 @@ grub_udf_read_symlink (grub_fshelp_node_t node) +@@ -1022,7 +1035,7 @@ grub_udf_read_symlink (grub_fshelp_node_ grub_free (raw); return out; @@ -783,10 +784,10 @@ grub_free (raw); grub_free (out); grub_error (GRUB_ERR_BAD_FS, "invalid symlink"); -diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c -index 9f66dd6..1fd4492 100644 ---- a/grub-core/fs/xfs.c -+++ b/grub-core/fs/xfs.c +Index: bionic-security/grub-core/fs/xfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/xfs.c ++++ bionic-security/grub-core/fs/xfs.c @@ -25,6 +25,7 @@ #include #include @@ -819,10 +820,10 @@ if (! data) goto fail; -diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c -index f6b95d4..c620436 100644 ---- a/grub-core/fs/zfs/zfs.c -+++ b/grub-core/fs/zfs/zfs.c +Index: bionic-security/grub-core/fs/zfs/zfs.c +=================================================================== +--- bionic-security.orig/grub-core/fs/zfs/zfs.c ++++ bionic-security/grub-core/fs/zfs/zfs.c @@ -55,6 +55,7 @@ #include #include @@ -831,7 +832,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -773,11 +774,14 @@ fill_vdev_info (struct grub_zfs_data *data, +@@ -773,11 +774,14 @@ fill_vdev_info (struct grub_zfs_data *da if (data->n_devices_attached > data->n_devices_allocated) { void *tmp; @@ -851,7 +852,7 @@ if (!data->devices_attached) { data->devices_attached = tmp; -@@ -3468,14 +3472,18 @@ grub_zfs_nvlist_lookup_nvlist (const char *nvlist, const char *name) +@@ -3468,14 +3472,18 @@ grub_zfs_nvlist_lookup_nvlist (const cha { char *nvpair; char *ret; @@ -872,10 +873,10 @@ if (!ret) return 0; grub_memcpy (ret, nvlist, sizeof (grub_uint32_t)); -diff --git a/grub-core/fs/zfs/zfscrypt.c b/grub-core/fs/zfs/zfscrypt.c -index 87eef62..f8488c3 100644 ---- a/grub-core/fs/zfs/zfscrypt.c -+++ b/grub-core/fs/zfs/zfscrypt.c +Index: bionic-security/grub-core/fs/zfs/zfscrypt.c +=================================================================== +--- bionic-security.orig/grub-core/fs/zfs/zfscrypt.c ++++ bionic-security/grub-core/fs/zfs/zfscrypt.c @@ -22,6 +22,7 @@ #include #include @@ -899,10 +900,10 @@ if (!key) return grub_errno; key->is_passphrase = passphrase; -diff --git a/grub-core/lib/arg.c b/grub-core/lib/arg.c -index fd7744a..3288609 100644 ---- a/grub-core/lib/arg.c -+++ b/grub-core/lib/arg.c +Index: bionic-security/grub-core/lib/arg.c +=================================================================== +--- bionic-security.orig/grub-core/lib/arg.c ++++ bionic-security/grub-core/lib/arg.c @@ -23,6 +23,7 @@ #include #include @@ -926,7 +927,7 @@ if (! *argl) { grub_free (p); -@@ -431,6 +438,7 @@ grub_arg_list_alloc(grub_extcmd_t extcmd, int argc, +@@ -431,6 +438,7 @@ grub_arg_list_alloc(grub_extcmd_t extcmd grub_size_t argcnt; struct grub_arg_list *list; const struct grub_arg_option *options; @@ -934,7 +935,7 @@ options = extcmd->options; if (! options) -@@ -443,7 +451,15 @@ grub_arg_list_alloc(grub_extcmd_t extcmd, int argc, +@@ -443,7 +451,15 @@ grub_arg_list_alloc(grub_extcmd_t extcmd argcnt += ((grub_size_t) argc + 1) / 2 + 1; /* max possible for any option */ } @@ -951,10 +952,10 @@ if (! list) return 0; -diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c -index 87709aa..0f31763 100644 ---- a/grub-core/loader/i386/bsd.c -+++ b/grub-core/loader/i386/bsd.c +Index: bionic-security/grub-core/loader/i386/bsd.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/bsd.c ++++ bionic-security/grub-core/loader/i386/bsd.c @@ -35,6 +35,7 @@ #include #include @@ -981,10 +982,10 @@ if (!mods) return grub_errno; -diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c -index e332d5e..906ec7d 100644 ---- a/grub-core/net/dns.c -+++ b/grub-core/net/dns.c +Index: bionic-security/grub-core/net/dns.c +=================================================================== +--- bionic-security.orig/grub-core/net/dns.c ++++ bionic-security/grub-core/net/dns.c @@ -22,6 +22,7 @@ #include #include @@ -993,7 +994,7 @@ struct dns_cache_element { -@@ -51,9 +52,15 @@ grub_net_add_dns_server (const struct grub_net_network_level_address *s) +@@ -51,9 +52,15 @@ grub_net_add_dns_server (const struct gr { int na = dns_servers_alloc * 2; struct grub_net_network_level_address *ns; @@ -1010,10 +1011,10 @@ if (!ns) return grub_errno; dns_servers_alloc = na; -diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c -index d57fb72..4dfcc31 100644 ---- a/grub-core/normal/charset.c -+++ b/grub-core/normal/charset.c +Index: bionic-security/grub-core/normal/charset.c +=================================================================== +--- bionic-security.orig/grub-core/normal/charset.c ++++ bionic-security/grub-core/normal/charset.c @@ -48,6 +48,7 @@ #include #include @@ -1022,7 +1023,7 @@ #if HAVE_FONT_SOURCE #include "widthspec.h" -@@ -464,6 +465,7 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, +@@ -464,6 +465,7 @@ grub_unicode_aglomerate_comb (const grub { struct grub_unicode_combining *n; unsigned j; @@ -1030,7 +1031,7 @@ if (!haveout) continue; -@@ -477,10 +479,14 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, +@@ -477,10 +479,14 @@ grub_unicode_aglomerate_comb (const grub n = out->combining_inline; else if (out->ncomb > (int) ARRAY_SIZE (out->combining_inline)) { @@ -1047,10 +1048,10 @@ grub_errno = GRUB_ERR_NONE; continue; } -diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c -index 9003609..b4b66ba 100644 ---- a/grub-core/normal/cmdline.c -+++ b/grub-core/normal/cmdline.c +Index: bionic-security/grub-core/normal/cmdline.c +=================================================================== +--- bionic-security.orig/grub-core/normal/cmdline.c ++++ bionic-security/grub-core/normal/cmdline.c @@ -28,6 +28,7 @@ #include #include @@ -1059,7 +1060,7 @@ static grub_uint32_t *kill_buf; -@@ -307,12 +308,21 @@ cl_insert (struct cmdline_term *cl_terms, unsigned nterms, +@@ -307,12 +308,21 @@ cl_insert (struct cmdline_term *cl_terms if (len + (*llen) >= (*max_len)) { grub_uint32_t *nbuf; @@ -1083,10 +1084,10 @@ grub_print_error (); grub_errno = GRUB_ERR_NONE; (*max_len) /= 2; -diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c -index a86f056..5f0800c 100644 ---- a/grub-core/normal/menu_entry.c -+++ b/grub-core/normal/menu_entry.c +Index: bionic-security/grub-core/normal/menu_entry.c +=================================================================== +--- bionic-security.orig/grub-core/normal/menu_entry.c ++++ bionic-security/grub-core/normal/menu_entry.c @@ -27,6 +27,7 @@ #include #include @@ -1095,7 +1096,7 @@ enum update_mode { -@@ -113,10 +114,18 @@ ensure_space (struct line *linep, int extra) +@@ -113,10 +114,18 @@ ensure_space (struct line *linep, int ex { if (linep->max_len < linep->len + extra) { @@ -1116,10 +1117,10 @@ } return 1; -diff --git a/grub-core/script/argv.c b/grub-core/script/argv.c -index 217ec5d..5751fdd 100644 ---- a/grub-core/script/argv.c -+++ b/grub-core/script/argv.c +Index: bionic-security/grub-core/script/argv.c +=================================================================== +--- bionic-security.orig/grub-core/script/argv.c ++++ bionic-security/grub-core/script/argv.c @@ -20,6 +20,7 @@ #include #include @@ -1146,7 +1147,7 @@ if (! p) return 1; -@@ -105,13 +111,19 @@ grub_script_argv_append (struct grub_script_argv *argv, const char *s, +@@ -105,13 +111,19 @@ grub_script_argv_append (struct grub_scr { grub_size_t a; char *p = argv->args[argv->argc - 1]; @@ -1167,10 +1168,10 @@ if (! p) return 1; -diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c -index c6bd317..5fb0cbd 100644 ---- a/grub-core/script/lexer.c -+++ b/grub-core/script/lexer.c +Index: bionic-security/grub-core/script/lexer.c +=================================================================== +--- bionic-security.orig/grub-core/script/lexer.c ++++ bionic-security/grub-core/script/lexer.c @@ -24,6 +24,7 @@ #include #include @@ -1179,7 +1180,7 @@ #define yytext_ptr char * #include "grub_script.tab.h" -@@ -110,10 +111,14 @@ grub_script_lexer_record (struct grub_parser_param *parser, char *str) +@@ -110,10 +111,14 @@ grub_script_lexer_record (struct grub_pa old = lexer->recording; if (lexer->recordlen < len) lexer->recordlen = len; @@ -1204,7 +1205,7 @@ char *p = 0; char *line = 0; YY_BUFFER_STATE buffer; -@@ -168,12 +173,22 @@ grub_script_lexer_yywrap (struct grub_parser_param *parserstate, +@@ -168,12 +173,22 @@ grub_script_lexer_yywrap (struct grub_pa } else if (len && line[len - 1] != '\n') { @@ -1228,10 +1229,10 @@ line = p; } -diff --git a/grub-core/video/bitmap.c b/grub-core/video/bitmap.c -index b2e0315..6256e20 100644 ---- a/grub-core/video/bitmap.c -+++ b/grub-core/video/bitmap.c +Index: bionic-security/grub-core/video/bitmap.c +=================================================================== +--- bionic-security.orig/grub-core/video/bitmap.c ++++ bionic-security/grub-core/video/bitmap.c @@ -23,6 +23,7 @@ #include #include @@ -1240,7 +1241,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -58,7 +59,7 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap, +@@ -58,7 +59,7 @@ grub_video_bitmap_create (struct grub_vi enum grub_video_blit_format blit_format) { struct grub_video_mode_info *mode_info; @@ -1249,7 +1250,7 @@ if (!bitmap) return grub_error (GRUB_ERR_BUG, "invalid argument"); -@@ -137,19 +138,25 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap, +@@ -137,19 +138,25 @@ grub_video_bitmap_create (struct grub_vi mode_info->pitch = width * mode_info->bytes_per_pixel; @@ -1283,10 +1284,10 @@ } /* Frees all resources allocated by bitmap. */ -diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c -index e85df3c..719e647 100644 ---- a/grub-core/video/readers/png.c -+++ b/grub-core/video/readers/png.c +Index: bionic-security/grub-core/video/readers/png.c +=================================================================== +--- bionic-security.orig/grub-core/video/readers/png.c ++++ bionic-security/grub-core/video/readers/png.c @@ -23,6 +23,7 @@ #include #include @@ -1295,7 +1296,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -301,9 +302,17 @@ grub_png_decode_image_header (struct grub_png_data *data) +@@ -301,9 +302,17 @@ grub_png_decode_image_header (struct gru data->bpp <<= 1; data->color_bits = color_bits; diff -Nru grub2-2.02/debian/patches/0087-iso9660-Don-t-leak-memory-on-realloc-failures.patch grub2-2.02/debian/patches/0087-iso9660-Don-t-leak-memory-on-realloc-failures.patch --- grub2-2.02/debian/patches/0087-iso9660-Don-t-leak-memory-on-realloc-failures.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0087-iso9660-Don-t-leak-memory-on-realloc-failures.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From ae8703a3dd74ec31c8f37135fc32315f926812b2 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sat, 4 Jul 2020 12:25:09 -0400 Subject: iso9660: Don't leak memory on realloc() failures @@ -9,7 +10,7 @@ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c -index f45841e..6fc9302 100644 +index 7ba5b300b..5ec4433b8 100644 --- a/grub-core/fs/iso9660.c +++ b/grub-core/fs/iso9660.c @@ -533,14 +533,20 @@ add_part (struct iterate_dir_ctx *ctx, diff -Nru grub2-2.02/debian/patches/0088-font-Do-not-load-more-than-one-NAME-section.patch grub2-2.02/debian/patches/0088-font-Do-not-load-more-than-one-NAME-section.patch --- grub2-2.02/debian/patches/0088-font-Do-not-load-more-than-one-NAME-section.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0088-font-Do-not-load-more-than-one-NAME-section.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From aa83281cfdc2b7a508b8fa21018a3b31e6f0440d Mon Sep 17 00:00:00 2001 From: Daniel Kiper Date: Tue, 7 Jul 2020 15:36:26 +0200 Subject: font: Do not load more than one NAME section @@ -15,7 +16,7 @@ 1 file changed, 6 insertions(+) diff --git a/grub-core/font/font.c b/grub-core/font/font.c -index d63354f..a7b955a 100644 +index 5edb477ac..d09bb38d8 100644 --- a/grub-core/font/font.c +++ b/grub-core/font/font.c @@ -532,6 +532,12 @@ grub_font_load (const char *filename) diff -Nru grub2-2.02/debian/patches/0089-gfxmenu-Fix-double-free-in-load_image.patch grub2-2.02/debian/patches/0089-gfxmenu-Fix-double-free-in-load_image.patch --- grub2-2.02/debian/patches/0089-gfxmenu-Fix-double-free-in-load_image.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0089-gfxmenu-Fix-double-free-in-load_image.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 72c7f2afab0e9ea5d17b35ea4ff74221e1bcfbfc Mon Sep 17 00:00:00 2001 From: Alexey Makhalov Date: Wed, 8 Jul 2020 20:41:56 +0000 Subject: gfxmenu: Fix double free in load_image() @@ -14,7 +15,7 @@ 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c -index 29784ed..6b2e976 100644 +index 29784ed2d..6b2e976f1 100644 --- a/grub-core/gfxmenu/gui_image.c +++ b/grub-core/gfxmenu/gui_image.c @@ -195,7 +195,10 @@ load_image (grub_gui_image_t self, const char *path) diff -Nru grub2-2.02/debian/patches/0090-lzma-Make-sure-we-don-t-dereference-past-array.patch grub2-2.02/debian/patches/0090-lzma-Make-sure-we-don-t-dereference-past-array.patch --- grub2-2.02/debian/patches/0090-lzma-Make-sure-we-don-t-dereference-past-array.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0090-lzma-Make-sure-we-don-t-dereference-past-array.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From c8aef3a92c63add6c4c4b65bbf17c2121d97a688 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Thu, 9 Jul 2020 03:05:23 +0000 Subject: lzma: Make sure we don't dereference past array @@ -20,7 +21,7 @@ 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c -index f2ec04a..753e56a 100644 +index f2ec04a8c..753e56a95 100644 --- a/grub-core/lib/LzmaEnc.c +++ b/grub-core/lib/LzmaEnc.c @@ -1877,13 +1877,19 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize diff -Nru grub2-2.02/debian/patches/0091-tftp-Do-not-use-priority-queue.patch grub2-2.02/debian/patches/0091-tftp-Do-not-use-priority-queue.patch --- grub2-2.02/debian/patches/0091-tftp-Do-not-use-priority-queue.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0091-tftp-Do-not-use-priority-queue.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 80e584d2d9a255c7626bac198fb7e335a63a1f51 Mon Sep 17 00:00:00 2001 From: Alexey Makhalov Date: Thu, 9 Jul 2020 08:10:40 +0000 Subject: tftp: Do not use priority queue @@ -29,11 +30,11 @@ Signed-off-by: Alexey Makhalov Reviewed-by: Daniel Kiper --- - grub-core/net/tftp.c | 171 ++++++++++++++++----------------------------------- + grub-core/net/tftp.c | 171 ++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 118 deletions(-) diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index a0817a0..e6566fa 100644 +index a0817a075..e6566fa17 100644 --- a/grub-core/net/tftp.c +++ b/grub-core/net/tftp.c @@ -25,7 +25,6 @@ diff -Nru grub2-2.02/debian/patches/0092-script-Remove-unused-fields-from-grub_script_functio.patch grub2-2.02/debian/patches/0092-script-Remove-unused-fields-from-grub_script_functio.patch --- grub2-2.02/debian/patches/0092-script-Remove-unused-fields-from-grub_script_functio.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0092-script-Remove-unused-fields-from-grub_script_functio.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From d4235881fe9807432c0054149ca07caace83e7cb Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Fri, 10 Jul 2020 11:21:14 +0100 Subject: script: Remove unused fields from grub_script_function struct @@ -9,7 +10,7 @@ 1 file changed, 5 deletions(-) diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h -index 360c2be..b382bcf 100644 +index 360c2be1f..b382bcf09 100644 --- a/include/grub/script_sh.h +++ b/include/grub/script_sh.h @@ -359,13 +359,8 @@ struct grub_script_function diff -Nru grub2-2.02/debian/patches/0093-script-Avoid-a-use-after-free-when-redefining-a-func.patch grub2-2.02/debian/patches/0093-script-Avoid-a-use-after-free-when-redefining-a-func.patch --- grub2-2.02/debian/patches/0093-script-Avoid-a-use-after-free-when-redefining-a-func.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0093-script-Avoid-a-use-after-free-when-redefining-a-func.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From f7aff9effc6d11719db1cfeef7d3419d635c92f5 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Fri, 10 Jul 2020 14:41:45 +0100 Subject: script: Avoid a use-after-free when redefining a function during @@ -26,10 +27,10 @@ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c -index ac01dec..61b7cb3 100644 +index c8d6806fe..7e028e135 100644 --- a/grub-core/script/execute.c +++ b/grub-core/script/execute.c -@@ -837,7 +837,9 @@ grub_script_function_call (grub_script_function_t func, int argc, char **args) +@@ -838,7 +838,9 @@ grub_script_function_call (grub_script_function_t func, int argc, char **args) old_scope = scope; scope = &new_scope; @@ -40,7 +41,7 @@ function_return = 0; active_loops = loops; diff --git a/grub-core/script/function.c b/grub-core/script/function.c -index d36655e..3aad04b 100644 +index d36655e51..3aad04bf9 100644 --- a/grub-core/script/function.c +++ b/grub-core/script/function.c @@ -34,6 +34,7 @@ grub_script_function_create (struct grub_script_arg *functionname_arg, @@ -75,7 +76,7 @@ else { diff --git a/grub-core/script/parser.y b/grub-core/script/parser.y -index 4f0ab83..f80b86b 100644 +index 4f0ab8319..f80b86b6f 100644 --- a/grub-core/script/parser.y +++ b/grub-core/script/parser.y @@ -289,7 +289,8 @@ function: "function" "name" @@ -89,7 +90,7 @@ state->scripts = $3; diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h -index b382bcf..6c48e07 100644 +index b382bcf09..6c48e0751 100644 --- a/include/grub/script_sh.h +++ b/include/grub/script_sh.h @@ -361,6 +361,8 @@ struct grub_script_function diff -Nru grub2-2.02/debian/patches/0094-hfsplus-fix-two-more-overflows.patch grub2-2.02/debian/patches/0094-hfsplus-fix-two-more-overflows.patch --- grub2-2.02/debian/patches/0094-hfsplus-fix-two-more-overflows.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0094-hfsplus-fix-two-more-overflows.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From f77bef9531eaf93f1f967fda2c7e9c0a16435fa8 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sun, 19 Jul 2020 14:43:31 -0400 Subject: hfsplus: fix two more overflows @@ -13,10 +14,10 @@ grub-core/fs/hfsplus.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c -index f16323e..6a585b9 100644 ---- a/grub-core/fs/hfsplus.c -+++ b/grub-core/fs/hfsplus.c +Index: bionic-security/grub-core/fs/hfsplus.c +=================================================================== +--- bionic-security.orig/grub-core/fs/hfsplus.c ++++ bionic-security/grub-core/fs/hfsplus.c @@ -31,6 +31,7 @@ #include #include @@ -25,7 +26,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -475,8 +476,12 @@ grub_hfsplus_read_symlink (grub_fshelp_node_t node) +@@ -475,8 +476,12 @@ grub_hfsplus_read_symlink (grub_fshelp_n { char *symlink; grub_ssize_t numread; @@ -39,7 +40,7 @@ if (!symlink) return 0; -@@ -714,8 +719,8 @@ list_nodes (void *record, void *hook_arg) +@@ -714,8 +714,8 @@ list_nodes (void *record, void *hook_arg if (type == GRUB_FSHELP_UNKNOWN) return 0; diff -Nru grub2-2.02/debian/patches/0095-lvm-fix-two-more-potential-data-dependent-alloc-over.patch grub2-2.02/debian/patches/0095-lvm-fix-two-more-potential-data-dependent-alloc-over.patch --- grub2-2.02/debian/patches/0095-lvm-fix-two-more-potential-data-dependent-alloc-over.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0095-lvm-fix-two-more-potential-data-dependent-alloc-over.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 9fc5ac5172d7ceae3625258059d9e4b7c8baef76 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sun, 19 Jul 2020 15:48:20 -0400 Subject: lvm: fix two more potential data-dependent alloc overflows @@ -14,7 +15,7 @@ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c -index d1df640..d154f7c 100644 +index d1df640b3..d154f7c01 100644 --- a/grub-core/disk/lvm.c +++ b/grub-core/disk/lvm.c @@ -25,6 +25,7 @@ diff -Nru grub2-2.02/debian/patches/0096-efi-fix-some-malformed-device-path-arithmetic-errors.patch grub2-2.02/debian/patches/0096-efi-fix-some-malformed-device-path-arithmetic-errors.patch --- grub2-2.02/debian/patches/0096-efi-fix-some-malformed-device-path-arithmetic-errors.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0096-efi-fix-some-malformed-device-path-arithmetic-errors.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 3be69af50aa08c128d570ddf4acd8767115bbb7e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sun, 19 Jul 2020 16:53:27 -0400 Subject: efi: fix some malformed device path arithmetic errors. @@ -16,17 +17,17 @@ Signed-off-by: Peter Jones --- - grub-core/kern/efi/efi.c | 67 ++++++++++++++++++++++++++++++++------ - grub-core/loader/efi/chainloader.c | 19 +++++++++-- - grub-core/loader/i386/xnu.c | 9 ++--- - include/grub/efi/api.h | 14 +++++--- + grub-core/kern/efi/efi.c | 67 +++++++++++++++++++++++++----- + grub-core/loader/efi/chainloader.c | 19 ++++++++- + grub-core/loader/i386/xnu.c | 9 ++-- + include/grub/efi/api.h | 14 ++++--- 4 files changed, 88 insertions(+), 21 deletions(-) -diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index 2eff9cd..14ac19a 100644 ---- a/grub-core/kern/efi/efi.c -+++ b/grub-core/kern/efi/efi.c -@@ -320,7 +320,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) +Index: bionic-security/grub-core/kern/efi/efi.c +=================================================================== +--- bionic-security.orig/grub-core/kern/efi/efi.c ++++ bionic-security/grub-core/kern/efi/efi.c +@@ -320,7 +320,7 @@ grub_efi_get_filename (grub_efi_device_p dp = dp0; @@ -35,7 +36,7 @@ { grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); -@@ -330,9 +330,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) +@@ -330,9 +330,15 @@ grub_efi_get_filename (grub_efi_device_p if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE && subtype == GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE) { @@ -54,7 +55,7 @@ filesize += GRUB_MAX_UTF8_PER_UTF16 * len + 2; } -@@ -348,7 +354,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) +@@ -348,7 +354,7 @@ grub_efi_get_filename (grub_efi_device_p if (!name) return NULL; @@ -63,7 +64,7 @@ { grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); -@@ -363,8 +369,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) +@@ -363,8 +369,15 @@ grub_efi_get_filename (grub_efi_device_p *p++ = '/'; @@ -81,7 +82,7 @@ fp = (grub_efi_file_path_device_path_t *) dp; /* According to EFI spec Path Name is NULL terminated */ while (len > 0 && fp->path_name[len - 1] == 0) -@@ -430,7 +443,26 @@ grub_efi_duplicate_device_path (const grub_efi_device_path_t *dp) +@@ -430,7 +443,26 @@ grub_efi_duplicate_device_path (const gr ; p = GRUB_EFI_NEXT_DEVICE_PATH (p)) { @@ -109,7 +110,7 @@ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (p)) break; } -@@ -475,7 +507,7 @@ dump_vendor_path (const char *type, grub_efi_vendor_device_path_t *vendor) +@@ -475,7 +507,7 @@ dump_vendor_path (const char *type, grub void grub_efi_print_device_path (grub_efi_device_path_t *dp) { @@ -118,7 +119,7 @@ { grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); -@@ -876,7 +908,11 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1, +@@ -876,7 +908,11 @@ grub_efi_compare_device_paths (const gru /* Return non-zero. */ return 1; @@ -131,7 +132,7 @@ { grub_efi_uint8_t type1, type2; grub_efi_uint8_t subtype1, subtype2; -@@ -912,5 +948,16 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1, +@@ -912,5 +948,16 @@ grub_efi_compare_device_paths (const gru dp2 = (grub_efi_device_path_t *) ((char *) dp2 + len2); } @@ -148,11 +149,11 @@ + return 0; } -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 216cd7a..45b09dc 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c -@@ -125,6 +125,12 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, +Index: bionic-security/grub-core/loader/efi/chainloader.c +=================================================================== +--- bionic-security.orig/grub-core/loader/efi/chainloader.c ++++ bionic-security/grub-core/loader/efi/chainloader.c +@@ -125,6 +125,12 @@ copy_file_path (grub_efi_file_path_devic fp->header.type = GRUB_EFI_MEDIA_DEVICE_PATH_TYPE; fp->header.subtype = GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE; @@ -165,7 +166,7 @@ size = grub_utf8_to_utf16 (fp->path_name, len * GRUB_MAX_UTF16_PER_UTF8, (const grub_uint8_t *) str, len, 0); for (p = fp->path_name; p < fp->path_name + size; p++) -@@ -159,9 +165,18 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) +@@ -159,9 +165,18 @@ make_file_path (grub_efi_device_path_t * size = 0; d = dp; @@ -186,11 +187,11 @@ if ((GRUB_EFI_END_ENTIRE_DEVICE_PATH (d))) break; d = GRUB_EFI_NEXT_DEVICE_PATH (d); -diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c -index ee0eaad..672c743 100644 ---- a/grub-core/loader/i386/xnu.c -+++ b/grub-core/loader/i386/xnu.c -@@ -516,14 +516,15 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/i386/xnu.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/xnu.c ++++ bionic-security/grub-core/loader/i386/xnu.c +@@ -516,14 +516,15 @@ grub_cmd_devprop_load (grub_command_t cm devhead = buf; buf = devhead + 1; @@ -210,11 +211,11 @@ dev = grub_xnu_devprop_add_device (dpstart, (char *) buf - (char *) dpstart); -diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h -index 99ba068..952d78a 100644 ---- a/include/grub/efi/api.h -+++ b/include/grub/efi/api.h -@@ -635,6 +635,7 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t; +Index: bionic-security/include/grub/efi/api.h +=================================================================== +--- bionic-security.orig/include/grub/efi/api.h ++++ bionic-security/include/grub/efi/api.h +@@ -635,6 +635,7 @@ typedef struct grub_efi_device_path grub #define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f) #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype) #define GRUB_EFI_DEVICE_PATH_LENGTH(dp) ((dp)->length) @@ -222,7 +223,7 @@ /* The End of Device Path nodes. */ #define GRUB_EFI_END_DEVICE_PATH_TYPE (0xff & 0x7f) -@@ -643,13 +644,16 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t; +@@ -643,13 +644,16 @@ typedef struct grub_efi_device_path grub #define GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE 0x01 #define GRUB_EFI_END_ENTIRE_DEVICE_PATH(dp) \ diff -Nru grub2-2.02/debian/patches/0097-linuxefi-fail-kernel-validation-without-shim-protoco.patch grub2-2.02/debian/patches/0097-linuxefi-fail-kernel-validation-without-shim-protoco.patch --- grub2-2.02/debian/patches/0097-linuxefi-fail-kernel-validation-without-shim-protoco.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0097-linuxefi-fail-kernel-validation-without-shim-protoco.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 02fdac962effd9278bef85644072f91853f6ef9f Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 22 Jul 2020 11:31:43 +0100 Subject: linuxefi: fail kernel validation without shim protocol. @@ -12,16 +13,16 @@ Reported-by: Mathieu Trudel-Lapierre Signed-off-by: Dimitri John Ledkov --- - grub-core/loader/arm64/linux.c | 13 +++++++++---- + grub-core/loader/arm64/linux.c | 12 ++++++++---- grub-core/loader/efi/chainloader.c | 1 + grub-core/loader/efi/linux.c | 1 + grub-core/loader/i386/efi/linux.c | 2 +- - 4 files changed, 12 insertions(+), 5 deletions(-) + 4 files changed, 11 insertions(+), 5 deletions(-) -diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index 456523b..1a67d26 100644 ---- a/grub-core/loader/arm64/linux.c -+++ b/grub-core/loader/arm64/linux.c +Index: bionic-security/grub-core/loader/arm64/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/arm64/linux.c ++++ bionic-security/grub-core/loader/arm64/linux.c @@ -32,6 +32,7 @@ #include #include @@ -30,7 +31,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -298,11 +299,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -298,11 +299,15 @@ grub_cmd_linux (grub_command_t cmd __att grub_dprintf ("linux", "kernel @ %p\n", kernel_addr); @@ -50,11 +51,11 @@ } pe = (void *)((unsigned long)kernel_addr + lh.hdr_offset); -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 45b09dc..872d677 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c -@@ -1075,6 +1075,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/efi/chainloader.c +=================================================================== +--- bionic-security.orig/grub-core/loader/efi/chainloader.c ++++ bionic-security/grub-core/loader/efi/chainloader.c +@@ -1075,6 +1075,7 @@ grub_cmd_chainloader (grub_command_t cmd return 0; } @@ -62,10 +63,10 @@ grub_file_close (file); grub_device_close (dev); -diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c -index 7fe7201..d9b5380 100644 ---- a/grub-core/loader/efi/linux.c -+++ b/grub-core/loader/efi/linux.c +Index: bionic-security/grub-core/loader/efi/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/efi/linux.c ++++ bionic-security/grub-core/loader/efi/linux.c @@ -33,6 +33,7 @@ struct grub_efi_shim_lock }; typedef struct grub_efi_shim_lock grub_efi_shim_lock_t; @@ -74,11 +75,11 @@ int grub_linuxefi_secure_validate (void *data, grub_uint32_t size) { -diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 0ec3138..63e4d4d 100644 ---- a/grub-core/loader/i386/efi/linux.c -+++ b/grub-core/loader/i386/efi/linux.c -@@ -201,7 +201,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/i386/efi/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/efi/linux.c ++++ bionic-security/grub-core/loader/i386/efi/linux.c +@@ -201,7 +201,7 @@ grub_cmd_linux (grub_command_t cmd __att if (grub_efi_secure_boot ()) { rc = grub_linuxefi_secure_validate (kernel, filelen); diff -Nru grub2-2.02/debian/patches/0098-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch grub2-2.02/debian/patches/0098-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch --- grub2-2.02/debian/patches/0098-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0098-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 2009149faada143b6cdecacb12b06313c97b5926 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Wed, 22 Jul 2020 17:06:04 +0100 Subject: Fix a regression caused by "efi: fix some malformed device path @@ -16,13 +17,13 @@ Remove the bogus check, and also propagate errors from copy_file_path. --- - grub-core/loader/efi/chainloader.c | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) + grub-core/loader/efi/chainloader.c | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 872d677..715807a 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c +Index: bionic-security/grub-core/loader/efi/chainloader.c +=================================================================== +--- bionic-security.orig/grub-core/loader/efi/chainloader.c ++++ bionic-security/grub-core/loader/efi/chainloader.c @@ -115,7 +115,7 @@ grub_chainloader_boot (void) return grub_errno; } @@ -32,7 +33,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, const char *str, grub_efi_uint16_t len) { -@@ -125,12 +125,6 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, +@@ -125,12 +125,6 @@ copy_file_path (grub_efi_file_path_devic fp->header.type = GRUB_EFI_MEDIA_DEVICE_PATH_TYPE; fp->header.subtype = GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE; @@ -45,7 +46,7 @@ size = grub_utf8_to_utf16 (fp->path_name, len * GRUB_MAX_UTF16_PER_UTF8, (const grub_uint8_t *) str, len, 0); for (p = fp->path_name; p < fp->path_name + size; p++) -@@ -140,6 +134,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, +@@ -140,6 +134,7 @@ copy_file_path (grub_efi_file_path_devic /* File Path is NULL terminated */ fp->path_name[size++] = '\0'; fp->header.length = size * sizeof (grub_efi_char16_t) + sizeof (*fp); @@ -53,7 +54,7 @@ } static grub_efi_device_path_t * -@@ -197,13 +192,19 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) +@@ -197,13 +192,19 @@ make_file_path (grub_efi_device_path_t * /* Fill the file path for the directory. */ d = (grub_efi_device_path_t *) ((char *) file_path + ((char *) d - (char *) dp)); diff -Nru grub2-2.02/debian/patches/0100-chainloader-Avoid-a-double-free-when-validation-fail.patch grub2-2.02/debian/patches/0100-chainloader-Avoid-a-double-free-when-validation-fail.patch --- grub2-2.02/debian/patches/0100-chainloader-Avoid-a-double-free-when-validation-fail.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0100-chainloader-Avoid-a-double-free-when-validation-fail.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,16 +1,17 @@ +From 6ef40cdb663d37cfd9aa28fe2cfdcfa09058cc56 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Thu, 23 Jul 2020 14:02:17 +0100 Subject: chainloader: Avoid a double free when validation fails --- - grub-core/loader/efi/chainloader.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + grub-core/loader/efi/chainloader.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 715807a..c8b468e 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c -@@ -1064,6 +1064,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/efi/chainloader.c +=================================================================== +--- bionic-security.orig/grub-core/loader/efi/chainloader.c ++++ bionic-security/grub-core/loader/efi/chainloader.c +@@ -1064,6 +1064,7 @@ grub_cmd_chainloader (grub_command_t cmd if (rc > 0) { grub_file_close (file); @@ -18,7 +19,7 @@ grub_loader_set (grub_secureboot_chainloader_boot, grub_secureboot_chainloader_unload, 0); return 0; -@@ -1072,15 +1073,13 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -1072,15 +1073,13 @@ grub_cmd_chainloader (grub_command_t cmd { grub_load_and_start_image(boot_image); grub_file_close (file); diff -Nru grub2-2.02/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch grub2-2.02/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch --- grub2-2.02/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From f664dd35931496975f890ac99f5a550d0023622a Mon Sep 17 00:00:00 2001 From: Alexey Makhalov Date: Wed, 15 Jul 2020 06:42:37 +0000 Subject: relocator: Protect grub_relocator_alloc_chunk_addr() input args @@ -17,10 +18,10 @@ grub-core/loader/xnu.c | 11 +++++++---- 4 files changed, 31 insertions(+), 10 deletions(-) -diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index 43e5009..d09a9cf 100644 ---- a/grub-core/loader/i386/linux.c -+++ b/grub-core/loader/i386/linux.c +Index: bionic-security/grub-core/loader/i386/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/linux.c ++++ bionic-security/grub-core/loader/i386/linux.c @@ -36,6 +36,7 @@ #include #include @@ -45,10 +46,10 @@ if (err) return err; real_mode_mem = get_virtual_current_address (ch); -diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c -index b864e54..e1fb8e4 100644 ---- a/grub-core/loader/i386/pc/linux.c -+++ b/grub-core/loader/i386/pc/linux.c +Index: bionic-security/grub-core/loader/i386/pc/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/pc/linux.c ++++ bionic-security/grub-core/loader/i386/pc/linux.c @@ -36,6 +36,7 @@ #include #include @@ -57,7 +58,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -231,8 +232,12 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -231,8 +232,12 @@ grub_cmd_linux (grub_command_t cmd __att setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS; real_size = setup_sects << GRUB_DISK_SECTOR_BITS; @@ -72,10 +73,10 @@ if (! grub_linux_is_bzimage && GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size -diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c -index 3073f64..85b9334 100644 ---- a/grub-core/loader/i386/xen.c -+++ b/grub-core/loader/i386/xen.c +Index: bionic-security/grub-core/loader/i386/xen.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/xen.c ++++ bionic-security/grub-core/loader/i386/xen.c @@ -40,6 +40,7 @@ #include #include @@ -84,7 +85,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -635,6 +636,7 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), +@@ -635,6 +636,7 @@ grub_cmd_xen (grub_command_t cmd __attri grub_relocator_chunk_t ch; grub_addr_t kern_start; grub_addr_t kern_end; @@ -92,7 +93,7 @@ if (argc == 0) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); -@@ -699,8 +701,14 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), +@@ -699,8 +701,14 @@ grub_cmd_xen (grub_command_t cmd __attri xen_state.max_addr = ALIGN_UP (kern_end, PAGE_SIZE); @@ -109,10 +110,10 @@ if (err) goto fail; kern_chunk_src = get_virtual_current_address (ch); -diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c -index dc7d540..2bf0248 100644 ---- a/grub-core/loader/xnu.c -+++ b/grub-core/loader/xnu.c +Index: bionic-security/grub-core/loader/xnu.c +=================================================================== +--- bionic-security.orig/grub-core/loader/xnu.c ++++ bionic-security/grub-core/loader/xnu.c @@ -34,6 +34,7 @@ #include #include @@ -121,7 +122,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -59,15 +60,17 @@ grub_xnu_heap_malloc (int size, void **src, grub_addr_t *target) +@@ -59,15 +60,17 @@ grub_xnu_heap_malloc (int size, void **s { grub_err_t err; grub_relocator_chunk_t ch; diff -Nru grub2-2.02/debian/patches/0102-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch grub2-2.02/debian/patches/0102-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch --- grub2-2.02/debian/patches/0102-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0102-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b05589230726250444b4aad0e46dd79365454ed4 Mon Sep 17 00:00:00 2001 From: Alexey Makhalov Date: Wed, 8 Jul 2020 01:44:38 +0000 Subject: relocator: Protect grub_relocator_alloc_chunk_align() max_addr @@ -18,7 +19,7 @@ Signed-off-by: Alexey Makhalov Reviewed-by: Daniel Kiper --- - grub-core/lib/i386/relocator.c | 28 +++++++++++----------------- + grub-core/lib/i386/relocator.c | 28 ++++++++++---------------- grub-core/lib/mips/relocator.c | 6 ++---- grub-core/lib/powerpc/relocator.c | 6 ++---- grub-core/lib/x86_64/efi/relocator.c | 7 +++---- @@ -27,17 +28,17 @@ grub-core/loader/i386/pc/linux.c | 6 ++---- grub-core/loader/mips/linux.c | 9 +++------ grub-core/loader/multiboot.c | 2 +- - grub-core/loader/multiboot_elfxx.c | 10 +++++----- - grub-core/loader/multiboot_mbi2.c | 10 +++++----- + grub-core/loader/multiboot_elfxx.c | 10 ++++----- + grub-core/loader/multiboot_mbi2.c | 10 ++++----- grub-core/loader/xnu_resume.c | 2 +- - include/grub/relocator.h | 29 +++++++++++++++++++++++++++++ + include/grub/relocator.h | 29 +++++++++++++++++++++++++++ 13 files changed, 69 insertions(+), 58 deletions(-) -diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c -index 71dd4f0..34cbe83 100644 ---- a/grub-core/lib/i386/relocator.c -+++ b/grub-core/lib/i386/relocator.c -@@ -83,11 +83,10 @@ grub_relocator32_boot (struct grub_relocator *rel, +Index: bionic-security/grub-core/lib/i386/relocator.c +=================================================================== +--- bionic-security.orig/grub-core/lib/i386/relocator.c ++++ bionic-security/grub-core/lib/i386/relocator.c +@@ -83,11 +83,10 @@ grub_relocator32_boot (struct grub_reloc /* Specific memory range due to Global Descriptor Table for use by payload that we will store in returned chunk. The address range and preference are based on "THE LINUX/x86 BOOT PROTOCOL" specification. */ @@ -53,7 +54,7 @@ if (err) return err; -@@ -125,13 +124,10 @@ grub_relocator16_boot (struct grub_relocator *rel, +@@ -125,13 +124,10 @@ grub_relocator16_boot (struct grub_reloc grub_relocator_chunk_t ch; /* Put it higher than the byte it checks for A20 check. */ @@ -71,7 +72,7 @@ if (err) return err; -@@ -183,11 +179,9 @@ grub_relocator64_boot (struct grub_relocator *rel, +@@ -183,11 +179,9 @@ grub_relocator64_boot (struct grub_reloc void *relst; grub_relocator_chunk_t ch; @@ -86,11 +87,11 @@ if (err) return err; -diff --git a/grub-core/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c -index 9d5f49c..743b213 100644 ---- a/grub-core/lib/mips/relocator.c -+++ b/grub-core/lib/mips/relocator.c -@@ -120,10 +120,8 @@ grub_relocator32_boot (struct grub_relocator *rel, +Index: bionic-security/grub-core/lib/mips/relocator.c +=================================================================== +--- bionic-security.orig/grub-core/lib/mips/relocator.c ++++ bionic-security/grub-core/lib/mips/relocator.c +@@ -120,10 +120,8 @@ grub_relocator32_boot (struct grub_reloc unsigned i; grub_addr_t vtarget; @@ -103,11 +104,11 @@ GRUB_RELOCATOR_PREFERENCE_NONE, 0); if (err) return err; -diff --git a/grub-core/lib/powerpc/relocator.c b/grub-core/lib/powerpc/relocator.c -index bdf2b11..8ffb8b6 100644 ---- a/grub-core/lib/powerpc/relocator.c -+++ b/grub-core/lib/powerpc/relocator.c -@@ -115,10 +115,8 @@ grub_relocator32_boot (struct grub_relocator *rel, +Index: bionic-security/grub-core/lib/powerpc/relocator.c +=================================================================== +--- bionic-security.orig/grub-core/lib/powerpc/relocator.c ++++ bionic-security/grub-core/lib/powerpc/relocator.c +@@ -115,10 +115,8 @@ grub_relocator32_boot (struct grub_reloc unsigned i; grub_relocator_chunk_t ch; @@ -120,11 +121,11 @@ GRUB_RELOCATOR_PREFERENCE_NONE, 0); if (err) return err; -diff --git a/grub-core/lib/x86_64/efi/relocator.c b/grub-core/lib/x86_64/efi/relocator.c -index 3caef7a..7d200a1 100644 ---- a/grub-core/lib/x86_64/efi/relocator.c -+++ b/grub-core/lib/x86_64/efi/relocator.c -@@ -50,10 +50,9 @@ grub_relocator64_efi_boot (struct grub_relocator *rel, +Index: bionic-security/grub-core/lib/x86_64/efi/relocator.c +=================================================================== +--- bionic-security.orig/grub-core/lib/x86_64/efi/relocator.c ++++ bionic-security/grub-core/lib/x86_64/efi/relocator.c +@@ -50,10 +50,9 @@ grub_relocator64_efi_boot (struct grub_r * 64-bit relocator code may live above 4 GiB quite well. * However, I do not want ask for problems. Just in case. */ @@ -138,11 +139,11 @@ if (err) return err; -diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index d09a9cf..41e2a30 100644 ---- a/grub-core/loader/i386/linux.c -+++ b/grub-core/loader/i386/linux.c -@@ -232,9 +232,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align, +Index: bionic-security/grub-core/loader/i386/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/linux.c ++++ bionic-security/grub-core/loader/i386/linux.c +@@ -232,9 +232,8 @@ allocate_pages (grub_size_t prot_size, g for (; err && *align + 1 > min_align; (*align)--) { grub_errno = GRUB_ERR_NONE; @@ -154,11 +155,11 @@ prot_size, 1 << *align, GRUB_RELOCATOR_PREFERENCE_LOW, 1); -diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c -index fd7b41b..b10e7f7 100644 ---- a/grub-core/loader/i386/multiboot_mbi.c -+++ b/grub-core/loader/i386/multiboot_mbi.c -@@ -466,10 +466,9 @@ grub_multiboot_make_mbi (grub_uint32_t *target) +Index: bionic-security/grub-core/loader/i386/multiboot_mbi.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/multiboot_mbi.c ++++ bionic-security/grub-core/loader/i386/multiboot_mbi.c +@@ -466,10 +466,9 @@ grub_multiboot_make_mbi (grub_uint32_t * bufsize = grub_multiboot_get_mbi_size (); @@ -172,11 +173,11 @@ if (err) return err; ptrorig = get_virtual_current_address (ch); -diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c -index e1fb8e4..8308b27 100644 ---- a/grub-core/loader/i386/pc/linux.c -+++ b/grub-core/loader/i386/pc/linux.c -@@ -460,10 +460,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/i386/pc/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/i386/pc/linux.c ++++ bionic-security/grub-core/loader/i386/pc/linux.c +@@ -460,10 +460,8 @@ grub_cmd_initrd (grub_command_t cmd __at { grub_relocator_chunk_t ch; @@ -189,11 +190,11 @@ if (err) return err; initrd_chunk = get_virtual_current_address (ch); -diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c -index 5f383be..27c1db8 100644 ---- a/grub-core/loader/mips/linux.c -+++ b/grub-core/loader/mips/linux.c -@@ -434,12 +434,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/mips/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/mips/linux.c ++++ bionic-security/grub-core/loader/mips/linux.c +@@ -434,12 +434,9 @@ grub_cmd_initrd (grub_command_t cmd __at { grub_relocator_chunk_t ch; @@ -209,11 +210,11 @@ if (err) goto fail; -diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c -index fb044a6..5f2e59e 100644 ---- a/grub-core/loader/multiboot.c -+++ b/grub-core/loader/multiboot.c -@@ -391,7 +391,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), +Index: bionic-security/grub-core/loader/multiboot.c +=================================================================== +--- bionic-security.orig/grub-core/loader/multiboot.c ++++ bionic-security/grub-core/loader/multiboot.c +@@ -391,7 +391,7 @@ grub_cmd_module (grub_command_t cmd __at { grub_relocator_chunk_t ch; err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, @@ -222,66 +223,10 @@ size, MULTIBOOT_MOD_ALIGN, GRUB_RELOCATOR_PREFERENCE_NONE, 1); if (err) -diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c -index f331db7..ae343bc 100644 ---- a/grub-core/loader/multiboot_elfxx.c -+++ b/grub-core/loader/multiboot_elfxx.c -@@ -104,10 +104,10 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) - if (load_size > mld->max_addr || mld->min_addr > mld->max_addr - load_size) - return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); - -- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, -- mld->min_addr, mld->max_addr - load_size, -- load_size, mld->align ? mld->align : 1, -- mld->preference, mld->avoid_efi_boot_services); -+ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch, -+ mld->min_addr, mld->max_addr, -+ load_size, mld->align ? mld->align : 1, -+ mld->preference, mld->avoid_efi_boot_services); - } - else - err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, &ch, -@@ -239,7 +239,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) - continue; - - err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, 0, -- (0xffffffff - sh->sh_size) + 1, -+ UP_TO_TOP32 (sh->sh_size), - sh->sh_size, sh->sh_addralign, - GRUB_RELOCATOR_PREFERENCE_NONE, - mld->avoid_efi_boot_services); -diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c -index b0679a9..0756a73 100644 ---- a/grub-core/loader/multiboot_mbi2.c -+++ b/grub-core/loader/multiboot_mbi2.c -@@ -295,10 +295,10 @@ grub_multiboot_load (grub_file_t file, const char *filename) - return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); - } - -- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, -- mld.min_addr, mld.max_addr - code_size, -- code_size, mld.align ? mld.align : 1, -- mld.preference, keep_bs); -+ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch, -+ mld.min_addr, mld.max_addr, -+ code_size, mld.align ? mld.align : 1, -+ mld.preference, keep_bs); - } - else - err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, -@@ -744,7 +744,7 @@ grub_multiboot_make_mbi (grub_uint32_t *target) - COMPILE_TIME_ASSERT (MULTIBOOT_TAG_ALIGN % sizeof (grub_properly_aligned_t) == 0); - - err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, -- 0, 0xffffffff - bufsize, -+ 0, UP_TO_TOP32 (bufsize), - bufsize, MULTIBOOT_TAG_ALIGN, - GRUB_RELOCATOR_PREFERENCE_NONE, 1); - if (err) -diff --git a/grub-core/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c -index 534a744..9911955 100644 ---- a/grub-core/loader/xnu_resume.c -+++ b/grub-core/loader/xnu_resume.c +Index: bionic-security/grub-core/loader/xnu_resume.c +=================================================================== +--- bionic-security.orig/grub-core/loader/xnu_resume.c ++++ bionic-security/grub-core/loader/xnu_resume.c @@ -129,7 +129,7 @@ grub_xnu_resume (char *imagename) { grub_relocator_chunk_t ch; @@ -291,11 +236,11 @@ hibhead.image_size, GRUB_XNU_PAGESIZE, GRUB_RELOCATOR_PREFERENCE_NONE, 0); -diff --git a/include/grub/relocator.h b/include/grub/relocator.h -index 24d8672..1b3bdd9 100644 ---- a/include/grub/relocator.h -+++ b/include/grub/relocator.h -@@ -49,6 +49,35 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, +Index: bionic-security/include/grub/relocator.h +=================================================================== +--- bionic-security.orig/include/grub/relocator.h ++++ bionic-security/include/grub/relocator.h +@@ -49,6 +49,35 @@ grub_relocator_alloc_chunk_align (struct int preference, int avoid_efi_boot_services); @@ -331,3 +276,59 @@ #define GRUB_RELOCATOR_PREFERENCE_NONE 0 #define GRUB_RELOCATOR_PREFERENCE_LOW 1 #define GRUB_RELOCATOR_PREFERENCE_HIGH 2 +Index: bionic-security/grub-core/loader/multiboot_elfxx.c +=================================================================== +--- bionic-security.orig/grub-core/loader/multiboot_elfxx.c ++++ bionic-security/grub-core/loader/multiboot_elfxx.c +@@ -104,10 +104,10 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi + if (load_size > mld->max_addr || mld->min_addr > mld->max_addr - load_size) + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, +- mld->min_addr, mld->max_addr - load_size, +- load_size, mld->align ? mld->align : 1, +- mld->preference, mld->avoid_efi_boot_services); ++ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch, ++ mld->min_addr, mld->max_addr, ++ load_size, mld->align ? mld->align : 1, ++ mld->preference, mld->avoid_efi_boot_services); + } + else + err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, &ch, +@@ -239,7 +239,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi + continue; + + err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, 0, +- (0xffffffff - sh->sh_size) + 1, ++ UP_TO_TOP32 (sh->sh_size), + sh->sh_size, sh->sh_addralign, + GRUB_RELOCATOR_PREFERENCE_NONE, + mld->avoid_efi_boot_services); +Index: bionic-security/grub-core/loader/multiboot_mbi2.c +=================================================================== +--- bionic-security.orig/grub-core/loader/multiboot_mbi2.c ++++ bionic-security/grub-core/loader/multiboot_mbi2.c +@@ -295,10 +295,10 @@ grub_multiboot_load (grub_file_t file, c + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + } + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, +- mld.min_addr, mld.max_addr - code_size, +- code_size, mld.align ? mld.align : 1, +- mld.preference, keep_bs); ++ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch, ++ mld.min_addr, mld.max_addr, ++ code_size, mld.align ? mld.align : 1, ++ mld.preference, keep_bs); + } + else + err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, +@@ -744,7 +744,7 @@ grub_multiboot_make_mbi (grub_uint32_t * + COMPILE_TIME_ASSERT (MULTIBOOT_TAG_ALIGN % sizeof (grub_properly_aligned_t) == 0); + + err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, +- 0, 0xffffffff - bufsize, ++ 0, UP_TO_TOP32 (bufsize), + bufsize, MULTIBOOT_TAG_ALIGN, + GRUB_RELOCATOR_PREFERENCE_NONE, 1); + if (err) diff -Nru grub2-2.02/debian/patches/0103-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch grub2-2.02/debian/patches/0103-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch --- grub2-2.02/debian/patches/0103-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0103-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 845260829f3de44b93f5dc02c13946b7517acbe0 Mon Sep 17 00:00:00 2001 From: Alexey Makhalov Date: Fri, 17 Jul 2020 05:17:26 +0000 Subject: relocator: Fix grub_relocator_alloc_chunk_align() top memory @@ -25,7 +26,7 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c -index 5847aac..f2c1944 100644 +index 5847aac36..f2c1944c2 100644 --- a/grub-core/lib/relocator.c +++ b/grub-core/lib/relocator.c @@ -1386,8 +1386,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, diff -Nru grub2-2.02/debian/patches/0104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch grub2-2.02/debian/patches/0104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch --- grub2-2.02/debian/patches/0104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0104-linux-loader-avoid-overflow-on-initrd-size-calculati.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 30fb91b6b774e71d1f4e9dbc0fdda61ca6267bd4 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 24 Jul 2020 13:57:27 -0400 Subject: linux loader: avoid overflow on initrd size calculation @@ -8,7 +9,7 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c -index be6fa0f..2305281 100644 +index 471b214d6..25624ebc1 100644 --- a/grub-core/loader/linux.c +++ b/grub-core/loader/linux.c @@ -151,8 +151,8 @@ grub_initrd_init (int argc, char *argv[], diff -Nru grub2-2.02/debian/patches/0105-linux-Fix-integer-overflows-in-initrd-size-handling.patch grub2-2.02/debian/patches/0105-linux-Fix-integer-overflows-in-initrd-size-handling.patch --- grub2-2.02/debian/patches/0105-linux-Fix-integer-overflows-in-initrd-size-handling.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0105-linux-Fix-integer-overflows-in-initrd-size-handling.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 61c38b585d431e862de2aac5a989272e9c9d1ed1 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 25 Jul 2020 12:15:37 +0100 Subject: linux: Fix integer overflows in initrd size handling @@ -9,13 +10,13 @@ Signed-off-by: Colin Watson Reviewed-by: Jan Setje-Eilers --- - grub-core/loader/linux.c | 74 +++++++++++++++++++++++++++++++++++------------- + grub-core/loader/linux.c | 74 +++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 20 deletions(-) -diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c -index 2305281..84a0af4 100644 ---- a/grub-core/loader/linux.c -+++ b/grub-core/loader/linux.c +Index: bionic-security/grub-core/loader/linux.c +=================================================================== +--- bionic-security.orig/grub-core/loader/linux.c ++++ bionic-security/grub-core/loader/linux.c @@ -4,6 +4,7 @@ #include #include @@ -41,7 +42,7 @@ while (1) { for (cb = ce; *cb == '/'; cb++); -@@ -130,14 +131,22 @@ insert_dir (const char *name, struct dir **root, +@@ -130,14 +131,22 @@ insert_dir (const char *name, struct dir ptr = make_header (ptr, name, ce - name, 040777, 0); } @@ -67,7 +68,7 @@ } grub_err_t -@@ -173,27 +182,34 @@ grub_initrd_init (int argc, char *argv[], +@@ -173,27 +182,34 @@ grub_initrd_init (int argc, char *argv[] eptr = grub_strchr (ptr, ':'); if (eptr) { @@ -111,7 +112,7 @@ free_dir (root); root = 0; newc = 0; -@@ -208,19 +224,29 @@ grub_initrd_init (int argc, char *argv[], +@@ -208,19 +224,29 @@ grub_initrd_init (int argc, char *argv[] initrd_ctx->nfiles++; initrd_ctx->components[i].size = grub_file_size (initrd_ctx->components[i].file); @@ -144,7 +145,7 @@ } grub_size_t -@@ -261,8 +287,16 @@ grub_initrd_load (struct grub_linux_initrd_context *initrd_ctx, +@@ -261,8 +287,16 @@ grub_initrd_load (struct grub_linux_init if (initrd_ctx->components[i].newc_name) { diff -Nru grub2-2.02/debian/patches/0106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch grub2-2.02/debian/patches/0106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch --- grub2-2.02/debian/patches/0106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/0106-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 7cad64594740991e88ae69f0576c4c639f56b67b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 27 Jul 2020 14:22:12 +0100 Subject: efilinux: Fix integer overflows in grub_cmd_initrd @@ -14,10 +15,10 @@ 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 63e4d4d..26e8ac0 100644 +index e357bf67c..381459ce0 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c -@@ -29,6 +29,7 @@ +@@ -28,6 +28,7 @@ #include #include #include @@ -25,7 +26,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -95,7 +96,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), +@@ -94,7 +95,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), goto fail; } @@ -34,7 +35,7 @@ if (!files) goto fail; -@@ -106,7 +107,11 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), +@@ -104,7 +105,11 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), if (! files[i]) goto fail; nfiles++; diff -Nru grub2-2.02/debian/patches/add-an-auto-nvram-option-to-grub-install.patch grub2-2.02/debian/patches/add-an-auto-nvram-option-to-grub-install.patch --- grub2-2.02/debian/patches/add-an-auto-nvram-option-to-grub-install.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/add-an-auto-nvram-option-to-grub-install.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,5 +1,5 @@ -From: =?utf-8?q?=C5=81ukasz_=27sil2100=27_Zemczak?= - +From 1696f83780575139eb0ad801a311c947028278f2 Mon Sep 17 00:00:00 2001 +From: Łukasz 'sil2100' Zemczak Date: Fri, 20 Apr 2018 19:27:37 +0200 Subject: Add an auto-nvram option to grub-install for auto-detecting NVRAM access @@ -18,7 +18,7 @@ 5 files changed, 44 insertions(+), 14 deletions(-) diff --git a/grub-core/osdep/basic/no_platform.c b/grub-core/osdep/basic/no_platform.c -index d76c34c..b39e97f 100644 +index d76c34c14..b39e97f48 100644 --- a/grub-core/osdep/basic/no_platform.c +++ b/grub-core/osdep/basic/no_platform.c @@ -25,7 +25,7 @@ @@ -41,7 +41,7 @@ grub_util_error ("%s", _("no EFI routines are available for your platform")); } diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c -index f9c376c..04d0d8c 100644 +index f9c376c35..04d0d8c42 100644 --- a/grub-core/osdep/unix/platform.c +++ b/grub-core/osdep/unix/platform.c @@ -134,7 +134,8 @@ grub_install_remove_efi_entries_by_distributor (const char *efi_distributor) @@ -95,7 +95,7 @@ if (!is_prep) { diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c -index c30025b..1c96959 100644 +index c30025b13..1c9695970 100644 --- a/grub-core/osdep/windows/platform.c +++ b/grub-core/osdep/windows/platform.c @@ -210,7 +210,8 @@ set_efi_variable_bootn (grub_uint16_t n, void *in, grub_size_t len) @@ -118,7 +118,7 @@ grub_util_error ("%s", _("no IEEE1275 routines are available for your platform")); } diff --git a/include/grub/util/install.h b/include/grub/util/install.h -index 58648e2..1151883 100644 +index 58648e209..115188399 100644 --- a/include/grub/util/install.h +++ b/include/grub/util/install.h @@ -212,11 +212,12 @@ grub_install_get_default_powerpc_machtype (void); @@ -137,7 +137,7 @@ void grub_install_sgi_setup (const char *install_device, diff --git a/util/grub-install.c b/util/grub-install.c -index 2214e45..b8f9110 100644 +index 2214e4549..b8f91101d 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -59,6 +59,7 @@ static int removable = 0; diff -Nru grub2-2.02/debian/patches/blacklist_1440x900x32.patch grub2-2.02/debian/patches/blacklist_1440x900x32.patch --- grub2-2.02/debian/patches/blacklist_1440x900x32.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/blacklist_1440x900x32.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 5ddc1ba27f1dd87fae059f7f395d0e8e78f334db Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:11 +0000 Subject: Blacklist 1440x900x32 from VBE preferred mode handling @@ -12,7 +13,7 @@ 1 file changed, 9 insertions(+) diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c -index b7f9119..4b1bd7d 100644 +index b7f911926..4b1bd7d5e 100644 --- a/grub-core/video/i386/pc/vbe.c +++ b/grub-core/video/i386/pc/vbe.c @@ -1054,6 +1054,15 @@ grub_video_vbe_setup (unsigned int width, unsigned int height, diff -Nru grub2-2.02/debian/patches/bootp_new_net_bootp6_command.patch grub2-2.02/debian/patches/bootp_new_net_bootp6_command.patch --- grub2-2.02/debian/patches/bootp_new_net_bootp6_command.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/bootp_new_net_bootp6_command.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From ca498f0988f6fb5607a26838ef2e763361b8c0b3 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 27 Oct 2016 17:41:04 -0400 Subject: bootp: New net_bootp6 command @@ -16,7 +17,7 @@ 3 files changed, 1018 insertions(+), 1 deletion(-) diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c -index 9e2fdb7..172528e 100644 +index 9e2fdb795..172528ee8 100644 --- a/grub-core/net/bootp.c +++ b/grub-core/net/bootp.c @@ -24,6 +24,98 @@ @@ -968,7 +969,7 @@ + grub_unregister_command (cmd_bootp6); } diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c -index aba4f89..59970ab 100644 +index aba4f8908..59970ab74 100644 --- a/grub-core/net/ip.c +++ b/grub-core/net/ip.c @@ -238,6 +238,45 @@ handle_dgram (struct grub_net_buff *nb, @@ -1018,7 +1019,7 @@ { const struct grub_net_bootp_packet *bootp; diff --git a/include/grub/net.h b/include/grub/net.h -index ccc169c..38a3973 100644 +index ccc169c2d..38a3973f3 100644 --- a/include/grub/net.h +++ b/include/grub/net.h @@ -442,6 +442,66 @@ struct grub_net_bootp_packet diff -Nru grub2-2.02/debian/patches/bootp_process_dhcpack_http_boot.patch grub2-2.02/debian/patches/bootp_process_dhcpack_http_boot.patch --- grub2-2.02/debian/patches/bootp_process_dhcpack_http_boot.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/bootp_process_dhcpack_http_boot.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From f25b753c73e876cf6e3244220126fdaff9542796 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 27 Oct 2016 17:42:19 -0400 Subject: bootp: Add processing DHCPACK packet from HTTP Boot @@ -23,7 +24,7 @@ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c -index 172528e..de9239c 100644 +index 172528ee8..de9239c16 100644 --- a/grub-core/net/bootp.c +++ b/grub-core/net/bootp.c @@ -207,6 +207,11 @@ parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask) @@ -115,7 +116,7 @@ inter->dhcp_ack = grub_malloc (size); diff --git a/include/grub/net.h b/include/grub/net.h -index 38a3973..e4bf678 100644 +index 38a3973f3..e4bf678db 100644 --- a/include/grub/net.h +++ b/include/grub/net.h @@ -517,6 +517,7 @@ enum diff -Nru grub2-2.02/debian/patches/bufio_sensible_block_sizes.patch grub2-2.02/debian/patches/bufio_sensible_block_sizes.patch --- grub2-2.02/debian/patches/bufio_sensible_block_sizes.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/bufio_sensible_block_sizes.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From cf16ebfe8998aec9ff567581bda39243e83c26f9 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 2 Feb 2018 10:26:34 -0500 Subject: Don't use arbitrary file sizes as block sizes in bufio @@ -25,7 +26,7 @@ 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/grub-core/io/bufio.c b/grub-core/io/bufio.c -index 2243827..99953cc 100644 +index 22438277d..99953ccfa 100644 --- a/grub-core/io/bufio.c +++ b/grub-core/io/bufio.c @@ -57,9 +57,8 @@ grub_bufio_open (grub_file_t io, int size) diff -Nru grub2-2.02/debian/patches/cherry-unix-exec-avoid-atexit-handlers-when-child-exits.patch grub2-2.02/debian/patches/cherry-unix-exec-avoid-atexit-handlers-when-child-exits.patch --- grub2-2.02/debian/patches/cherry-unix-exec-avoid-atexit-handlers-when-child-exits.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/cherry-unix-exec-avoid-atexit-handlers-when-child-exits.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From e75cf4a58b5eaf482804e5e1b2cc7d4399df350e Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 28 Aug 2017 20:57:19 +0200 Subject: [PATCH] unix exec: avoid atexit handlers when child exits @@ -28,7 +29,7 @@ 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grub-core/osdep/unix/exec.c b/grub-core/osdep/unix/exec.c -index 935ff12..db3259f 100644 +index 935ff120eb..db3259f650 100644 --- a/grub-core/osdep/unix/exec.c +++ b/grub-core/osdep/unix/exec.c @@ -99,7 +99,7 @@ grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file, @@ -67,3 +68,6 @@ } waitpid (pid, &status, 0); if (!WIFEXITED (status)) +-- +2.27.0 + diff -Nru grub2-2.02/debian/patches/core_in_fs.patch grub2-2.02/debian/patches/core_in_fs.patch --- grub2-2.02/debian/patches/core_in_fs.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/core_in_fs.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a252840b98e8b67294738f197286d550d67b60f0 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:51 +0000 Subject: Write marker if core.img was written to filesystem @@ -10,7 +11,7 @@ 1 file changed, 8 insertions(+) diff --git a/util/setup.c b/util/setup.c -index 8aa5a39..3b5c46f 100644 +index 8aa5a39a7..3b5c46fde 100644 --- a/util/setup.c +++ b/util/setup.c @@ -58,6 +58,8 @@ diff -Nru grub2-2.02/debian/patches/default_grub_d.patch grub2-2.02/debian/patches/default_grub_d.patch --- grub2-2.02/debian/patches/default_grub_d.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/default_grub_d.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 95457c52e37eb1097197935bd00d5fc01ee2fd17 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:10 +0000 Subject: Read /etc/default/grub.d/*.cfg after /etc/default/grub @@ -13,7 +14,7 @@ 2 files changed, 98 insertions(+), 21 deletions(-) diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c -index 65effa9..5478030 100644 +index 65effa9f3..5478030fd 100644 --- a/grub-core/osdep/unix/config.c +++ b/grub-core/osdep/unix/config.c @@ -24,6 +24,8 @@ @@ -177,7 +178,7 @@ + free (cfgdir); } diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index 99ba7ac..b4f0011 100644 +index 99ba7acba..b4f0011b5 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -157,6 +157,11 @@ fi diff -Nru grub2-2.02/debian/patches/disable_floppies.patch grub2-2.02/debian/patches/disable_floppies.patch --- grub2-2.02/debian/patches/disable_floppies.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/disable_floppies.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From deb91a47c0bff0e8b8c06dc0d3ed5c6ac2795ae2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:54 +0000 Subject: Disable use of floppy devices @@ -12,7 +13,7 @@ 1 file changed, 12 insertions(+) diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c -index 87e3e25..d66e12d 100644 +index 87e3e2512..d66e12d85 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -532,6 +532,18 @@ read_device_map (const char *dev_map) diff -Nru grub2-2.02/debian/patches/dont-fail-efi-warnings.patch grub2-2.02/debian/patches/dont-fail-efi-warnings.patch --- grub2-2.02/debian/patches/dont-fail-efi-warnings.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/dont-fail-efi-warnings.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From fad34e0b52fe68cc712e9a2bfb65ee237ec9db9e Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 1 Nov 2017 17:03:36 -0400 Subject: Don't fail build on some warnings we know might show up building @@ -25,7 +26,7 @@ 1 file changed, 2 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index e3662bb..208b8c1 100644 +index e3662bb03..208b8c136 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1747,6 +1747,7 @@ module = { diff -Nru grub2-2.02/debian/patches/dpkg_version_comparison.patch grub2-2.02/debian/patches/dpkg_version_comparison.patch --- grub2-2.02/debian/patches/dpkg_version_comparison.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/dpkg_version_comparison.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 341bf4869788af50fe3756b268ef9a517f01e456 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Mon, 13 Jan 2014 12:12:52 +0000 Subject: Improve handling of Debian kernel version numbers @@ -11,7 +12,7 @@ 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 60b31ca..3a4684e 100644 +index 60b31cadd..3a4684e78 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -238,8 +238,9 @@ version_test_numeric () diff -Nru grub2-2.02/debian/patches/efinet_set_dns_from_uefi_proto.patch grub2-2.02/debian/patches/efinet_set_dns_from_uefi_proto.patch --- grub2-2.02/debian/patches/efinet_set_dns_from_uefi_proto.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/efinet_set_dns_from_uefi_proto.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 73669fe28996544ce6dfa0234583eef2f80342cd Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 27 Oct 2016 17:43:21 -0400 Subject: efinet: Setting DNS server from UEFI protocol @@ -34,7 +35,7 @@ 2 files changed, 239 insertions(+) diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index 2d3b00f..82a28fb 100644 +index 2d3b00f0e..82a28fb6e 100644 --- a/grub-core/net/drivers/efi/efinet.c +++ b/grub-core/net/drivers/efi/efinet.c @@ -30,6 +30,8 @@ GRUB_MOD_LICENSE ("GPLv3+"); @@ -243,7 +244,7 @@ } diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h -index d5a1256..99ba068 100644 +index d5a12569b..99ba068e3 100644 --- a/include/grub/efi/api.h +++ b/include/grub/efi/api.h @@ -334,6 +334,16 @@ diff -Nru grub2-2.02/debian/patches/efinet_set_network_from_uefi_devpath.patch grub2-2.02/debian/patches/efinet_set_network_from_uefi_devpath.patch --- grub2-2.02/debian/patches/efinet_set_network_from_uefi_devpath.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/efinet_set_network_from_uefi_devpath.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From bab191978eb3f3c2e69f1cdae6291f757a329942 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 27 Oct 2016 17:43:05 -0400 Subject: efinet: Setting network from UEFI device path @@ -33,7 +34,7 @@ 2 files changed, 270 insertions(+), 9 deletions(-) diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index fc90415..2d3b00f 100644 +index fc90415f2..2d3b00f0e 100644 --- a/grub-core/net/drivers/efi/efinet.c +++ b/grub-core/net/drivers/efi/efinet.c @@ -23,6 +23,7 @@ @@ -357,7 +358,7 @@ } } diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h -index 92f9b5a..d5a1256 100644 +index 92f9b5a6f..d5a12569b 100644 --- a/include/grub/efi/api.h +++ b/include/grub/efi/api.h @@ -825,6 +825,8 @@ struct grub_efi_ipv4_device_path diff -Nru grub2-2.02/debian/patches/efinet_uefi_ipv6_pxe_support.patch grub2-2.02/debian/patches/efinet_uefi_ipv6_pxe_support.patch --- grub2-2.02/debian/patches/efinet_uefi_ipv6_pxe_support.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/efinet_uefi_ipv6_pxe_support.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From d34febd5a0b73132e759a950eee6f80c894d7f88 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 27 Oct 2016 17:41:21 -0400 Subject: efinet: UEFI IPv6 PXE support @@ -16,7 +17,7 @@ 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index 5388f95..fc90415 100644 +index 5388f952b..fc90415f2 100644 --- a/grub-core/net/drivers/efi/efinet.c +++ b/grub-core/net/drivers/efi/efinet.c @@ -378,11 +378,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, @@ -51,7 +52,7 @@ } } diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h -index c7c9f0e..92f9b5a 100644 +index c7c9f0e1d..92f9b5a6f 100644 --- a/include/grub/efi/api.h +++ b/include/grub/efi/api.h @@ -1452,14 +1452,67 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output diff -Nru grub2-2.02/debian/patches/ext4_feature_encrypt.patch grub2-2.02/debian/patches/ext4_feature_encrypt.patch --- grub2-2.02/debian/patches/ext4_feature_encrypt.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ext4_feature_encrypt.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 192e9402135f52e0f6ed29338ca23947c091cd1b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 29 Jun 2017 13:27:49 +0000 Subject: Allow GRUB to mount ext2/3/4 filesystems that have the encryption @@ -35,7 +36,7 @@ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c -index cdce63b..b8ad75a 100644 +index cdce63bcc..b8ad75a0f 100644 --- a/grub-core/fs/ext2.c +++ b/grub-core/fs/ext2.c @@ -102,6 +102,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); @@ -104,7 +105,7 @@ grub_free (fdiro); diff --git a/tests/ext234_test.in b/tests/ext234_test.in -index c986960..5f45536 100644 +index c986960a8..5f4553607 100644 --- a/tests/ext234_test.in +++ b/tests/ext234_test.in @@ -30,3 +30,4 @@ fi @@ -113,7 +114,7 @@ "@builddir@/grub-fs-tester" ext4_metabg +"@builddir@/grub-fs-tester" ext4_encrypt diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in -index 2337771..5219aa8 100644 +index 2337771a1..5219aa8b4 100644 --- a/tests/util/grub-fs-tester.in +++ b/tests/util/grub-fs-tester.in @@ -135,6 +135,12 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE + diff -Nru grub2-2.02/debian/patches/gettext_quiet.patch grub2-2.02/debian/patches/gettext_quiet.patch --- grub2-2.02/debian/patches/gettext_quiet.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/gettext_quiet.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 56c88e431207238935aee7d7245a458ddb21e3d2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:02 +0000 Subject: Silence error messages when translations are unavailable @@ -12,7 +13,7 @@ 1 file changed, 5 insertions(+) diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c -index 4880cef..3098e89 100644 +index 4880cefe3..3098e8918 100644 --- a/grub-core/gettext/gettext.c +++ b/grub-core/gettext/gettext.c @@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx, diff -Nru grub2-2.02/debian/patches/gfxpayload_dynamic.patch grub2-2.02/debian/patches/gfxpayload_dynamic.patch --- grub2-2.02/debian/patches/gfxpayload_dynamic.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/gfxpayload_dynamic.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a232bab1cd56383c341f638b4211e236b6f57756 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 13 Jan 2014 12:13:29 +0000 Subject: Add configure option to enable gfxpayload=keep dynamically @@ -20,7 +21,7 @@ create mode 100644 grub-core/commands/i386/pc/hwmatch.c diff --git a/configure.ac b/configure.ac -index e508f9c..7f14313 100644 +index e508f9c43..7f1431352 100644 --- a/configure.ac +++ b/configure.ac @@ -1852,6 +1852,17 @@ else @@ -42,7 +43,7 @@ AC_SUBST([FONT_SOURCE]) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 50c555e..e3662bb 100644 +index 50c555e43..e3662bb03 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -890,6 +890,15 @@ module = { @@ -63,7 +64,7 @@ common = commands/keystatus.c; diff --git a/grub-core/commands/i386/pc/hwmatch.c b/grub-core/commands/i386/pc/hwmatch.c new file mode 100644 -index 0000000..c9f7c9f +index 000000000..c9f7c9f19 --- /dev/null +++ b/grub-core/commands/i386/pc/hwmatch.c @@ -0,0 +1,146 @@ @@ -214,7 +215,7 @@ + grub_unregister_command (cmd); +} diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 0f8a168..2983b51 100644 +index 0f8a16837..2983b515f 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -23,6 +23,7 @@ datarootdir="@datarootdir@" diff -Nru grub2-2.02/debian/patches/gfxpayload_keep_default.patch grub2-2.02/debian/patches/gfxpayload_keep_default.patch --- grub2-2.02/debian/patches/gfxpayload_keep_default.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/gfxpayload_keep_default.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 53891f805e34eb859636d5c28cf2f35433564756 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:57 +0000 Subject: Disable gfxpayload=keep by default @@ -22,7 +23,7 @@ 1 file changed, 4 deletions(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index de9044c..c34d470 100644 +index de9044c7f..c34d470c9 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -104,10 +104,6 @@ linux_entry () diff -Nru grub2-2.02/debian/patches/grub.cfg_400.patch grub2-2.02/debian/patches/grub.cfg_400.patch --- grub2-2.02/debian/patches/grub.cfg_400.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub.cfg_400.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 5b2df103b96325d7d9ae4b4d05af3d5c31c78bd0 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:55 +0000 Subject: Make grub.cfg world-readable if it contains no passwords @@ -8,7 +9,7 @@ 1 file changed, 4 insertions(+) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index f8496d2..54fbe52 100644 +index f8496d28b..54fbe5288 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -265,6 +265,10 @@ for i in "${grub_mkconfig_dir}"/* ; do diff -Nru grub2-2.02/debian/patches/grub-install-backup-and-restore.patch grub2-2.02/debian/patches/grub-install-backup-and-restore.patch --- grub2-2.02/debian/patches/grub-install-backup-and-restore.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub-install-backup-and-restore.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 229c7f88463e2ae9fbb891a286cba50b580f7bad Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 19 Aug 2020 01:49:09 +0100 Subject: grub-install: Add backup and restore @@ -23,14 +24,14 @@ Patch-Name: grub-install-backup-and-restore.patch --- configure.ac | 2 +- - util/grub-install-common.c | 105 ++++++++++++++++++++++++++++++++++++++------- + util/grub-install-common.c | 105 +++++++++++++++++++++++++++++++------ 2 files changed, 91 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac -index cd1f498..3fbd7b0 100644 +index 1819188f9f..6a88b9b0c0 100644 --- a/configure.ac +++ b/configure.ac -@@ -387,7 +387,7 @@ else +@@ -420,7 +420,7 @@ else fi # Check for functions and headers. @@ -40,10 +41,10 @@ # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation diff --git a/util/grub-install-common.c b/util/grub-install-common.c -index 0fbfca2..99443e5 100644 +index 447504d3f4..a883b6daef 100644 --- a/util/grub-install-common.c +++ b/util/grub-install-common.c -@@ -179,38 +179,113 @@ grub_install_mkdir_p (const char *dst) +@@ -185,38 +185,113 @@ grub_install_mkdir_p (const char *dst) free (t); } diff -Nru grub2-2.02/debian/patches/grub-install-efibootmgr-check.patch grub2-2.02/debian/patches/grub-install-efibootmgr-check.patch --- grub2-2.02/debian/patches/grub-install-efibootmgr-check.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub-install-efibootmgr-check.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 92d0d274bff65df5347931f3f72905c89da0f44c Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Mon, 30 Jan 2017 19:04:51 +0000 Subject: Make grub-install check for errors from efibootmgr @@ -27,7 +28,7 @@ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c -index 28cb37e..f9c376c 100644 +index 28cb37e15..f9c376c35 100644 --- a/grub-core/osdep/unix/platform.c +++ b/grub-core/osdep/unix/platform.c @@ -78,19 +78,20 @@ get_ofpathname (const char *dev) @@ -122,7 +123,7 @@ void diff --git a/include/grub/util/install.h b/include/grub/util/install.h -index 9f517a1..58648e2 100644 +index 9f517a1bb..58648e209 100644 --- a/include/grub/util/install.h +++ b/include/grub/util/install.h @@ -209,7 +209,7 @@ grub_install_get_default_x86_platform (void); @@ -135,7 +136,7 @@ const char *efifile_path, const char *efi_distributor); diff --git a/util/grub-install.c b/util/grub-install.c -index 333d55e0..2214e45 100644 +index 333d55e07..2214e4549 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -2017,9 +2017,13 @@ main (int argc, char *argv[]) diff -Nru grub2-2.02/debian/patches/grub-install-extra-removable.patch grub2-2.02/debian/patches/grub-install-extra-removable.patch --- grub2-2.02/debian/patches/grub-install-extra-removable.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub-install-extra-removable.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 54053b9f1a398659f975e29bd47112d0f6255d6e Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Wed, 3 Dec 2014 01:25:12 +0000 Subject: Add support for forcing EFI installation to the removable media path @@ -21,7 +22,7 @@ 1 file changed, 123 insertions(+), 2 deletions(-) diff --git a/util/grub-install.c b/util/grub-install.c -index 1e5642d..333d55e0 100644 +index 1e5642d65..333d55e07 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -56,6 +56,7 @@ diff -Nru grub2-2.02/debian/patches/grub-install-pvxen-paths.patch grub2-2.02/debian/patches/grub-install-pvxen-paths.patch --- grub2-2.02/debian/patches/grub-install-pvxen-paths.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub-install-pvxen-paths.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 616e3ebee298cfa886146ce7c8cc54a1f328ebf7 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 6 Sep 2014 12:20:12 +0100 Subject: grub-install: Install PV Xen binaries into the upstream specified @@ -19,12 +20,15 @@ Last-Update: 2014-10-24 Patch-Name: grub-install-pvxen-paths.patch + +--- +v2: Respect bootdir, create /boot/xen as needed. --- util/grub-install.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/util/grub-install.c b/util/grub-install.c -index 70b22ee..1e5642d 100644 +index 70b22eec4..1e5642d65 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -2013,6 +2013,28 @@ main (int argc, char *argv[]) diff -Nru grub2-2.02/debian/patches/grub_legacy_0_based_partitions.patch grub2-2.02/debian/patches/grub_legacy_0_based_partitions.patch --- grub2-2.02/debian/patches/grub_legacy_0_based_partitions.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub_legacy_0_based_partitions.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 315f8ffc0e37ebc182f0a8e98a77097c507be290 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Mon, 13 Jan 2014 12:12:53 +0000 Subject: Support running grub-probe in grub-legacy's update-grub @@ -12,7 +13,7 @@ 1 file changed, 14 insertions(+) diff --git a/util/getroot.c b/util/getroot.c -index 847406f..cdd4115 100644 +index 847406fba..cdd41153c 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -245,6 +245,20 @@ find_partition (grub_disk_t dsk __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/grub-reboot-warn.patch grub2-2.02/debian/patches/grub-reboot-warn.patch --- grub2-2.02/debian/patches/grub-reboot-warn.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/grub-reboot-warn.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 8a775a3d2b4302d05eb1736203f35a41e4a5db0a Mon Sep 17 00:00:00 2001 From: dann frazier Date: Fri, 17 Aug 2018 17:33:44 -0600 Subject: grub-reboot: Warn when "for the next boot only" promise cannot be @@ -21,7 +22,7 @@ 1 file changed, 16 insertions(+) diff --git a/util/grub-reboot.in b/util/grub-reboot.in -index 4d4f757..ef3b5c0 100644 +index 4d4f75704..ef3b5c049 100644 --- a/util/grub-reboot.in +++ b/util/grub-reboot.in @@ -20,6 +20,7 @@ diff -Nru grub2-2.02/debian/patches/ieee1275-clear-reset.patch grub2-2.02/debian/patches/ieee1275-clear-reset.patch --- grub2-2.02/debian/patches/ieee1275-clear-reset.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ieee1275-clear-reset.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From e0c8362f2e1e2f8990605905415b1ec54be3c95c Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Thu, 25 Sep 2014 18:41:29 -0300 Subject: Include a text attribute reset in the clear command for ppc @@ -17,7 +18,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c -index f0d3e3d..7cb7909 100644 +index f0d3e3deb..7cb7909c8 100644 --- a/grub-core/term/terminfo.c +++ b/grub-core/term/terminfo.c @@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term, diff -Nru grub2-2.02/debian/patches/ignore_grub_func_test_failures.patch grub2-2.02/debian/patches/ignore_grub_func_test_failures.patch --- grub2-2.02/debian/patches/ignore_grub_func_test_failures.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ignore_grub_func_test_failures.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a26b7274c944c153e914e84bc1f668cdd4d6f1e7 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:32 +0000 Subject: Ignore functional test failures for now as they are broken @@ -13,7 +14,7 @@ 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in -index c8cc263..f458f74 100644 +index c8cc26376..f458f741e 100644 --- a/tests/grub_func_test.in +++ b/tests/grub_func_test.in @@ -16,6 +16,8 @@ out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/b diff -Nru grub2-2.02/debian/patches/insmod-xzio-and-lzopio-on-xen.patch grub2-2.02/debian/patches/insmod-xzio-and-lzopio-on-xen.patch --- grub2-2.02/debian/patches/insmod-xzio-and-lzopio-on-xen.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/insmod-xzio-and-lzopio-on-xen.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 985c0ae08e37503428b24be3143cea61e0899a38 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sun, 30 Nov 2014 12:12:52 +0000 Subject: Arrange to insmod xzio and lzopio when booting a kernel as a Xen @@ -19,7 +20,7 @@ 1 file changed, 1 insertion(+) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 4f6e92e..ac445a3 100644 +index 4f6e92e39..ac445a370 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -152,6 +152,7 @@ linux_entry () diff -Nru grub2-2.02/debian/patches/install_efi_fallback.patch grub2-2.02/debian/patches/install_efi_fallback.patch --- grub2-2.02/debian/patches/install_efi_fallback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_efi_fallback.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 2a07511e55684ce70732f66ecbed6019a2f050c1 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:05 +0000 Subject: Fall back to i386-pc if booted using EFI but -efi is missing @@ -16,7 +17,7 @@ 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c -index 775b6c0..35f1bcc 100644 +index 775b6c031..35f1bcc0e 100644 --- a/grub-core/osdep/linux/platform.c +++ b/grub-core/osdep/linux/platform.c @@ -19,10 +19,12 @@ diff -Nru grub2-2.02/debian/patches/install_efi_ubuntu_flavours.patch grub2-2.02/debian/patches/install_efi_ubuntu_flavours.patch --- grub2-2.02/debian/patches/install_efi_ubuntu_flavours.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_efi_ubuntu_flavours.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 9d390495e55bd4cd55c9f831227d6ae958c92545 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:27 +0000 Subject: Cope with Kubuntu setting GRUB_DISTRIBUTOR @@ -16,7 +17,7 @@ 1 file changed, 2 insertions(+) diff --git a/util/grub-install.c b/util/grub-install.c -index 11940d6..e1a0202 100644 +index 11940d6e6..e1a0202da 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1101,6 +1101,8 @@ main (int argc, char *argv[]) diff -Nru grub2-2.02/debian/patches/install_locale_langpack.patch grub2-2.02/debian/patches/install_locale_langpack.patch --- grub2-2.02/debian/patches/install_locale_langpack.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_locale_langpack.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 8b5bb21c63ae19ba96396aba2bab1e07243faca3 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:07 +0000 Subject: Prefer translations from Ubuntu language packs if available @@ -12,7 +13,7 @@ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/util/grub-install-common.c b/util/grub-install-common.c -index 452b230..c9d5e3d 100644 +index 452b230da..c9d5e3d0f 100644 --- a/util/grub-install-common.c +++ b/util/grub-install-common.c @@ -595,17 +595,25 @@ get_localedir (void) diff -Nru grub2-2.02/debian/patches/install_powerpc_machtypes.patch grub2-2.02/debian/patches/install_powerpc_machtypes.patch --- grub2-2.02/debian/patches/install_powerpc_machtypes.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_powerpc_machtypes.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b5670c00a228d532e6a56f524349075e4d7a46ac Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 28 Jan 2014 14:40:02 +0000 Subject: Port yaboot logic for various powerpc machine types @@ -24,7 +25,7 @@ 6 files changed, 119 insertions(+), 6 deletions(-) diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c -index 4b5502a..2ab9079 100644 +index 4b5502aeb..2ab907976 100644 --- a/grub-core/osdep/basic/platform.c +++ b/grub-core/osdep/basic/platform.c @@ -24,3 +24,8 @@ grub_install_get_default_x86_platform (void) @@ -37,7 +38,7 @@ + return "generic"; +} diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c -index 35f1bcc..9805c36 100644 +index 35f1bcc0e..9805c36d4 100644 --- a/grub-core/osdep/linux/platform.c +++ b/grub-core/osdep/linux/platform.c @@ -24,6 +24,7 @@ @@ -124,7 +125,7 @@ + return machtype; +} diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c -index a3fcfca..28cb37e 100644 +index a3fcfcaca..28cb37e15 100644 --- a/grub-core/osdep/unix/platform.c +++ b/grub-core/osdep/unix/platform.c @@ -212,13 +212,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device, @@ -164,7 +165,7 @@ free (boot_device); diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c -index 9122691..c30025b 100644 +index 912269191..c30025b13 100644 --- a/grub-core/osdep/windows/platform.c +++ b/grub-core/osdep/windows/platform.c @@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void) @@ -181,7 +182,7 @@ get_efi_variable (const wchar_t *varname, ssize_t *len) { diff --git a/include/grub/util/install.h b/include/grub/util/install.h -index 5ca4811..9f517a1 100644 +index 5ca4811cd..9f517a1bb 100644 --- a/include/grub/util/install.h +++ b/include/grub/util/install.h @@ -206,6 +206,9 @@ grub_install_create_envblk_file (const char *name); @@ -195,7 +196,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev, const char *efifile_path, diff --git a/util/grub-install.c b/util/grub-install.c -index e1a0202..70b22ee 100644 +index e1a0202da..70b22eec4 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1155,7 +1155,18 @@ main (int argc, char *argv[]) diff -Nru grub2-2.02/debian/patches/install_signed.patch grub2-2.02/debian/patches/install_signed.patch --- grub2-2.02/debian/patches/install_signed.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_signed.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,8 +1,9 @@ +From e871ef5120652c6fbf1abada734fd4a935559aa5 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:22 +0000 Subject: Install signed images if UEFI Secure Boot is enabled MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" +Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: Stéphane Graber @@ -18,7 +19,7 @@ 1 file changed, 148 insertions(+), 47 deletions(-) diff --git a/util/grub-install.c b/util/grub-install.c -index 0e1303e..11940d6 100644 +index 0e1303ee5..11940d6e6 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -80,6 +80,7 @@ static char *label_color; diff -Nru grub2-2.02/debian/patches/install_stage2_confusion.patch grub2-2.02/debian/patches/install_stage2_confusion.patch --- grub2-2.02/debian/patches/install_stage2_confusion.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/install_stage2_confusion.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 039500b95c62405cd2a5afdd083212f00a8d79b7 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:58 +0000 Subject: If GRUB Legacy is still around, tell packaging to ignore it @@ -12,7 +13,7 @@ 1 file changed, 14 insertions(+) diff --git a/util/grub-install.c b/util/grub-install.c -index 9074d3e..0e1303e 100644 +index 9074d3e9e..0e1303ee5 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -42,6 +42,7 @@ diff -Nru grub2-2.02/debian/patches/linuxefi_add_sb_to_efi_chainload.patch grub2-2.02/debian/patches/linuxefi_add_sb_to_efi_chainload.patch --- grub2-2.02/debian/patches/linuxefi_add_sb_to_efi_chainload.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_add_sb_to_efi_chainload.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From dffbb7316bdbee9595d0e2c247972ec70bf8bec6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 6 Oct 2015 13:04:37 -0400 Subject: Add secureboot support on efi chainloader @@ -28,7 +29,7 @@ 3 files changed, 596 insertions(+), 37 deletions(-) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 1b64247..9b7b661 100644 +index 1b642472e..9b7b661ff 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1747,6 +1747,7 @@ module = { @@ -40,7 +41,7 @@ i386_coreboot = loader/i386/coreboot/chainloader.c; i386_coreboot = lib/LzmaDec.c; diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 14ce6dd..4560434 100644 +index 14ce6ddd7..456043407 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -32,6 +32,8 @@ @@ -776,7 +777,7 @@ return grub_errno; diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h -index f79c36c..f79782e 100644 +index f79c36c02..f79782e1b 100644 --- a/include/grub/efi/pe32.h +++ b/include/grub/efi/pe32.h @@ -212,7 +212,11 @@ struct grub_pe64_optional_header diff -Nru grub2-2.02/debian/patches/linuxefi_cleanup_errors_in_loader.patch grub2-2.02/debian/patches/linuxefi_cleanup_errors_in_loader.patch --- grub2-2.02/debian/patches/linuxefi_cleanup_errors_in_loader.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_cleanup_errors_in_loader.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 6c8809100c8e55c3278d2b95c00213a18e433e4c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 24 May 2017 15:58:18 -0400 Subject: Clean up some errors in the linuxefi loader @@ -15,7 +16,7 @@ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index d466caf..9a3f747 100644 +index d466cafd9..9a3f7477b 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -162,8 +162,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -71,7 +72,7 @@ linux_cmdline, BYTES_TO_PAGES(lh->cmdline_size + 1)); diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index e4b8342..c9e8931 100644 +index e4b8342f5..c9e89310b 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -680,6 +680,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/linuxefi_debug.patch grub2-2.02/debian/patches/linuxefi_debug.patch --- grub2-2.02/debian/patches/linuxefi_debug.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_debug.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 35cc4a78cc5fa386336061bc7edbd3f054dc3508 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 1 Nov 2017 13:39:59 -0400 Subject: Add some grub_dprintf() in the linuxefi path. @@ -15,7 +16,7 @@ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c -index 8890bdf..dbf63e2 100644 +index 8890bdf05..dbf63e20e 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -43,12 +43,22 @@ grub_linuxefi_secure_validate (void *data, grub_uint32_t size) @@ -45,7 +46,7 @@ return -1; } diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 010bf98..7df379a 100644 +index 010bf982d..7df379ab7 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -19,6 +19,7 @@ diff -Nru grub2-2.02/debian/patches/linuxefi_disable_sb_fallback.patch grub2-2.02/debian/patches/linuxefi_disable_sb_fallback.patch --- grub2-2.02/debian/patches/linuxefi_disable_sb_fallback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_disable_sb_fallback.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 10a7a5a6402467899a4b733d948eb94b643a5e4e Mon Sep 17 00:00:00 2001 From: Linn Crosetto Date: Tue, 5 Apr 2016 11:49:05 -0600 Subject: Disallow unsigned kernels if UEFI Secure Boot is enabled @@ -14,11 +15,11 @@ grub-core/loader/i386/linux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index 10314be..7226151 100644 ---- a/grub-core/loader/i386/linux.c -+++ b/grub-core/loader/i386/linux.c -@@ -704,10 +704,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +Index: bionic/grub-core/loader/i386/linux.c +=================================================================== +--- bionic.orig/grub-core/loader/i386/linux.c ++++ bionic/grub-core/loader/i386/linux.c +@@ -704,10 +704,8 @@ grub_cmd_linux (grub_command_t cmd __att using_linuxefi = 0; if (grub_efi_secure_boot ()) { @@ -31,7 +32,7 @@ grub_dl_t mod; grub_command_t linuxefi_cmd; -@@ -729,7 +727,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -729,7 +727,7 @@ grub_cmd_linux (grub_command_t cmd __att return GRUB_ERR_NONE; } grub_dprintf ("linux", "linuxefi failed (%d)\n", grub_errno); diff -Nru grub2-2.02/debian/patches/linuxefi_fix_efi_validation_race.patch grub2-2.02/debian/patches/linuxefi_fix_efi_validation_race.patch --- grub2-2.02/debian/patches/linuxefi_fix_efi_validation_race.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_fix_efi_validation_race.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 362fc9a67cb29de09ce2ec12890d3b4d37281665 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 14 Jul 2015 16:58:51 -0700 Subject: Fix race in EFI validation @@ -12,7 +13,7 @@ 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index ddd50db..9a3cc18 100644 +index ddd50dbf1..9a3cc1819 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -154,7 +154,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/linuxefi_fix_relocate_coff.patch grub2-2.02/debian/patches/linuxefi_fix_relocate_coff.patch --- grub2-2.02/debian/patches/linuxefi_fix_relocate_coff.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_fix_relocate_coff.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From bfe7c890db05f79d34752498991b5e40bc11e263 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Mon, 21 Nov 2016 15:34:00 +0100 Subject: efi/chainloader: fix wrong sanity check in relocate_coff() @@ -21,7 +22,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index a2e2d1b..2353271 100644 +index a2e2d1b6f..2353271cf 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -401,7 +401,7 @@ relocate_coff (pe_coff_loader_image_context_t *context, diff -Nru grub2-2.02/debian/patches/linuxefi_handle_multiarch_boot.patch grub2-2.02/debian/patches/linuxefi_handle_multiarch_boot.patch --- grub2-2.02/debian/patches/linuxefi_handle_multiarch_boot.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_handle_multiarch_boot.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a2905156da395c04a2a9a62ceb9177d47b5ed597 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Feb 2017 16:18:54 -0500 Subject: Handle multi-arch (64-on-32) boot in linuxefi loader. @@ -18,7 +19,7 @@ 3 files changed, 88 insertions(+), 36 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c -index dbf63e2..7fe7201 100644 +index dbf63e20e..7fe7201a3 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -66,12 +66,17 @@ grub_linuxefi_secure_validate (void *data, grub_uint32_t size) @@ -42,7 +43,7 @@ return GRUB_ERR_BUG; diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 6efa30f..d466caf 100644 +index 6efa30ff8..d466cafd9 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -45,14 +45,10 @@ static char *linux_cmdline; @@ -244,7 +245,7 @@ if (kernel_mem && !loaded) grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)kernel_mem, diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h -index fc36bda..110ecf8 100644 +index fc36bdaf3..110ecf806 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -130,7 +130,12 @@ struct linux_kernel_header diff -Nru grub2-2.02/debian/patches/linuxefi_honor_sb_mode.patch grub2-2.02/debian/patches/linuxefi_honor_sb_mode.patch --- grub2-2.02/debian/patches/linuxefi_honor_sb_mode.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_honor_sb_mode.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b6890a1c275c817b98e94e0b05f1699b806f18f7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 6 Oct 2015 16:09:25 -0400 Subject: Make any of the loaders that link in efi mode honor secure boot. @@ -42,7 +43,7 @@ create mode 100644 include/grub/sparc64/linux.h diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am -index 04e9395..fd715a8 100644 +index 04e9395fd..fd715a8ea 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h @@ -54,7 +55,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 9b7b661..50c555e 100644 +index 9b7b661ff..50c555e43 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -177,6 +177,7 @@ kernel = { @@ -66,7 +67,7 @@ x86 = kern/i386/tsc.c; x86 = kern/i386/tsc_pit.c; diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c -index a0c164e..41a7f3f 100644 +index a0c164e54..41a7f3f04 100644 --- a/grub-core/commands/iorw.c +++ b/grub-core/commands/iorw.c @@ -23,6 +23,7 @@ @@ -98,7 +99,7 @@ grub_unregister_extcmd (cmd_read_word); grub_unregister_extcmd (cmd_read_dword); diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c -index 98769ea..088cbe9 100644 +index 98769eadb..088cbe9e2 100644 --- a/grub-core/commands/memrw.c +++ b/grub-core/commands/memrw.c @@ -22,6 +22,7 @@ @@ -130,7 +131,7 @@ grub_unregister_extcmd (cmd_read_word); grub_unregister_extcmd (cmd_read_dword); diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c -index 04e804d..6210709 100644 +index 04e804d16..621070918 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern/dl.c @@ -32,6 +32,7 @@ @@ -142,7 +143,7 @@ /* Platforms where modules are in a readonly area of memory. */ #if defined(GRUB_MACHINE_QEMU) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index bce251d..d467785 100644 +index bce251df9..d467785fc 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c @@ -264,34 +264,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, @@ -182,7 +183,7 @@ /* Search the mods section from the PE32/PE32+ image. This code uses diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c new file mode 100644 -index 0000000..a41b6c5 +index 000000000..a41b6c5b8 --- /dev/null +++ b/grub-core/kern/efi/sb.c @@ -0,0 +1,58 @@ @@ -245,7 +246,7 @@ +#endif +} diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c -index 74888c4..69c2a10 100644 +index 74888c463..69c2a10d3 100644 --- a/grub-core/loader/efi/appleloader.c +++ b/grub-core/loader/efi/appleloader.c @@ -24,6 +24,7 @@ @@ -276,7 +277,7 @@ grub_unregister_command (cmd); } diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 4560434..83e1914 100644 +index 456043407..83e191460 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -34,6 +34,7 @@ @@ -288,7 +289,7 @@ #include #include diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c -index 7f96515..87709aa 100644 +index 7f96515da..87709aa23 100644 --- a/grub-core/loader/i386/bsd.c +++ b/grub-core/loader/i386/bsd.c @@ -38,6 +38,7 @@ @@ -320,7 +321,7 @@ grub_unregister_extcmd (cmd_openbsd); grub_unregister_extcmd (cmd_netbsd); diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index 083f941..b243854 100644 +index 083f9417c..b2438547d 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -35,6 +35,7 @@ @@ -352,7 +353,7 @@ grub_unregister_command (cmd_initrd); } diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c -index a293b17..9128315 100644 +index a293b17aa..91283157e 100644 --- a/grub-core/loader/i386/pc/linux.c +++ b/grub-core/loader/i386/pc/linux.c @@ -35,6 +35,7 @@ @@ -384,7 +385,7 @@ grub_unregister_command (cmd_initrd); } diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c -index bd9d5b3..fb044a6 100644 +index bd9d5b3e6..fb044a60c 100644 --- a/grub-core/loader/multiboot.c +++ b/grub-core/loader/multiboot.c @@ -42,6 +42,7 @@ @@ -416,7 +417,7 @@ grub_unregister_command (cmd_module); } diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c -index c9885b1..df8dfdb 100644 +index c9885b1bc..df8dfdb4b 100644 --- a/grub-core/loader/xnu.c +++ b/grub-core/loader/xnu.c @@ -33,6 +33,7 @@ @@ -448,7 +449,7 @@ grub_unregister_command (cmd_resume); #endif diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index 62a3d97..764cd11 100644 +index 62a3d9726..764cd11f5 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -76,7 +76,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, @@ -461,7 +462,7 @@ const grub_efi_device_path_t *dp2); diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h new file mode 100644 -index 0000000..9629fbb +index 000000000..9629fbb0f --- /dev/null +++ b/include/grub/efi/sb.h @@ -0,0 +1,29 @@ @@ -496,13 +497,13 @@ +#endif /* ! GRUB_EFI_SB_HEADER */ diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h new file mode 100644 -index 0000000..e69de29 +index 000000000..e69de29bb diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h new file mode 100644 -index 0000000..e69de29 +index 000000000..e69de29bb diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h new file mode 100644 -index 0000000..5761d53 +index 000000000..5761d53e7 --- /dev/null +++ b/include/grub/powerpc/linux.h @@ -0,0 +1,22 @@ @@ -530,4 +531,4 @@ +#endif /* ! GRUB_LINUX_CPU_HEADER */ diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h new file mode 100644 -index 0000000..e69de29 +index 000000000..e69de29bb diff -Nru grub2-2.02/debian/patches/linuxefi_load_arm_with_sb.patch grub2-2.02/debian/patches/linuxefi_load_arm_with_sb.patch --- grub2-2.02/debian/patches/linuxefi_load_arm_with_sb.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_load_arm_with_sb.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 9aa4d2f67a0109cb9c4ed23997b47f3c47943e2c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 3 Nov 2017 12:06:24 -0400 Subject: Load arm with SB enabled. @@ -26,7 +27,7 @@ create mode 100644 include/grub/efi/linux.h diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index cedf27e..1b64247 100644 +index cedf27eb8..1b642472e 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1670,6 +1670,8 @@ module = { @@ -47,7 +48,7 @@ enable = x86_64_efi; }; diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c -index 5b39f02..d7ebae0 100644 +index 5b39f02bb..d7ebae0ff 100644 --- a/grub-core/loader/arm/linux.c +++ b/grub-core/loader/arm/linux.c @@ -26,6 +26,7 @@ @@ -59,7 +60,7 @@ #include diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index 57890fd..bc7ebb6 100644 +index 57890fdda..bc7ebb699 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -28,6 +28,7 @@ @@ -245,7 +246,7 @@ if (!linux_args) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c new file mode 100644 -index 0000000..aea378a +index 000000000..aea378adf --- /dev/null +++ b/grub-core/loader/efi/linux.c @@ -0,0 +1,65 @@ @@ -315,7 +316,7 @@ + return GRUB_ERR_BUG; +} diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 6afa13d..ddd50db 100644 +index 6afa13d41..ddd50dbf1 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -26,6 +26,7 @@ @@ -382,7 +383,7 @@ static grub_err_t diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h -index 1ea2369..a2ba24e 100644 +index 1ea23696e..a2ba24e9f 100644 --- a/include/grub/arm64/linux.h +++ b/include/grub/arm64/linux.h @@ -20,6 +20,7 @@ @@ -407,7 +408,7 @@ #endif /* ! GRUB_LINUX_CPU_HEADER */ diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h new file mode 100644 -index 0000000..d9ede36 +index 000000000..d9ede3677 --- /dev/null +++ b/include/grub/efi/linux.h @@ -0,0 +1,31 @@ diff -Nru grub2-2.02/debian/patches/linuxefi_minor_cleanups.patch grub2-2.02/debian/patches/linuxefi_minor_cleanups.patch --- grub2-2.02/debian/patches/linuxefi_minor_cleanups.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_minor_cleanups.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 03c85c1794f6364639933b8e7711e3d499092a38 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Feb 2017 16:31:52 -0500 Subject: linuxefi: minor cleanups @@ -14,7 +15,7 @@ 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 7df379a..6efa30f 100644 +index 7df379ab7..6efa30ff8 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -62,13 +62,18 @@ grub_linuxefi_unload (void) diff -Nru grub2-2.02/debian/patches/linuxefi_move_fdt_helper.patch grub2-2.02/debian/patches/linuxefi_move_fdt_helper.patch --- grub2-2.02/debian/patches/linuxefi_move_fdt_helper.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_move_fdt_helper.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 1c4934ef2833af2b92c91e8aede131efd8c5c789 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Fri, 3 Nov 2017 12:04:00 -0400 Subject: efi: move fdt helper library @@ -16,21 +17,17 @@ Patch-Name: linuxefi_move_fdt_helper.patch --- - grub-core/Makefile.core.def | 2 +- - grub-core/loader/arm64/fdt.c | 163 -------------------------------------- - grub-core/loader/arm64/linux.c | 2 +- - grub-core/loader/arm64/xen_boot.c | 2 +- - grub-core/loader/efi/fdt.c | 163 ++++++++++++++++++++++++++++++++++++++ - include/grub/arm64/fdtload.h | 35 -------- - include/grub/efi/fdtload.h | 35 ++++++++ - 7 files changed, 201 insertions(+), 201 deletions(-) - delete mode 100644 grub-core/loader/arm64/fdt.c - create mode 100644 grub-core/loader/efi/fdt.c - delete mode 100644 include/grub/arm64/fdtload.h - create mode 100644 include/grub/efi/fdtload.h + grub-core/Makefile.core.def | 2 +- + grub-core/loader/arm64/linux.c | 2 +- + grub-core/loader/arm64/xen_boot.c | 2 +- + grub-core/loader/{arm64 => efi}/fdt.c | 2 +- + include/grub/{arm64 => efi}/fdtload.h | 0 + 5 files changed, 4 insertions(+), 4 deletions(-) + rename grub-core/loader/{arm64 => efi}/fdt.c (99%) + rename include/grub/{arm64 => efi}/fdtload.h (100%) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 68e47a7..cedf27e 100644 +index 68e47a727..cedf27eb8 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1677,7 +1677,7 @@ module = { @@ -42,177 +39,8 @@ common = lib/fdt.c; enable = fdt; }; -diff --git a/grub-core/loader/arm64/fdt.c b/grub-core/loader/arm64/fdt.c -deleted file mode 100644 -index db49cf6..0000000 ---- a/grub-core/loader/arm64/fdt.c -+++ /dev/null -@@ -1,163 +0,0 @@ --/* -- * GRUB -- GRand Unified Bootloader -- * Copyright (C) 2013-2015 Free Software Foundation, Inc. -- * -- * GRUB is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * GRUB is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with GRUB. If not, see . -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include -- --static void *loaded_fdt; --static void *fdt; -- --void * --grub_fdt_load (grub_size_t additional_size) --{ -- void *raw_fdt; -- grub_size_t size; -- -- if (fdt) -- { -- size = GRUB_EFI_BYTES_TO_PAGES (grub_fdt_get_totalsize (fdt)); -- grub_efi_free_pages ((grub_efi_physical_address_t) fdt, size); -- } -- -- if (loaded_fdt) -- raw_fdt = loaded_fdt; -- else -- raw_fdt = grub_efi_get_firmware_fdt(); -- -- size = -- raw_fdt ? grub_fdt_get_totalsize (raw_fdt) : GRUB_FDT_EMPTY_TREE_SZ; -- size += additional_size; -- -- grub_dprintf ("linux", "allocating %ld bytes for fdt\n", size); -- fdt = grub_efi_allocate_pages (0, GRUB_EFI_BYTES_TO_PAGES (size)); -- if (!fdt) -- return NULL; -- -- if (raw_fdt) -- { -- grub_memmove (fdt, raw_fdt, size); -- grub_fdt_set_totalsize (fdt, size); -- } -- else -- { -- grub_fdt_create_empty_tree (fdt, size); -- } -- return fdt; --} -- --grub_err_t --grub_fdt_install (void) --{ -- grub_efi_boot_services_t *b; -- grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; -- grub_efi_status_t status; -- -- b = grub_efi_system_table->boot_services; -- status = b->install_configuration_table (&fdt_guid, fdt); -- if (status != GRUB_EFI_SUCCESS) -- return grub_error (GRUB_ERR_IO, "failed to install FDT"); -- -- grub_dprintf ("fdt", "Installed/updated FDT configuration table @ %p\n", -- fdt); -- return GRUB_ERR_NONE; --} -- --void --grub_fdt_unload (void) { -- if (!fdt) { -- return; -- } -- grub_efi_free_pages ((grub_efi_physical_address_t) fdt, -- GRUB_EFI_BYTES_TO_PAGES (grub_fdt_get_totalsize (fdt))); -- fdt = NULL; --} -- --static grub_err_t --grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)), -- int argc, char *argv[]) --{ -- grub_file_t dtb; -- void *blob = NULL; -- int size; -- -- if (loaded_fdt) -- grub_free (loaded_fdt); -- loaded_fdt = NULL; -- -- /* No arguments means "use firmware FDT". */ -- if (argc == 0) -- { -- return GRUB_ERR_NONE; -- } -- -- dtb = grub_file_open (argv[0]); -- if (!dtb) -- goto out; -- -- size = grub_file_size (dtb); -- blob = grub_malloc (size); -- if (!blob) -- goto out; -- -- if (grub_file_read (dtb, blob, size) < size) -- { -- if (!grub_errno) -- grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"), argv[0]); -- goto out; -- } -- -- if (grub_fdt_check_header (blob, size) != 0) -- { -- grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree")); -- goto out; -- } -- --out: -- if (dtb) -- grub_file_close (dtb); -- -- if (blob) -- { -- if (grub_errno == GRUB_ERR_NONE) -- loaded_fdt = blob; -- else -- grub_free (blob); -- } -- -- return grub_errno; --} -- --static grub_command_t cmd_devicetree; -- --GRUB_MOD_INIT (fdt) --{ -- cmd_devicetree = -- grub_register_command ("devicetree", grub_cmd_devicetree, 0, -- N_("Load DTB file.")); --} -- --GRUB_MOD_FINI (fdt) --{ -- grub_unregister_command (cmd_devicetree); --} diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index 9519d2e..57890fd 100644 +index 9519d2e4d..57890fdda 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -26,8 +26,8 @@ @@ -226,7 +54,7 @@ #include #include diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c -index a914eb8..82ee394 100644 +index a914eb8e2..82ee39459 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -27,9 +27,9 @@ @@ -240,254 +68,28 @@ #include /* required by struct xen_hypervisor_header */ #include #include -diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c -new file mode 100644 -index 0000000..3266f65 ---- /dev/null +diff --git a/grub-core/loader/arm64/fdt.c b/grub-core/loader/efi/fdt.c +similarity index 99% +rename from grub-core/loader/arm64/fdt.c +rename to grub-core/loader/efi/fdt.c +index db49cf649..3266f65c4 100644 +--- a/grub-core/loader/arm64/fdt.c +++ b/grub-core/loader/efi/fdt.c -@@ -0,0 +1,163 @@ -+/* -+ * GRUB -- GRand Unified Bootloader -+ * Copyright (C) 2013-2015 Free Software Foundation, Inc. -+ * -+ * GRUB is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * GRUB is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with GRUB. If not, see . -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include +@@ -18,12 +18,12 @@ + + #include + #include +-#include + #include + #include + #include + #include + #include +#include -+ -+static void *loaded_fdt; -+static void *fdt; -+ -+void * -+grub_fdt_load (grub_size_t additional_size) -+{ -+ void *raw_fdt; -+ grub_size_t size; -+ -+ if (fdt) -+ { -+ size = GRUB_EFI_BYTES_TO_PAGES (grub_fdt_get_totalsize (fdt)); -+ grub_efi_free_pages ((grub_efi_physical_address_t) fdt, size); -+ } -+ -+ if (loaded_fdt) -+ raw_fdt = loaded_fdt; -+ else -+ raw_fdt = grub_efi_get_firmware_fdt(); -+ -+ size = -+ raw_fdt ? grub_fdt_get_totalsize (raw_fdt) : GRUB_FDT_EMPTY_TREE_SZ; -+ size += additional_size; -+ -+ grub_dprintf ("linux", "allocating %ld bytes for fdt\n", size); -+ fdt = grub_efi_allocate_pages (0, GRUB_EFI_BYTES_TO_PAGES (size)); -+ if (!fdt) -+ return NULL; -+ -+ if (raw_fdt) -+ { -+ grub_memmove (fdt, raw_fdt, size); -+ grub_fdt_set_totalsize (fdt, size); -+ } -+ else -+ { -+ grub_fdt_create_empty_tree (fdt, size); -+ } -+ return fdt; -+} -+ -+grub_err_t -+grub_fdt_install (void) -+{ -+ grub_efi_boot_services_t *b; -+ grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; -+ grub_efi_status_t status; -+ -+ b = grub_efi_system_table->boot_services; -+ status = b->install_configuration_table (&fdt_guid, fdt); -+ if (status != GRUB_EFI_SUCCESS) -+ return grub_error (GRUB_ERR_IO, "failed to install FDT"); -+ -+ grub_dprintf ("fdt", "Installed/updated FDT configuration table @ %p\n", -+ fdt); -+ return GRUB_ERR_NONE; -+} -+ -+void -+grub_fdt_unload (void) { -+ if (!fdt) { -+ return; -+ } -+ grub_efi_free_pages ((grub_efi_physical_address_t) fdt, -+ GRUB_EFI_BYTES_TO_PAGES (grub_fdt_get_totalsize (fdt))); -+ fdt = NULL; -+} -+ -+static grub_err_t -+grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)), -+ int argc, char *argv[]) -+{ -+ grub_file_t dtb; -+ void *blob = NULL; -+ int size; -+ -+ if (loaded_fdt) -+ grub_free (loaded_fdt); -+ loaded_fdt = NULL; -+ -+ /* No arguments means "use firmware FDT". */ -+ if (argc == 0) -+ { -+ return GRUB_ERR_NONE; -+ } -+ -+ dtb = grub_file_open (argv[0]); -+ if (!dtb) -+ goto out; -+ -+ size = grub_file_size (dtb); -+ blob = grub_malloc (size); -+ if (!blob) -+ goto out; -+ -+ if (grub_file_read (dtb, blob, size) < size) -+ { -+ if (!grub_errno) -+ grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"), argv[0]); -+ goto out; -+ } -+ -+ if (grub_fdt_check_header (blob, size) != 0) -+ { -+ grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree")); -+ goto out; -+ } -+ -+out: -+ if (dtb) -+ grub_file_close (dtb); -+ -+ if (blob) -+ { -+ if (grub_errno == GRUB_ERR_NONE) -+ loaded_fdt = blob; -+ else -+ grub_free (blob); -+ } -+ -+ return grub_errno; -+} -+ -+static grub_command_t cmd_devicetree; -+ -+GRUB_MOD_INIT (fdt) -+{ -+ cmd_devicetree = -+ grub_register_command ("devicetree", grub_cmd_devicetree, 0, -+ N_("Load DTB file.")); -+} -+ -+GRUB_MOD_FINI (fdt) -+{ -+ grub_unregister_command (cmd_devicetree); -+} -diff --git a/include/grub/arm64/fdtload.h b/include/grub/arm64/fdtload.h -deleted file mode 100644 -index 7b9ddba..0000000 ---- a/include/grub/arm64/fdtload.h -+++ /dev/null -@@ -1,35 +0,0 @@ --/* -- * GRUB -- GRand Unified Bootloader -- * Copyright (C) 2013-2015 Free Software Foundation, Inc. -- * -- * GRUB is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * GRUB is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with GRUB. If not, see . -- */ -- --#ifndef GRUB_FDTLOAD_CPU_HEADER --#define GRUB_FDTLOAD_CPU_HEADER 1 -- --#include --#include -- --void * --grub_fdt_load (grub_size_t additional_size); --void --grub_fdt_unload (void); --grub_err_t --grub_fdt_install (void); -- --#define GRUB_EFI_PAGE_SHIFT 12 --#define GRUB_EFI_BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> GRUB_EFI_PAGE_SHIFT) -- --#endif -diff --git a/include/grub/efi/fdtload.h b/include/grub/efi/fdtload.h -new file mode 100644 -index 0000000..7b9ddba ---- /dev/null -+++ b/include/grub/efi/fdtload.h -@@ -0,0 +1,35 @@ -+/* -+ * GRUB -- GRand Unified Bootloader -+ * Copyright (C) 2013-2015 Free Software Foundation, Inc. -+ * -+ * GRUB is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * GRUB is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with GRUB. If not, see . -+ */ -+ -+#ifndef GRUB_FDTLOAD_CPU_HEADER -+#define GRUB_FDTLOAD_CPU_HEADER 1 -+ -+#include -+#include -+ -+void * -+grub_fdt_load (grub_size_t additional_size); -+void -+grub_fdt_unload (void); -+grub_err_t -+grub_fdt_install (void); -+ -+#define GRUB_EFI_PAGE_SHIFT 12 -+#define GRUB_EFI_BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> GRUB_EFI_PAGE_SHIFT) -+ -+#endif + + static void *loaded_fdt; + static void *fdt; +diff --git a/include/grub/arm64/fdtload.h b/include/grub/efi/fdtload.h +similarity index 100% +rename from include/grub/arm64/fdtload.h +rename to include/grub/efi/fdtload.h diff -Nru grub2-2.02/debian/patches/linuxefi_no_insmod_on_sb.patch grub2-2.02/debian/patches/linuxefi_no_insmod_on_sb.patch --- grub2-2.02/debian/patches/linuxefi_no_insmod_on_sb.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_no_insmod_on_sb.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 0df94e5a210f217bfb1a8aed9bf5cf6c5e3ad619 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Mon, 13 Jan 2014 12:13:09 +0000 Subject: Don't permit loading modules on UEFI secure boot @@ -29,7 +30,7 @@ 3 files changed, 50 insertions(+) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c -index e394cd9..04e804d 100644 +index e394cd96f..04e804d16 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern/dl.c @@ -38,6 +38,14 @@ @@ -68,7 +69,7 @@ file = grub_file_open (filename); diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index d467785..bce251d 100644 +index d467785fc..bce251df9 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c @@ -264,6 +264,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, @@ -107,7 +108,7 @@ /* Search the mods section from the PE32/PE32+ image. This code uses diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index 764cd11..62a3d97 100644 +index 764cd11f5..62a3d9726 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -76,6 +76,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, diff -Nru grub2-2.02/debian/patches/linuxefi_non_sb_fallback.patch grub2-2.02/debian/patches/linuxefi_non_sb_fallback.patch --- grub2-2.02/debian/patches/linuxefi_non_sb_fallback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_non_sb_fallback.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 037c606bad73a979f5937922590fccb9d0b093b6 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 1 Nov 2017 13:48:26 -0400 Subject: If running under UEFI secure boot, attempt to use linuxefi loader @@ -13,7 +14,7 @@ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 9a3f747..9f70256 100644 +index 9a3f7477b..9f70256a5 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -200,7 +200,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -26,7 +27,7 @@ goto fail; } diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index c9e8931..3e3b45a 100644 +index c9e89310b..3e3b45aa8 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -76,6 +76,8 @@ static grub_size_t maximal_cmdline_size; diff -Nru grub2-2.02/debian/patches/linuxefi.patch grub2-2.02/debian/patches/linuxefi.patch --- grub2-2.02/debian/patches/linuxefi.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From dcdb222cf4b007d1850a746074a6b5d1cac6c517 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Mon, 13 Jan 2014 12:13:15 +0000 Subject: Add "linuxefi" loader which avoids ExitBootServices @@ -17,7 +18,7 @@ create mode 100644 grub-core/loader/i386/efi/linux.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 2dfa22a..68e47a7 100644 +index 2dfa22a92..68e47a727 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1733,6 +1733,14 @@ module = { @@ -36,7 +37,7 @@ name = chain; efi = loader/efi/chainloader.c; diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c -index 20a47aa..efb15cc 100644 +index 20a47aaf5..efb15cc1b 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c @@ -49,6 +49,38 @@ static grub_efi_uintn_t finish_desc_size; @@ -80,7 +81,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address, diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c new file mode 100644 -index 0000000..6afa13d +index 000000000..6afa13d41 --- /dev/null +++ b/grub-core/loader/i386/efi/linux.c @@ -0,0 +1,371 @@ @@ -456,7 +457,7 @@ + grub_unregister_command (cmd_initrd); +} diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index e9c601f..764cd11 100644 +index e9c601f34..764cd11f5 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -40,6 +40,9 @@ void EXPORT_FUNC(grub_efi_stall) (grub_efi_uintn_t microseconds); @@ -470,7 +471,7 @@ grub_efi_uintn_t pages); int diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h -index da0ca3b..fc36bda 100644 +index da0ca3b83..fc36bdaf3 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -139,6 +139,7 @@ struct linux_kernel_header diff -Nru grub2-2.02/debian/patches/linuxefi_re-enable_linux_cmd.patch grub2-2.02/debian/patches/linuxefi_re-enable_linux_cmd.patch --- grub2-2.02/debian/patches/linuxefi_re-enable_linux_cmd.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_re-enable_linux_cmd.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 43d3508475ff2c2714a95e17ef9e7e3ee7e76f36 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 1 Nov 2017 13:51:03 -0400 Subject: Temporarily re-enable the generic linux loader @@ -17,7 +18,7 @@ 1 file changed, 6 deletions(-) diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index 3e3b45a..ae0be0f 100644 +index 3e3b45aa8..ae0be0f26 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -1194,9 +1194,6 @@ static grub_command_t cmd_linux, cmd_initrd; diff -Nru grub2-2.02/debian/patches/linuxefi_rework_linux16_cmd.patch grub2-2.02/debian/patches/linuxefi_rework_linux16_cmd.patch --- grub2-2.02/debian/patches/linuxefi_rework_linux16_cmd.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_rework_linux16_cmd.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 8e69e6f56cbc2a7fefb97c0052daf485f26f0f7a Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Sun, 9 Aug 2015 16:20:58 -0700 Subject: Rework linux16 command @@ -16,7 +17,7 @@ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c -index 9128315..b864e54 100644 +index 91283157e..b864e5403 100644 --- a/grub-core/loader/i386/pc/linux.c +++ b/grub-core/loader/i386/pc/linux.c @@ -124,13 +124,14 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/linuxefi_rework_linux_cmd.patch grub2-2.02/debian/patches/linuxefi_rework_linux_cmd.patch --- grub2-2.02/debian/patches/linuxefi_rework_linux_cmd.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_rework_linux_cmd.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 95c987739871ae7d45174e3cd689410622c3e9b4 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Sun, 9 Aug 2015 16:12:39 -0700 Subject: Rework linux command @@ -16,7 +17,7 @@ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index b243854..e4b8342 100644 +index b2438547d..e4b8342f5 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -681,12 +681,13 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/linuxefi_rework_non-sb_efi_chainload.patch grub2-2.02/debian/patches/linuxefi_rework_non-sb_efi_chainload.patch --- grub2-2.02/debian/patches/linuxefi_rework_non-sb_efi_chainload.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_rework_non-sb_efi_chainload.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 903ae8b9aae3856017c40c1a34bf3d182e7023a8 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 10 Jun 2016 14:06:15 -0400 Subject: Rework even more of efi chainload so non-sb cases work right. @@ -55,7 +56,7 @@ 6 files changed, 97 insertions(+), 58 deletions(-) diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c -index a41b6c5..d74778b 100644 +index a41b6c5b8..d74778b0c 100644 --- a/grub-core/kern/efi/sb.c +++ b/grub-core/kern/efi/sb.c @@ -36,14 +36,20 @@ grub_efi_secure_boot (void) @@ -84,7 +85,7 @@ if (*secure_boot && !*setup_mode) ret = 1; diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index bc7ebb6..456523b 100644 +index bc7ebb699..456523b52 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -253,6 +253,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -106,7 +107,7 @@ grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]); goto fail; diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 505d883..a2e2d1b 100644 +index 505d883ef..a2e2d1b6f 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -182,7 +182,6 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) @@ -308,7 +309,7 @@ grub_device_close (dev); diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c -index aea378a..8890bdf 100644 +index aea378adf..8890bdf05 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -33,21 +33,24 @@ struct grub_efi_shim_lock @@ -342,7 +343,7 @@ typedef void (*handover_func) (void *, grub_efi_system_table_t *, void *); diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 9a3cc18..010bf98 100644 +index 9a3cc1819..010bf982d 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c @@ -155,6 +155,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), @@ -370,7 +371,7 @@ grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]); diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h -index d9ede36..0033d93 100644 +index d9ede3677..0033d9305 100644 --- a/include/grub/efi/linux.h +++ b/include/grub/efi/linux.h @@ -22,7 +22,7 @@ diff -Nru grub2-2.02/debian/patches/linuxefi_rework_pe_loading.patch grub2-2.02/debian/patches/linuxefi_rework_pe_loading.patch --- grub2-2.02/debian/patches/linuxefi_rework_pe_loading.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_rework_pe_loading.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From ab09a982d2fa084a0b205fdef5b8a099a2d65cee Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 9 Jun 2016 12:22:29 -0400 Subject: Re-work some intricacies of PE loading. @@ -17,7 +18,7 @@ 2 files changed, 152 insertions(+), 36 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 83e1914..505d883 100644 +index 83e191460..505d883ef 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -301,7 +301,7 @@ image_is_64_bit (grub_pe_header_t *pe_hdr) @@ -298,7 +299,7 @@ efi_call_1 (b->free_pool, buffer); diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h -index f79782e..8396bde 100644 +index f79782e1b..8396bde49 100644 --- a/include/grub/efi/pe32.h +++ b/include/grub/efi/pe32.h @@ -227,12 +227,18 @@ struct grub_pe32_section_table diff -Nru grub2-2.02/debian/patches/linuxefi_truncate_overlong_relocs.patch grub2-2.02/debian/patches/linuxefi_truncate_overlong_relocs.patch --- grub2-2.02/debian/patches/linuxefi_truncate_overlong_relocs.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_truncate_overlong_relocs.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 0785df0598ba00c074a087299cad1848396f7650 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 23 Nov 2016 06:27:09 +0100 Subject: efi/chainloader: truncate overlong relocation section @@ -64,7 +65,7 @@ 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 2353271..216cd7a 100644 +index 2353271cf..216cd7a24 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -596,7 +596,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) diff -Nru grub2-2.02/debian/patches/linuxefi_use_dev_chainloader_target.patch grub2-2.02/debian/patches/linuxefi_use_dev_chainloader_target.patch --- grub2-2.02/debian/patches/linuxefi_use_dev_chainloader_target.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/linuxefi_use_dev_chainloader_target.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b50288d7b1413d72ffa9dbe8faf2a7b025d78143 Mon Sep 17 00:00:00 2001 From: Raymund Will Date: Fri, 10 Apr 2015 01:45:02 -0400 Subject: Use device part of chainloader target, if present. @@ -20,7 +21,7 @@ 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index adc8563..14ce6dd 100644 +index adc856366..14ce6ddd7 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -223,8 +223,11 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/maybe_quiet.patch grub2-2.02/debian/patches/maybe_quiet.patch --- grub2-2.02/debian/patches/maybe_quiet.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/maybe_quiet.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 7fc33bcb8504d0eb50875157f2dfa30a043bdca0 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:26 +0000 Subject: Add configure option to reduce visual clutter at boot time @@ -44,7 +45,7 @@ 9 files changed, 111 insertions(+), 6 deletions(-) diff --git a/config.h.in b/config.h.in -index 9e8f991..d2c4ce8 100644 +index 9e8f9911b..d2c4ce8e5 100644 --- a/config.h.in +++ b/config.h.in @@ -12,6 +12,8 @@ @@ -57,7 +58,7 @@ /* We don't need those. */ #define MINILZO_CFG_SKIP_LZO_PTR 1 diff --git a/configure.ac b/configure.ac -index d4978ad..dd2fbd0 100644 +index d4978ad5d..dd2fbd01c 100644 --- a/configure.ac +++ b/configure.ac @@ -1830,6 +1830,17 @@ else @@ -90,7 +91,7 @@ echo "*******************************************************" ] diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S -index 2bd0b2d..451c8be 100644 +index 2bd0b2d28..451c8bea5 100644 --- a/grub-core/boot/i386/pc/boot.S +++ b/grub-core/boot/i386/pc/boot.S @@ -19,6 +19,9 @@ @@ -122,7 +123,7 @@ movw $disk_address_packet, %si diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S -index 1ee4cf5..31096ce 100644 +index 1ee4cf5b2..31096ce5a 100644 --- a/grub-core/boot/i386/pc/diskboot.S +++ b/grub-core/boot/i386/pc/diskboot.S @@ -18,6 +18,9 @@ @@ -202,7 +203,7 @@ notification_step: .asciz "." diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c -index 9cad0c4..5613cd5 100644 +index 9cad0c448..5613cd553 100644 --- a/grub-core/kern/main.c +++ b/grub-core/kern/main.c @@ -264,15 +264,25 @@ reclaim_module_space (void) @@ -245,7 +246,7 @@ grub_rescue_run (); } diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c -index dcd7d44..03826cf 100644 +index dcd7d4439..03826cf63 100644 --- a/grub-core/kern/rescue_reader.c +++ b/grub-core/kern/rescue_reader.c @@ -78,7 +78,9 @@ grub_rescue_read_line (char **line, int cont, @@ -259,7 +260,7 @@ while (1) { diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c -index 78a70a8..e924f64 100644 +index 78a70a8bf..e924f6448 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -389,6 +389,15 @@ static grub_err_t @@ -289,7 +290,7 @@ while (1) { diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c -index 9d0ad4c..1f3447a 100644 +index 9d0ad4c95..1f3447ad3 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -826,12 +826,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot) @@ -336,7 +337,7 @@ if (auto_boot) grub_menu_execute_with_fallback (menu, e, autobooted, diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 6046746..67d57ec 100644 +index 60467460b..67d57ecfd 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -21,6 +21,7 @@ prefix="@prefix@" diff -Nru grub2-2.02/debian/patches/misc-fix-invalid-char-strtol.patch grub2-2.02/debian/patches/misc-fix-invalid-char-strtol.patch --- grub2-2.02/debian/patches/misc-fix-invalid-char-strtol.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/misc-fix-invalid-char-strtol.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 4c03f9a7a3f1a8025f7b5d6936b5e03838908fb7 Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Thu, 27 Oct 2016 17:33:07 -0400 Subject: misc: fix invalid character recongition in strto*l @@ -13,7 +14,7 @@ 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index d1a54df..3a14d67 100644 +index d1a54df6c..3a14d679e 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -394,9 +394,13 @@ grub_strtoull (const char *str, char **end, int base) diff -Nru grub2-2.02/debian/patches/mkconfig_leave_breadcrumbs.patch grub2-2.02/debian/patches/mkconfig_leave_breadcrumbs.patch --- grub2-2.02/debian/patches/mkconfig_leave_breadcrumbs.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_leave_breadcrumbs.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 4c5bf7a6fa6798a5972bdf7999edd3bb5e294647 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Fri, 14 Dec 2018 13:46:14 -0500 Subject: grub-mkconfig: leave a trace of what files were sourced to generate @@ -10,7 +11,7 @@ 1 file changed, 2 insertions(+) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index 9fca8cd..f1e7ca8 100644 +index 9fca8cd7e..f1e7ca829 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -155,10 +155,12 @@ if [ x"$GRUB_FS" = xunknown ]; then diff -Nru grub2-2.02/debian/patches/mkconfig_loopback.patch grub2-2.02/debian/patches/mkconfig_loopback.patch --- grub2-2.02/debian/patches/mkconfig_loopback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_loopback.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 1193f4dfa4ad36e1cd5301522473da3c8a4baab2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:00 +0000 Subject: Handle filesystems loop-mounted on file images @@ -20,7 +21,7 @@ 3 files changed, 34 insertions(+) diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 3a4684e..9ee60d5 100644 +index 3a4684e78..9ee60d5fa 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -133,6 +133,22 @@ prepare_grub_to_access_device () @@ -62,7 +63,7 @@ grub_get_device_id () diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index c34d470..5ff76f5 100644 +index c34d470c9..5ff76f59a 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -40,6 +40,11 @@ fi @@ -78,7 +79,7 @@ esac diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index c48af94..af05bd2 100644 +index c48af948d..af05bd276 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -40,6 +40,11 @@ fi diff -Nru grub2-2.02/debian/patches/mkconfig_mid_upgrade.patch grub2-2.02/debian/patches/mkconfig_mid_upgrade.patch --- grub2-2.02/debian/patches/mkconfig_mid_upgrade.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_mid_upgrade.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 2f97dcc8caba3334636240f4417596c5ac27cc00 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:03 +0000 Subject: Bail out if trying to run grub-mkconfig during upgrade to 2.00 @@ -19,7 +20,7 @@ 1 file changed, 7 insertions(+) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index 54fbe52..99ba7ac 100644 +index 54fbe5288..99ba7acba 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -102,6 +102,13 @@ do diff -Nru grub2-2.02/debian/patches/mkconfig_nonexistent_loopback.patch grub2-2.02/debian/patches/mkconfig_nonexistent_loopback.patch --- grub2-2.02/debian/patches/mkconfig_nonexistent_loopback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_nonexistent_loopback.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 9e93c5490a5275ec97858de653adb0026ecb506c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:08 +0000 Subject: Avoid getting confused by inaccessible loop device backing paths @@ -13,7 +14,7 @@ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 9ee60d5..2c97430 100644 +index 9ee60d5fa..2c9743052 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -143,7 +143,7 @@ prepare_grub_to_access_device () @@ -26,7 +27,7 @@ esac ;; diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in -index 775ceb2..b7e1147 100644 +index 775ceb2e0..b7e1147c4 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -219,6 +219,11 @@ EOF diff -Nru grub2-2.02/debian/patches/mkconfig_other_inits.patch grub2-2.02/debian/patches/mkconfig_other_inits.patch --- grub2-2.02/debian/patches/mkconfig_other_inits.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_other_inits.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From e4486f6c454040dd254ac885298e7ba0ad656b8c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 3 Jan 2015 12:04:59 +0000 Subject: Generate alternative init entries in advanced menu @@ -17,7 +18,7 @@ 2 files changed, 21 insertions(+) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index ac445a3..e12d1cb 100644 +index ac445a370..e12d1cbce 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@ @@ -52,7 +53,7 @@ linux_entry "${OS}" "${version}" recovery \ "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}" diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index 62d6633..d3edb46 100644 +index 62d663334..d3edb46df 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@ diff -Nru grub2-2.02/debian/patches/mkconfig_recovery_title.patch grub2-2.02/debian/patches/mkconfig_recovery_title.patch --- grub2-2.02/debian/patches/mkconfig_recovery_title.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_recovery_title.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From d03c6cc84049213ef3d82c851fff35d666acb706 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:33 +0000 Subject: Add GRUB_RECOVERY_TITLE option @@ -20,7 +21,7 @@ 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi -index 5b2a7bb..f1216d1 100644 +index 5b2a7bbb2..f1216d19d 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1504,6 +1504,11 @@ a console is restricted or limited. @@ -36,7 +37,7 @@ The following options are still accepted for compatibility with existing diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index fac5604..ad71638 100644 +index fac560464..ad716384b 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -189,6 +189,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT" @@ -61,7 +62,7 @@ if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in -index 59a9a48..7fa3a3f 100644 +index 59a9a48a2..7fa3a3fbd 100644 --- a/util/grub.d/10_hurd.in +++ b/util/grub.d/10_hurd.in @@ -88,8 +88,8 @@ hurd_entry () { @@ -76,7 +77,7 @@ title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")" oldtitle="$OS using $kernel_base" diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in -index 9d8e8fd..8301d36 100644 +index 9d8e8fd85..8301d361a 100644 --- a/util/grub.d/10_kfreebsd.in +++ b/util/grub.d/10_kfreebsd.in @@ -76,7 +76,7 @@ kfreebsd_entry () @@ -89,7 +90,7 @@ title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")" fi diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 88bc0e3..4f6e92e 100644 +index 88bc0e300..4f6e92e39 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -116,7 +116,7 @@ linux_entry () @@ -102,7 +103,7 @@ title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; esac diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in -index 874f599..bb29cc0 100644 +index 874f59969..bb29cc046 100644 --- a/util/grub.d/10_netbsd.in +++ b/util/grub.d/10_netbsd.in @@ -102,7 +102,7 @@ netbsd_entry () @@ -115,7 +116,7 @@ title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")" fi diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index af05bd2..62d6633 100644 +index af05bd276..62d663334 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -95,7 +95,7 @@ linux_entry () diff -Nru grub2-2.02/debian/patches/mkconfig_signed_kernel.patch grub2-2.02/debian/patches/mkconfig_signed_kernel.patch --- grub2-2.02/debian/patches/mkconfig_signed_kernel.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_signed_kernel.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 3853b53c91000f146eedaa0d4c80cb5852da91ee Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:21 +0000 Subject: Generate configuration for signed UEFI kernels if available @@ -11,7 +12,7 @@ 1 file changed, 15 insertions(+) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 37c248c..6046746 100644 +index 37c248c54..60467460b 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -151,8 +151,16 @@ linux_entry () diff -Nru grub2-2.02/debian/patches/mkconfig_ubuntu_distributor.patch grub2-2.02/debian/patches/mkconfig_ubuntu_distributor.patch --- grub2-2.02/debian/patches/mkconfig_ubuntu_distributor.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_ubuntu_distributor.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a6a97ef2a7389c0c7f82ccb3e975238d2197bc8a Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 13 Jan 2014 12:13:14 +0000 Subject: Remove GNU/Linux from default distributor string for Ubuntu @@ -15,7 +16,7 @@ 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 37b5180..37c248c 100644 +index 37b5180f3..37c248c54 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -32,7 +32,14 @@ CLASS="--class gnu-linux --class gnu --class os" diff -Nru grub2-2.02/debian/patches/mkconfig_ubuntu_recovery.patch grub2-2.02/debian/patches/mkconfig_ubuntu_recovery.patch --- grub2-2.02/debian/patches/mkconfig_ubuntu_recovery.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkconfig_ubuntu_recovery.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,8 +1,9 @@ +From f67c03b94d4473b658247b7c72a0a9c37e0ddab6 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:06 +0000 Subject: "single" -> "recovery" when friendly-recovery is installed MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" +Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If configured with --enable-ubuntu-recovery, also set nomodeset for @@ -22,7 +23,7 @@ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index edd1841..d4978ad 100644 +index edd184154..d4978ad5d 100644 --- a/configure.ac +++ b/configure.ac @@ -1819,6 +1819,17 @@ fi @@ -44,7 +45,7 @@ AC_SUBST([FONT_SOURCE]) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 5ff76f5..37b5180 100644 +index 5ff76f59a..37b5180f3 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -20,6 +20,7 @@ set -e @@ -92,7 +93,7 @@ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '` diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in -index 515a68c..775ceb2 100644 +index 515a68c7a..775ceb2e0 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -220,7 +220,7 @@ EOF diff -Nru grub2-2.02/debian/patches/mkrescue_efi_modules.patch grub2-2.02/debian/patches/mkrescue_efi_modules.patch --- grub2-2.02/debian/patches/mkrescue_efi_modules.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/mkrescue_efi_modules.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 34e0d43849034eeec80e0f5a3fee15e4155f6d29 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 13 Jan 2014 12:12:59 +0000 Subject: Build vfat into EFI boot images @@ -13,7 +14,7 @@ 1 file changed, 2 insertions(+) diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c -index 238d484..10dc202 100644 +index 238d4840e..10dc2023b 100644 --- a/util/grub-mkrescue.c +++ b/util/grub-mkrescue.c @@ -738,6 +738,7 @@ main (int argc, char *argv[]) diff -Nru grub2-2.02/debian/patches/net_read_bracketed_ipv6_addr.patch grub2-2.02/debian/patches/net_read_bracketed_ipv6_addr.patch --- grub2-2.02/debian/patches/net_read_bracketed_ipv6_addr.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/net_read_bracketed_ipv6_addr.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From d6df380ed43561cc7cc3dcbf69beb12f7880ef31 Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Thu, 27 Oct 2016 17:39:49 -0400 Subject: net: read bracketed ipv6 addrs and port numbers @@ -15,7 +16,7 @@ 4 files changed, 110 insertions(+), 11 deletions(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c -index 5aa4ad3..f182d7b 100644 +index 5aa4ad3be..f182d7b87 100644 --- a/grub-core/net/http.c +++ b/grub-core/net/http.c @@ -312,12 +312,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) @@ -73,7 +74,7 @@ file); if (!data->sock) diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index 10773fc..fbac15e 100644 +index 10773fc34..fbac15e0f 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -437,6 +437,12 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest) @@ -210,7 +211,7 @@ } } diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 7d90bf6..a0817a0 100644 +index 7d90bf66e..a0817a075 100644 --- a/grub-core/net/tftp.c +++ b/grub-core/net/tftp.c @@ -314,6 +314,7 @@ tftp_open (struct grub_file *file, const char *filename) @@ -240,7 +241,7 @@ if (!data->sock) { diff --git a/include/grub/net.h b/include/grub/net.h -index 2192fa1..ccc169c 100644 +index 2192fa186..ccc169c2d 100644 --- a/include/grub/net.h +++ b/include/grub/net.h @@ -270,6 +270,7 @@ typedef struct grub_net diff -Nru grub2-2.02/debian/patches/no-devicetree-if-secure-boot.patch grub2-2.02/debian/patches/no-devicetree-if-secure-boot.patch --- grub2-2.02/debian/patches/no-devicetree-if-secure-boot.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/no-devicetree-if-secure-boot.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 05d3ab203e40872bc001d42222b58a518b3aa21b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 24 Apr 2019 10:03:04 -0400 Subject: Forbid the "devicetree" command when Secure Boot is enabled. @@ -16,10 +17,10 @@ grub-core/loader/efi/fdt.c | 9 +++++++++ 2 files changed, 22 insertions(+) -diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c -index d7ebae0..a6c51d7 100644 ---- a/grub-core/loader/arm/linux.c -+++ b/grub-core/loader/arm/linux.c +Index: grub2-2.02/grub-core/loader/arm/linux.c +=================================================================== +--- grub2-2.02.orig/grub-core/loader/arm/linux.c ++++ grub2-2.02/grub-core/loader/arm/linux.c @@ -30,6 +30,11 @@ #include #include @@ -32,7 +33,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); static grub_dl_t my_mod; -@@ -463,6 +468,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)), +@@ -463,6 +468,14 @@ grub_cmd_devicetree (grub_command_t cmd if (argc != 1) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); @@ -47,10 +48,10 @@ dtb = grub_file_open (argv[0]); if (!dtb) goto out; -diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c -index 3649852..a2d3d9e 100644 ---- a/grub-core/loader/efi/fdt.c -+++ b/grub-core/loader/efi/fdt.c +Index: grub2-2.02/grub-core/loader/efi/fdt.c +=================================================================== +--- grub2-2.02.orig/grub-core/loader/efi/fdt.c ++++ grub2-2.02/grub-core/loader/efi/fdt.c @@ -24,6 +24,7 @@ #include #include @@ -59,7 +60,7 @@ static void *loaded_fdt; static void *fdt; -@@ -122,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)), +@@ -122,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd return GRUB_ERR_NONE; } diff -Nru grub2-2.02/debian/patches/ofnet-init-structs-in-bootpath-parser.patch grub2-2.02/debian/patches/ofnet-init-structs-in-bootpath-parser.patch --- grub2-2.02/debian/patches/ofnet-init-structs-in-bootpath-parser.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ofnet-init-structs-in-bootpath-parser.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b7fd5ca68d1fe386b47960ea0f60df134c96fd8f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 23 Aug 2018 13:25:30 +0200 Subject: ofnet: Initialize structs in bootpath parser @@ -23,7 +24,7 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c -index a78d164..3a75365 100644 +index a78d164db..3a753658b 100644 --- a/grub-core/net/drivers/ieee1275/ofnet.c +++ b/grub-core/net/drivers/ieee1275/ofnet.c @@ -154,8 +154,8 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath, diff -Nru grub2-2.02/debian/patches/olpc_prefix_hack.patch grub2-2.02/debian/patches/olpc_prefix_hack.patch --- grub2-2.02/debian/patches/olpc_prefix_hack.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/olpc_prefix_hack.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 6efdf5b4112210f91d510c14401c0c56a5bc0c0e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:12:50 +0000 Subject: Hack prefix for OLPC @@ -10,7 +11,7 @@ 1 file changed, 11 insertions(+) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c -index 1259022..9d163ab 100644 +index 12590225e..9d163abcd 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -73,6 +73,7 @@ grub_exit (void) diff -Nru grub2-2.02/debian/patches/ppc64el-disable-vsx.patch grub2-2.02/debian/patches/ppc64el-disable-vsx.patch --- grub2-2.02/debian/patches/ppc64el-disable-vsx.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ppc64el-disable-vsx.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 671728baf6df3f1c3ed76b3556707baab5a38c83 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Thu, 25 Sep 2014 19:33:39 -0300 Subject: Disable VSX instruction @@ -20,7 +21,7 @@ 1 file changed, 12 insertions(+) diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S -index 21c884b..de9a960 100644 +index 21c884b43..de9a9601a 100644 --- a/grub-core/kern/powerpc/ieee1275/startup.S +++ b/grub-core/kern/powerpc/ieee1275/startup.S @@ -20,6 +20,8 @@ diff -Nru grub2-2.02/debian/patches/probe_fusionio.patch grub2-2.02/debian/patches/probe_fusionio.patch --- grub2-2.02/debian/patches/probe_fusionio.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/probe_fusionio.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 557224305ae832a5e99c15d97099853cac67046d Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:31 +0000 Subject: Probe FusionIO devices @@ -13,7 +14,7 @@ 2 files changed, 32 insertions(+) diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c -index 90d92d3..7adc0f3 100644 +index 90d92d3ad..7adc0f30e 100644 --- a/grub-core/osdep/linux/getroot.c +++ b/grub-core/osdep/linux/getroot.c @@ -950,6 +950,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st, @@ -37,7 +38,7 @@ return path; diff --git a/util/deviceiter.c b/util/deviceiter.c -index 23d49ae..bc68b25 100644 +index 23d49aecd..bc68b2549 100644 --- a/util/deviceiter.c +++ b/util/deviceiter.c @@ -383,6 +383,12 @@ get_nvme_disk_name (char *name, int controller, int namespace) diff -Nru grub2-2.02/debian/patches/quick-boot-lvm.patch grub2-2.02/debian/patches/quick-boot-lvm.patch --- grub2-2.02/debian/patches/quick-boot-lvm.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/quick-boot-lvm.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,7 +1,8 @@ +From de7f32d19958620ad72793fbe7982ecd3c73a259 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 30 Oct 2018 15:04:16 -0700 -Subject: If we don't have writable grubenv and we're on EFI, - always show the menu +Subject: If we don't have writable grubenv and we're on EFI, always show the + menu If we don't have writable grubenv, recordfail doesn't work, which means our quickboot behavior - with a timeout of 0 - leaves the user without a @@ -21,11 +22,11 @@ util/grub.d/00_header.in | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) -diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in -index 674a761..b7135b6 100644 ---- a/util/grub.d/00_header.in -+++ b/util/grub.d/00_header.in -@@ -115,7 +115,7 @@ EOF +Index: grub2-2.02+dfsg1/util/grub.d/00_header.in +=================================================================== +--- grub2-2.02+dfsg1.orig/util/grub.d/00_header.in ++++ grub2-2.02+dfsg1/util/grub.d/00_header.in +@@ -142,7 +142,7 @@ EOF cat < Date: Mon, 13 Jan 2014 12:13:28 +0000 Subject: Add configure option to bypass boot menu if possible @@ -32,7 +33,7 @@ 7 files changed, 141 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac -index dd2fbd0..e508f9c 100644 +index dd2fbd01c..e508f9c43 100644 --- a/configure.ac +++ b/configure.ac @@ -1841,6 +1841,17 @@ else @@ -54,7 +55,7 @@ AC_SUBST([FONT_SOURCE]) diff --git a/docs/grub.texi b/docs/grub.texi -index e935af3..5b2a7bb 100644 +index e935af33e..5b2a7bbb2 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1490,6 +1490,20 @@ This option may be set to a list of GRUB module names separated by spaces. @@ -79,7 +80,7 @@ The following options are still accepted for compatibility with existing diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c -index 1f3447a..906a480 100644 +index 1f3447ad3..906a480a2 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -604,6 +604,30 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot) @@ -114,7 +115,7 @@ { pos = grub_term_save_pos (); diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index b4f0011..fac5604 100644 +index b4f0011b5..fac560464 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -239,7 +239,8 @@ export GRUB_DEFAULT \ @@ -128,7 +129,7 @@ if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in -index 93a9023..674a761 100644 +index 93a90233e..674a76140 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -21,6 +21,8 @@ prefix="@prefix@" @@ -257,7 +258,7 @@ EOF } diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 67d57ec..0f8a168 100644 +index 67d57ecfd..0f8a16837 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -22,6 +22,7 @@ exec_prefix="@exec_prefix@" @@ -279,7 +280,7 @@ save_default_entry | grub_add_tab fi diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in -index 271044f..da5f288 100644 +index 271044f59..da5f28876 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -20,12 +20,26 @@ set -e diff -Nru grub2-2.02/debian/patches/restore_mkdevicemap.patch grub2-2.02/debian/patches/restore_mkdevicemap.patch --- grub2-2.02/debian/patches/restore_mkdevicemap.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/restore_mkdevicemap.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 7611a560ab6cd5edc3eefd20b291239deceb448f Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:01 +0000 Subject: Restore grub-mkdevicemap @@ -27,7 +28,7 @@ create mode 100644 util/grub-mkdevicemap.c diff --git a/Makefile.util.def b/Makefile.util.def -index f9caccb..c939deb 100644 +index f9caccb97..c939deb92 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -314,6 +314,23 @@ program = { @@ -56,7 +57,7 @@ installdir = sbin; diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m new file mode 100644 -index 0000000..96cd6ee +index 000000000..96cd6ee72 --- /dev/null +++ b/docs/man/grub-mkdevicemap.h2m @@ -0,0 +1,4 @@ @@ -66,7 +67,7 @@ +.BR grub-probe (8) diff --git a/include/grub/util/deviceiter.h b/include/grub/util/deviceiter.h new file mode 100644 -index 0000000..8537497 +index 000000000..85374978c --- /dev/null +++ b/include/grub/util/deviceiter.h @@ -0,0 +1,14 @@ @@ -86,7 +87,7 @@ +#endif /* ! GRUB_DEVICEITER_MACHINE_UTIL_HEADER */ diff --git a/util/deviceiter.c b/util/deviceiter.c new file mode 100644 -index 0000000..23d49ae +index 000000000..23d49aecd --- /dev/null +++ b/util/deviceiter.c @@ -0,0 +1,1021 @@ @@ -1113,7 +1114,7 @@ +} diff --git a/util/devicemap.c b/util/devicemap.c new file mode 100644 -index 0000000..c618644 +index 000000000..c61864420 --- /dev/null +++ b/util/devicemap.c @@ -0,0 +1,13 @@ @@ -1132,7 +1133,7 @@ +} diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c new file mode 100644 -index 0000000..c4bbdbf +index 000000000..c4bbdbf69 --- /dev/null +++ b/util/grub-mkdevicemap.c @@ -0,0 +1,181 @@ diff -Nru grub2-2.02/debian/patches/R_X86_64_PLT32.patch grub2-2.02/debian/patches/R_X86_64_PLT32.patch --- grub2-2.02/debian/patches/R_X86_64_PLT32.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/R_X86_64_PLT32.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 02702bdfe14d8a04643a45b03715f734ae34dbac Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 17 Feb 2018 06:47:28 -0800 Subject: x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32 @@ -25,7 +26,7 @@ 4 files changed, 4 insertions(+) diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c -index e49d0b6..18facf4 100644 +index e49d0b6ff..18facf47f 100644 --- a/grub-core/efiemu/i386/loadcore64.c +++ b/grub-core/efiemu/i386/loadcore64.c @@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs, @@ -37,7 +38,7 @@ *addr32 + rel->r_addend + sym.off diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c -index 4406906..3a73e6e 100644 +index 440690673..3a73e6e6c 100644 --- a/grub-core/kern/x86_64/dl.c +++ b/grub-core/kern/x86_64/dl.c @@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr, @@ -49,7 +50,7 @@ grub_int64_t value; value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value - diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c -index 3d92b5a..4473b02 100644 +index e63f148e4..f20255a28 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -832,6 +832,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, @@ -61,7 +62,7 @@ grub_uint32_t *t32 = (grub_uint32_t *) target; *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c -index 9179285..a79271f 100644 +index 9179285a5..a79271f66 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = { diff -Nru grub2-2.02/debian/patches/series grub2-2.02/debian/patches/series --- grub2-2.02/debian/patches/series 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/series 2022-11-15 11:13:43.000000000 +0000 @@ -120,5 +120,3 @@ ubuntu-linuxefi-arm64-set-base-addr.patch tftp-rollover-block-counter.patch R_X86_64_PLT32.patch -ubuntu-add-initrd-less-boot-fallback.patch -ubuntu-add-initrd-less-boot-messages.patch diff -Nru grub2-2.02/debian/patches/shorter_version_info.patch grub2-2.02/debian/patches/shorter_version_info.patch --- grub2-2.02/debian/patches/shorter_version_info.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/shorter_version_info.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 12444796c479021b549411de79f9f717b270f71c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 8 Feb 2018 10:48:37 +0100 Subject: Show only upstream version, hide rest in package_version variable @@ -15,7 +16,7 @@ 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c -index e924f64..4a6b3bf 100644 +index e924f6448..4a6b3bff0 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -208,7 +208,7 @@ grub_normal_init_page (struct grub_term_output *term, diff -Nru grub2-2.02/debian/patches/skip_gettext_strings_test.patch grub2-2.02/debian/patches/skip_gettext_strings_test.patch --- grub2-2.02/debian/patches/skip_gettext_strings_test.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/skip_gettext_strings_test.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 5b8b9c5d17fdd43cfb9df980d7ad7ee594124b31 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:34 +0000 Subject: Don't run gettext_strings_test @@ -13,7 +14,7 @@ 1 file changed, 3 insertions(+) diff --git a/tests/gettext_strings_test.in b/tests/gettext_strings_test.in -index 5c305e7..15405cf 100644 +index 5c305e75b..15405cfcd 100644 --- a/tests/gettext_strings_test.in +++ b/tests/gettext_strings_test.in @@ -1,5 +1,8 @@ diff -Nru grub2-2.02/debian/patches/skip_text_gfxpayload_where_not_supported.patch grub2-2.02/debian/patches/skip_text_gfxpayload_where_not_supported.patch --- grub2-2.02/debian/patches/skip_text_gfxpayload_where_not_supported.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/skip_text_gfxpayload_where_not_supported.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,7 +1,8 @@ +From 93befb2195838a727bc76d364d8da7c671520098 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Fri, 9 Feb 2018 11:14:35 -0500 -Subject: video: skip 'text' gfxpayload if not supported, - to fallback to default +Subject: video: skip 'text' gfxpayload if not supported, to fallback to + default On UEFI, 'text' gfxpayload is not supported, but we still reach parse_modespec with it, which will obviously fail. Fortunately, whatever gfxpayload is set, @@ -20,7 +21,7 @@ 1 file changed, 2 insertions(+) diff --git a/grub-core/video/video.c b/grub-core/video/video.c -index f252663..9834241 100644 +index f252663c1..983424107 100644 --- a/grub-core/video/video.c +++ b/grub-core/video/video.c @@ -663,6 +663,8 @@ grub_video_set_mode (const char *modestring, diff -Nru grub2-2.02/debian/patches/sleep_shift.patch grub2-2.02/debian/patches/sleep_shift.patch --- grub2-2.02/debian/patches/sleep_shift.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/sleep_shift.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 92ec64efc4a42b39df59f240eb92ff8b13ef2f72 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:23 +0000 Subject: Allow Shift to interrupt 'sleep --interruptible' @@ -16,7 +17,7 @@ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c -index e77e790..3906b14 100644 +index e77e7900f..3906b1410 100644 --- a/grub-core/commands/sleep.c +++ b/grub-core/commands/sleep.c @@ -46,6 +46,31 @@ do_print (int n) @@ -61,7 +62,7 @@ return 0; diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c -index 719e2fb..9d0ad4c 100644 +index 719e2fb1c..9d0ad4c95 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -615,8 +615,27 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot) diff -Nru grub2-2.02/debian/patches/support_initrd-less_boot.patch grub2-2.02/debian/patches/support_initrd-less_boot.patch --- grub2-2.02/debian/patches/support_initrd-less_boot.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/support_initrd-less_boot.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 45513019aa537431885e7f385d6952a97938a832 Mon Sep 17 00:00:00 2001 From: Chris Glass Date: Thu, 10 Nov 2016 13:44:25 -0500 Subject: Added knobs to allow non-initrd boot config @@ -17,7 +18,7 @@ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/docs/grub.info b/docs/grub.info -index 954cc9a..b850016 100644 +index 954cc9a27..b850016a0 100644 --- a/docs/grub.info +++ b/docs/grub.info @@ -1404,6 +1404,19 @@ it must be quoted. For example: @@ -41,7 +42,7 @@ existing configurations, but have better replacements: diff --git a/docs/grub.texi b/docs/grub.texi -index f1216d1..e5dbc63 100644 +index f1216d19d..e5dbc6375 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1509,6 +1509,19 @@ This option sets the English text of the string that will be displayed in @@ -65,7 +66,7 @@ The following options are still accepted for compatibility with existing diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index ad71638..9fca8cd 100644 +index ad716384b..9fca8cd7e 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -245,7 +245,9 @@ export GRUB_DEFAULT \ @@ -80,7 +81,7 @@ if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index e12d1cb..76d4f31 100644 +index e12d1cbce..76d4f31bf 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -179,11 +179,17 @@ EOF diff -Nru grub2-2.02/debian/patches/syslinux-test-out-of-tree.patch grub2-2.02/debian/patches/syslinux-test-out-of-tree.patch --- grub2-2.02/debian/patches/syslinux-test-out-of-tree.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/syslinux-test-out-of-tree.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 747bc75140f0cafb1ea0a755d3159884d241c624 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 18 Sep 2016 17:26:00 +0100 Subject: syslinux_test: Fix out-of-tree build handling @@ -23,7 +24,7 @@ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 7795bae..f0ab1ad 100644 +index 7795baeb6..f0ab1adc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -473,9 +473,3 @@ ChangeLog: FORCE @@ -37,7 +38,7 @@ - (for x in tests/syslinux/ubuntu10.04_grub.cfg.in ; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:- -CLEANFILES += tests/syslinux/ubuntu10.04_grub.cfg diff --git a/tests/syslinux/ubuntu10.04_grub.cfg.in b/tests/syslinux/ubuntu10.04_grub.cfg.in -index 846e4ac..f285afb 100644 +index 846e4acf0..f285afb1e 100644 --- a/tests/syslinux/ubuntu10.04_grub.cfg.in +++ b/tests/syslinux/ubuntu10.04_grub.cfg.in @@ -1,4 +1,4 @@ @@ -141,7 +142,7 @@ } } diff --git a/tests/syslinux_test.in b/tests/syslinux_test.in -index fc4edd8..4ba94c5 100644 +index fc4edd8ef..4ba94c576 100644 --- a/tests/syslinux_test.in +++ b/tests/syslinux_test.in @@ -2,15 +2,21 @@ diff -Nru grub2-2.02/debian/patches/tftp-rollover-block-counter.patch grub2-2.02/debian/patches/tftp-rollover-block-counter.patch --- grub2-2.02/debian/patches/tftp-rollover-block-counter.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/tftp-rollover-block-counter.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From b2bd086d143301c2d70529b2858d55de91fdbb31 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 10 Sep 2020 17:17:57 +0200 Subject: tftp: Roll-over block counter to prevent data packets timeouts @@ -48,7 +49,7 @@ 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index e6566fa..33c0b82 100644 +index e6566fa17..33c0b8214 100644 --- a/grub-core/net/tftp.c +++ b/grub-core/net/tftp.c @@ -183,11 +183,22 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), diff -Nru grub2-2.02/debian/patches/tsc_efi_default_to_pmtimer.patch grub2-2.02/debian/patches/tsc_efi_default_to_pmtimer.patch --- grub2-2.02/debian/patches/tsc_efi_default_to_pmtimer.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/tsc_efi_default_to_pmtimer.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a33332afe411e330eeb8bed2860835ad55af01a1 Mon Sep 17 00:00:00 2001 From: "David E. Box" Date: Fri, 15 Sep 2017 15:37:05 -0700 Subject: tsc: Change default tsc calibration method to pmtimer on EFI systems @@ -19,7 +20,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c -index 2e85289..f266eb1 100644 +index 2e85289d8..f266eb131 100644 --- a/grub-core/kern/i386/tsc.c +++ b/grub-core/kern/i386/tsc.c @@ -68,7 +68,7 @@ grub_tsc_init (void) diff -Nru grub2-2.02/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch grub2-2.02/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch --- grub2-2.02/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,209 +0,0 @@ -From: Chris Glass -Date: Fri, 9 Mar 2018 13:47:07 +0100 -Subject: UBUNTU: Added initrd-less boot capabilities. - -In case the kernel fails to boot without an initrd, grub will fallback -to trying to boot the kernel with an initrd. - -Signed-off-by: Steve Langasek - -Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch ---- - Makefile.am | 3 ++ - configure.ac | 10 +++++++ - grub-initrd-fallback.service | 14 ++++++++++ - util/grub.d/00_header.in | 27 ++++++++++++++++++ - util/grub.d/10_linux.in | 66 +++++++++++++++++++++++++++++++++++--------- - 5 files changed, 107 insertions(+), 13 deletions(-) - create mode 100644 grub-initrd-fallback.service - -diff --git a/Makefile.am b/Makefile.am -index f0ab1ad..aaf2bbf 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -472,4 +472,7 @@ ChangeLog: FORCE - touch $@; \ - fi - -+systemdsystemunit_DATA = \ -+ grub-initrd-fallback.service -+ - EXTRA_DIST += ChangeLog ChangeLog-2015 -diff --git a/configure.ac b/configure.ac -index 3fbd7b0..05920c2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -287,6 +287,16 @@ AC_SUBST(grubdirname) - AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname", - [Default grub directory name]) - -+##### systemd unit files -+AC_ARG_WITH([systemdsystemunitdir], -+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), -+ [], -+ [with_systemdsystemunitdir=/usr/lib/systemd/system], -+ [with_systemdsystemunitdir=no]) -+if test "x$with_systemdsystemunitdir" != xno; then -+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) -+fi -+ - # - # Checks for build programs. - # -diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service -new file mode 100644 -index 0000000..1a0a4e5 ---- /dev/null -+++ b/grub-initrd-fallback.service -@@ -0,0 +1,14 @@ -+[Unit] -+Description=GRUB failed boot detection -+After=local-fs.target -+After=grub-common.service -+After=sleep.target -+ -+[Service] -+Type=oneshot -+ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset initrdfail -+ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset prev_entry -+TimeoutSec=0 -+ -+[Install] -+WantedBy=multi-user.target rescue.target emergency.target sleep.target -diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in -index b7135b6..2642f66 100644 ---- a/util/grub.d/00_header.in -+++ b/util/grub.d/00_header.in -@@ -50,6 +50,18 @@ if [ -s \$prefix/grubenv ]; then - load_env - fi - EOF -+cat < -Date: Mon, 26 Oct 2020 11:38:34 +0000 -Subject: Ubuntu: add initrd-less-boot informational messages - -Add additional messages when initrd-less boot is attempted or -fails. As otherwise it is not obvious why boot seems to panic and -reboot by default. ---- - grub-initrd-fallback.service | 1 + - util/grub.d/10_linux.in | 10 ++++++++++ - 2 files changed, 11 insertions(+) - -diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service -index 1a0a4e5..59d1a62 100644 ---- a/grub-initrd-fallback.service -+++ b/grub-initrd-fallback.service -@@ -3,6 +3,7 @@ Description=GRUB failed boot detection - After=local-fs.target - After=grub-common.service - After=sleep.target -+ConditionPathExists=/boot/grub/grub.cfg - - [Service] - Type=oneshot -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 6fe1377..3eeda4e 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -105,6 +105,12 @@ if [ "$vt_handoff" = 1 ]; then - fi - - if [ x"$GRUB_FORCE_PARTUUID" != x ]; then -+ gettext_printf "GRUB_FORCE_PARTUUID is set, will attempt initrdless boot\n" >&2 -+ cat << EOF -+# -+# GRUB_FORCE_PARTUUID is set, will attempt initrdless boot -+# Upon panic fallback to booting with initrd -+EOF - echo "set partuuid=${GRUB_FORCE_PARTUUID}" - fi - -@@ -190,6 +196,8 @@ EOF - linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}" - fi - message="$(gettext_printf "Loading initial ramdisk ...")" -+ initrdlessfail_msg="$(gettext_printf "GRUB_FORCE_PARTUUID set, initrdless boot failed. Attempting with initrd.")" -+ initrdlesstry_msg="$(gettext_printf "GRUB_FORCE_PARTUUID set, attempting initrdless boot.")" - initrd_path= - for i in ${initrd}; do - initrd_path="${initrd_path} ${rel_dirname}/${i}" -@@ -201,6 +209,7 @@ EOF - if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then - sed "s/^/$submenu_indentation/" << EOF - if [ "\${initrdfail}" = 1 ]; then -+ echo '$(echo "$initrdlessfail_msg" | grub_quote)' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} - EOF - if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then -@@ -211,6 +220,7 @@ EOF - sed "s/^/$submenu_indentation/" << EOF - initrd $(echo $initrd_path) - else -+ echo '$(echo "$initrdlesstry_msg" | grub_quote)' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1 - EOF - if [ -n "$initrd_path_only_early" ]; then diff -Nru grub2-2.02/debian/patches/ubuntu-flavour-order.patch grub2-2.02/debian/patches/ubuntu-flavour-order.patch --- grub2-2.02/debian/patches/ubuntu-flavour-order.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-flavour-order.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 2d236733ca4d74521cefab7fbf5e0f00967a028b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 9 Jun 2020 11:50:23 +0200 Subject: UBUNTU: Add GRUB_FLAVOUR_ORDER configuration item @@ -18,8 +19,6 @@ util/grub-mkconfig_lib.in | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) -diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index f1e7ca8..2300a94 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -249,7 +249,8 @@ export GRUB_DEFAULT \ @@ -32,8 +31,6 @@ if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" -diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 2c97430..a64f5e0 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -269,6 +269,21 @@ version_test_gt () diff -Nru grub2-2.02/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch grub2-2.02/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch --- grub2-2.02/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,7 +1,7 @@ +From 3c882239552fa5b95e767403b0fd229967ff5263 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 23 Apr 2020 15:06:46 +0200 -Subject: efi: Set image base address before jumping to the PE/COFF entry - point +Subject: efi: Set image base address before jumping to the PE/COFF entry point Upstream GRUB uses the EFI LoadImage() and StartImage() to boot the Linux kernel. But our custom EFI loader that supports Secure Boot instead uses @@ -34,10 +34,10 @@ 1 file changed, 15 insertions(+) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c -index d9b5380..1682e58 100644 +index f6d30bcf7..a09479cd6 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c -@@ -70,6 +70,7 @@ grub_err_t +@@ -72,6 +72,7 @@ grub_err_t grub_efi_linux_boot (void *kernel_addr, grub_off_t handover_offset, void *kernel_params) { @@ -45,7 +45,7 @@ handover_func hf; int offset = 0; -@@ -77,6 +78,20 @@ grub_efi_linux_boot (void *kernel_addr, grub_off_t handover_offset, +@@ -80,6 +81,20 @@ grub_efi_linux_boot (void *kernel_addr, grub_off_t handover_offset, offset = 512; #endif diff -Nru grub2-2.02/debian/patches/ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch grub2-2.02/debian/patches/ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch --- grub2-2.02/debian/patches/ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From a9ec17dcc442a6a0b09e480ca864746438cc3fad Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Wed, 11 Mar 2020 16:46:00 +0100 Subject: ubuntu: Make the linux command in EFI grub always try EFI handover @@ -12,15 +13,15 @@ a fallback to the non-EFI handover path on kernels that don't support it, but only if secure boot is disabled. --- - grub-core/loader/i386/efi/linux.c | 14 +++++++----- - grub-core/loader/i386/linux.c | 47 ++++++++++++++++++++++----------------- + grub-core/loader/i386/efi/linux.c | 14 +++++---- + grub-core/loader/i386/linux.c | 47 +++++++++++++++++-------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 9f70256..2ff2472 100644 +index 6b6aef87f..fe3ca2c59 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c -@@ -28,6 +28,7 @@ +@@ -27,6 +27,7 @@ #include #include #include @@ -28,7 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); -@@ -197,12 +198,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -195,12 +196,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), goto fail; } @@ -50,10 +51,10 @@ params = grub_efi_allocate_pages_max (0x3fffffff, diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c -index 7226151..43e5009 100644 +index 4328bcbdb..991eb29db 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c -@@ -702,35 +702,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -658,35 +658,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), #ifdef GRUB_MACHINE_EFI using_linuxefi = 0; diff -Nru grub2-2.02/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch grub2-2.02/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch --- grub2-2.02/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-recovery-dis_ucode_ldr.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 8052bb59dd6b89c8937afcf9000c4c13a82acc8f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 19 Jun 2020 12:57:19 +0200 Subject: Pass dis_ucode_ldr to kernel for recovery mode @@ -13,11 +14,10 @@ LP: #1831789 Patch-Name: ubuntu-recovery-dis_ucode_ldr.patch --- - util/grub.d/10_linux.in | 4 ++++ - 1 file changed, 4 insertions(+) + util/grub.d/10_linux.in | 4 ++++ + util/grub.d/10_linux_zfs.in | 24 +++++++++++++++--------- + 2 files changed, 19 insertions(+), 9 deletions(-) -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 76d4f31..82fd19f 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -228,6 +228,10 @@ case "$machine" in diff -Nru grub2-2.02/debian/patches/ubuntu-Update-the-linux-boot-protocol-version-check.patch grub2-2.02/debian/patches/ubuntu-Update-the-linux-boot-protocol-version-check.patch --- grub2-2.02/debian/patches/ubuntu-Update-the-linux-boot-protocol-version-check.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/ubuntu-Update-the-linux-boot-protocol-version-check.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From e13f71514b0b6ca3b3e15cb8013a8db1e47d3ea9 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Wed, 11 Mar 2020 16:46:41 +0100 Subject: ubuntu: Update the linux boot protocol version check. @@ -10,10 +11,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c -index 2ff2472..0ec3138 100644 +index fe3ca2c59..2929da7a2 100644 --- a/grub-core/loader/i386/efi/linux.c +++ b/grub-core/loader/i386/efi/linux.c -@@ -247,7 +247,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -245,7 +245,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), } grub_dprintf ("linuxefi", "checking lh->version\n"); diff -Nru grub2-2.02/debian/patches/uefi_firmware_setup.patch grub2-2.02/debian/patches/uefi_firmware_setup.patch --- grub2-2.02/debian/patches/uefi_firmware_setup.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/uefi_firmware_setup.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 038ddb96f4f6435eed5300d0a56ad5bc3a5f08a1 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 13 Jan 2014 12:13:12 +0000 Subject: Output a menu entry for firmware setup on UEFI FastBoot systems @@ -13,7 +14,7 @@ create mode 100644 util/grub.d/30_uefi-firmware.in diff --git a/Makefile.util.def b/Makefile.util.def -index c939deb..168acbe 100644 +index c939deb92..168acbe59 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -509,6 +509,12 @@ script = { @@ -31,7 +32,7 @@ common = util/grub.d/40_custom.in; diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in new file mode 100644 -index 0000000..3c9f533 +index 000000000..3c9f533d8 --- /dev/null +++ b/util/grub.d/30_uefi-firmware.in @@ -0,0 +1,46 @@ diff -Nru grub2-2.02/debian/patches/vt_handoff.patch grub2-2.02/debian/patches/vt_handoff.patch --- grub2-2.02/debian/patches/vt_handoff.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/vt_handoff.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,8 +1,9 @@ +From 6780bb7c063fdd0d6f673f8e4a1ad8b17eac3a4a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:30 +0000 Subject: Add configure option to use vt.handoff=1 MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" +Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is used for non-recovery Linux entries only; it enables @@ -23,7 +24,7 @@ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 7f14313..cd1f498 100644 +index 7f1431352..cd1f49837 100644 --- a/configure.ac +++ b/configure.ac @@ -1863,6 +1863,17 @@ else @@ -45,7 +46,7 @@ AC_SUBST([FONT_SOURCE]) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 2983b51..88bc0e3 100644 +index 2983b515f..88bc0e300 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -24,6 +24,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@" diff -Nru grub2-2.02/debian/patches/wubi_no_windows.patch grub2-2.02/debian/patches/wubi_no_windows.patch --- grub2-2.02/debian/patches/wubi_no_windows.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/wubi_no_windows.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 7a96e342177d981b98d7d68900d56feb41b6b3b8 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Jan 2014 12:13:24 +0000 Subject: Skip Windows os-prober entries on Wubi systems @@ -18,7 +19,7 @@ 1 file changed, 19 insertions(+) diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in -index b7e1147..271044f 100644 +index b7e1147c4..271044f59 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -110,6 +110,8 @@ EOF diff -Nru grub2-2.02/debian/patches/yylex-explicitly_cast_fprintf_to_void.patch grub2-2.02/debian/patches/yylex-explicitly_cast_fprintf_to_void.patch --- grub2-2.02/debian/patches/yylex-explicitly_cast_fprintf_to_void.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/yylex-explicitly_cast_fprintf_to_void.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 4a2879d2ea9e6179ac0f45d7196b9d905fcab0f6 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 14 Aug 2017 14:11:43 +0200 Subject: yylex: Explicilty cast fprintf to void. @@ -10,7 +11,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l -index 95b2191..7b44c37 100644 +index 95b219170..7b44c37b7 100644 --- a/grub-core/script/yylex.l +++ b/grub-core/script/yylex.l @@ -91,7 +91,7 @@ typedef size_t yy_size_t; diff -Nru grub2-2.02/debian/patches/zpool_full_device_name.patch grub2-2.02/debian/patches/zpool_full_device_name.patch --- grub2-2.02/debian/patches/zpool_full_device_name.patch 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/patches/zpool_full_device_name.patch 2022-11-15 11:13:43.000000000 +0000 @@ -1,3 +1,4 @@ +From 1cf083669c252b7c7e9a38ebb716b81ad9707f87 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Thu, 27 Oct 2016 17:15:07 -0400 Subject: Tell zpool to emit full device names @@ -19,7 +20,7 @@ 1 file changed, 1 insertion(+) diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c -index 4bf37b0..d5fde7f 100644 +index 4bf37b027..d5fde7f86 100644 --- a/grub-core/osdep/unix/getroot.c +++ b/grub-core/osdep/unix/getroot.c @@ -240,6 +240,7 @@ grub_util_find_root_devices_from_poolname (char *poolname) diff -Nru grub2-2.02/debian/rules grub2-2.02/debian/rules --- grub2-2.02/debian/rules 2021-10-05 13:08:40.000000000 +0000 +++ grub2-2.02/debian/rules 2022-11-15 11:13:43.000000000 +0000 @@ -115,7 +115,7 @@ endif %: - dh $@ --with systemd --parallel + dh $@ --parallel override_dh_auto_configure: $(patsubst %,configure/%,$(BUILD_PACKAGES))