Merge ~xnox/grub:xnox/hirsute-next into ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 51a43eb73e3ead08b2fe3d1df207f12b5eb319ec
Proposed branch: ~xnox/grub:xnox/hirsute-next
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu
Diff against target: 6825 lines (+2306/-608)
156 files modified
debian/.git-dpm (+2/-2)
debian/changelog (+20/-3)
debian/control (+2/-0)
debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch (+1/-1)
debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch (+1/-1)
debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch (+2/-2)
debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch (+1/-1)
debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch (+1/-1)
debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch (+3/-3)
debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch (+7/-7)
debian/patches/0084-calloc-Use-calloc-at-most-places.patch (+86/-86)
debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch (+23/-23)
debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch (+1/-1)
debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch (+1/-1)
debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch (+1/-1)
debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch (+1/-1)
debian/patches/0090-tftp-Do-not-use-priority-queue.patch (+1/-1)
debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch (+1/-1)
debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch (+4/-4)
debian/patches/0093-hfsplus-fix-two-more-overflows.patch (+1/-1)
debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch (+1/-1)
debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch (+4/-4)
debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch (+4/-4)
debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch (+1/-1)
debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch (+9/-9)
debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch (+1/-1)
debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch (+4/-4)
debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch (+13/-13)
debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch (+1/-1)
debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch (+1/-1)
debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch (+1/-1)
debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch (+1/-1)
debian/patches/at_keyboard-module-init.patch (+1/-1)
debian/patches/bash-completion-drop-have-checks.patch (+1/-1)
debian/patches/blacklist-1440x900x32.patch (+1/-1)
debian/patches/bootp-new-net_bootp6-command.patch (+3/-3)
debian/patches/bootp-process-dhcpack-http-boot.patch (+2/-2)
debian/patches/cherrypick-lsefisystab-define-smbios3.patch (+2/-2)
debian/patches/cherrypick-lsefisystab-show-dtb.patch (+1/-1)
debian/patches/cherrypick-smbios-module.patch (+7/-7)
debian/patches/core-in-fs.patch (+1/-1)
debian/patches/default-grub-d.patch (+2/-2)
debian/patches/disable-floppies.patch (+1/-1)
debian/patches/dpkg-version-comparison.patch (+1/-1)
debian/patches/efi-variable-storage-minimise-writes.patch (+8/-8)
debian/patches/efinet-set-dns-from-uefi-proto.patch (+2/-2)
debian/patches/efinet-set-network-from-uefi-devpath.patch (+2/-2)
debian/patches/efinet-uefi-ipv6-pxe-support.patch (+2/-2)
debian/patches/gettext-quiet.patch (+1/-1)
debian/patches/gfxpayload-dynamic.patch (+6/-6)
debian/patches/gfxpayload-keep-default.patch (+2/-2)
debian/patches/grub-install-backup-and-restore.patch (+2/-2)
debian/patches/grub-install-pvxen-paths.patch (+1/-1)
debian/patches/grub-legacy-0-based-partitions.patch (+1/-1)
debian/patches/grub.cfg-400.patch (+1/-1)
debian/patches/ieee1275-clear-reset.patch (+1/-1)
debian/patches/ignore-grub_func_test-failures.patch (+1/-1)
debian/patches/insmod-xzio-and-lzopio-on-xen.patch (+2/-2)
debian/patches/install-efi-fallback.patch (+1/-1)
debian/patches/install-efi-ubuntu-flavours.patch (+1/-1)
debian/patches/install-locale-langpack.patch (+1/-1)
debian/patches/install-powerpc-machtypes.patch (+6/-6)
debian/patches/install-stage2-confusion.patch (+1/-1)
debian/patches/maybe-quiet.patch (+10/-10)
debian/patches/mkconfig-loopback.patch (+3/-3)
debian/patches/mkconfig-mid-upgrade.patch (+1/-1)
debian/patches/mkconfig-nonexistent-loopback.patch (+2/-2)
debian/patches/mkconfig-other-inits.patch (+2/-2)
debian/patches/mkconfig-recovery-title.patch (+8/-8)
debian/patches/mkconfig-signed-kernel.patch (+2/-2)
debian/patches/mkconfig-ubuntu-distributor.patch (+2/-2)
debian/patches/mkconfig-ubuntu-recovery.patch (+4/-4)
debian/patches/mkrescue-efi-modules.patch (+1/-1)
debian/patches/net-read-bracketed-ipv6-addr.patch (+4/-4)
debian/patches/no-devicetree-if-secure-boot.patch (+2/-2)
debian/patches/no-insmod-on-sb.patch (+3/-3)
debian/patches/olpc-prefix-hack.patch (+1/-1)
debian/patches/ppc64el-disable-vsx.patch (+1/-1)
debian/patches/probe-fusionio.patch (+2/-2)
debian/patches/quick-boot-lvm.patch (+1/-1)
debian/patches/quick-boot.patch (+8/-8)
debian/patches/restore-mkdevicemap.patch (+6/-6)
debian/patches/rhboot-f34-dont-use-int-for-efi-status.patch (+24/-0)
debian/patches/rhboot-f34-make-exit-take-a-return-code.patch (+269/-0)
debian/patches/rhboot-f34-make-pmtimer-tsc-calibration-fast.patch (+214/-0)
debian/patches/rhboot-f34-support-non-ethernet.patch (+770/-0)
debian/patches/rhboot-f34-tcp-add-window-scaling-support.patch (+90/-0)
debian/patches/series (+8/-0)
debian/patches/skip-grub_cmd_set_date.patch (+1/-1)
debian/patches/sleep-shift.patch (+2/-2)
debian/patches/tftp-rollover-block-counter.patch (+1/-1)
debian/patches/ubuntu-add-devicetree-command-support.patch (+1/-1)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch (+5/-5)
debian/patches/ubuntu-add-initrd-less-boot-messages.patch (+1/-1)
debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch (+1/-1)
debian/patches/ubuntu-dejavu-font-path.patch (+1/-1)
debian/patches/ubuntu-dont-verify-loopback-images.patch (+1/-1)
debian/patches/ubuntu-efi-allow-loopmount-chainload.patch (+3/-3)
debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch (+1/-1)
debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch (+1/-1)
debian/patches/ubuntu-fix-reproducible-squashfs-test.patch (+31/-0)
debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch (+54/-0)
debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet.patch (+25/-0)
debian/patches/ubuntu-flavour-order.patch (+2/-2)
debian/patches/ubuntu-grub-install-extra-removable.patch (+1/-1)
debian/patches/ubuntu-install-signed.patch (+1/-1)
debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch (+1/-1)
debian/patches/ubuntu-linuxefi-arm64.patch (+1/-1)
debian/patches/ubuntu-linuxefi.patch (+30/-30)
debian/patches/ubuntu-mkconfig-leave-breadcrumbs.patch (+1/-1)
debian/patches/ubuntu-recovery-dis_ucode_ldr.patch (+2/-2)
debian/patches/ubuntu-resilient-boot-boot-order.patch (+6/-6)
debian/patches/ubuntu-resilient-boot-ignore-alternative-esps.patch (+1/-1)
debian/patches/ubuntu-shorter-version-info.patch (+1/-1)
debian/patches/ubuntu-skip-disk-by-id-lvm-pvm-uuid-entries.patch (+1/-1)
debian/patches/ubuntu-speed-zsys-history.patch (+1/-1)
debian/patches/ubuntu-support-initrd-less-boot.patch (+4/-4)
debian/patches/ubuntu-temp-keep-auto-nvram.patch (+1/-1)
debian/patches/ubuntu-tpm-unknown-error-non-fatal.patch (+1/-1)
debian/patches/ubuntu-zfs-enhance-support.patch (+3/-3)
debian/patches/uefi-firmware-setup.patch (+2/-2)
debian/patches/uefi-secure-boot-cryptomount.patch (+1/-1)
debian/patches/vsnprintf-upper-case-hex.patch (+1/-1)
debian/patches/vt-handoff.patch (+3/-3)
debian/patches/wubi-no-windows.patch (+1/-1)
debian/patches/zpool-full-device-name.patch (+1/-1)
debian/rules (+17/-2)
grub-core/commands/minicmd.c (+16/-4)
grub-core/kern/efi/efi.c (+7/-2)
grub-core/kern/emu/main.c (+1/-1)
grub-core/kern/emu/misc.c (+3/-2)
grub-core/kern/i386/coreboot/init.c (+1/-1)
grub-core/kern/i386/qemu/init.c (+1/-1)
grub-core/kern/i386/tsc_pmtimer.c (+89/-20)
grub-core/kern/ieee1275/init.c (+1/-1)
grub-core/kern/mips/arc/init.c (+1/-1)
grub-core/kern/mips/loongson/init.c (+1/-1)
grub-core/kern/mips/qemu_mips/init.c (+1/-1)
grub-core/kern/misc.c (+10/-1)
grub-core/kern/uboot/init.c (+3/-3)
grub-core/kern/xen/init.c (+1/-1)
grub-core/net/arp.c (+103/-54)
grub-core/net/bootp.c (+6/-9)
grub-core/net/drivers/efi/efinet.c (+6/-2)
grub-core/net/drivers/emu/emunet.c (+1/-0)
grub-core/net/drivers/i386/pc/pxe.c (+7/-6)
grub-core/net/drivers/ieee1275/ofnet.c (+3/-1)
grub-core/net/drivers/uboot/ubootnet.c (+1/-0)
grub-core/net/ethernet.c (+43/-45)
grub-core/net/icmp6.c (+9/-6)
grub-core/net/ip.c (+2/-2)
grub-core/net/net.c (+28/-22)
grub-core/net/tcp.c (+29/-13)
include/grub/misc.h (+1/-1)
include/grub/net.h (+12/-7)
tests/util/grub-fs-tester.in (+2/-2)
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+395149@code.launchpad.net

Commit message

xnox hirsute-next

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/.git-dpm b/debian/.git-dpm
2index c865f62..33e85f2 100644
3--- a/debian/.git-dpm
4+++ b/debian/.git-dpm
5@@ -1,6 +1,6 @@
6 # see git-dpm(1) from git-dpm package
7-d7d0f4147560ec746246e44bd03b815961700d79
8-d7d0f4147560ec746246e44bd03b815961700d79
9+ecea6495041ee81331d245cf25ac53d66f07561c
10+ecea6495041ee81331d245cf25ac53d66f07561c
11 578bb115fbd47e1c464696f1f8d6183e5443975d
12 578bb115fbd47e1c464696f1f8d6183e5443975d
13 grub2_2.04.orig.tar.xz
14diff --git a/debian/changelog b/debian/changelog
15index 46d0faf..03b2301 100644
16--- a/debian/changelog
17+++ b/debian/changelog
18@@ -1,4 +1,4 @@
19-grub2 (2.04-1ubuntu37) UNRELEASED; urgency=medium
20+grub2 (2.04-1ubuntu37) hirsute; urgency=medium
21
22 * debian/patches/grub-install-backup-and-restore.patch: Fix-up the patch
23 to correctly initialyze the names of the modules to restore. LP:
24@@ -7,8 +7,25 @@ grub2 (2.04-1ubuntu37) UNRELEASED; urgency=medium
25 and fails triggering fallback. LP: #1901553
26 * grub-common.service: port init.d script to systemd unit. Add warning
27 message, when initrdless boot fails triggering fallback. LP: #1901553
28-
29- -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 07 Dec 2020 10:44:30 +0000
30+ * debian/rules: undo po/ directory patching in
31+ override_dh_autoreconf_clean.
32+ * minilzo: built using the distribution's minilzo
33+ * ubuntu-fix-reproducible-squashfs-test.patch: fix squashfs-test with
34+ new squashfs-tools in hirsute.
35+ * rhboot-f34-make-exit-take-a-return-code.patch,
36+ rhboot-f34-dont-use-int-for-efi-status.patch: allow grub to exit
37+ non-zero under EFI, this should allow falling back to the next
38+ BootOrder BootEntry.
39+ * rhboot-f34-tcp-add-window-scaling-support.patch: speed up netboot
40+ transfer speed.
41+ * rhboot-f34-support-non-ethernet.patch,
42+ ubuntu-fixup-rhboot-f34-support-non-ethernet.patch,
43+ ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch:
44+ add support for link layer addresses of up to 32-bytes.
45+ * rhboot-f34-make-pmtimer-tsc-calibration-fast.patch:
46+ speed up calibration time, especially when booting VMs.
47+
48+ -- Dimitri John Ledkov <xnox@ubuntu.com> Sat, 12 Dec 2020 00:50:47 +0000
49
50 grub2 (2.04-1ubuntu36) hirsute; urgency=medium
51
52diff --git a/debian/control b/debian/control
53index f9fd5b0..9aafb52 100644
54--- a/debian/control
55+++ b/debian/control
56@@ -30,6 +30,7 @@ Build-Depends: debhelper (>= 10~),
57 libfuse-dev (>= 2.8.4-1.4) [linux-any kfreebsd-any],
58 fonts-dejavu-core,
59 liblzma-dev,
60+ liblzo2-dev,
61 dosfstools [any-i386 any-amd64 any-arm64],
62 mtools [any-i386 any-amd64 any-arm64],
63 wamerican,
64@@ -77,6 +78,7 @@ Description: GRand Unified Bootloader, version 2 (dummy package)
65
66 Package: grub-common
67 Architecture: any
68+Built-Using: ${Built-Using}
69 Depends: ${shlibs:Depends}, ${misc:Depends}, gettext-base, ${lsb-base-depends}
70 Replaces: grub-pc (<< 2.00-4), grub-ieee1275 (<< 2.00-4), grub-efi (<< 1.99-1), grub-coreboot (<< 2.00-4), grub-linuxbios (<< 1.96+20080831-1), grub-efi-ia32 (<< 2.00-4), grub-efi-amd64 (<< 2.00-4), grub-efi-ia64 (<< 2.00-4), grub-yeeloong (<< 2.00-4), init-select
71 Recommends: os-prober (>= 1.33)
72diff --git a/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch b/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
73index 97e1d84..20dbfb4 100644
74--- a/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
75+++ b/debian/patches/0074-uefi-firmware-rename-fwsetup-menuentry-to-UEFI-Firmw.patch
76@@ -9,7 +9,7 @@ LP: #1864547
77 1 file changed, 2 insertions(+), 2 deletions(-)
78
79 diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
80-index 3c9f533d8..b072d219f 100644
81+index 3c9f533d8c..b072d219f6 100644
82 --- a/util/grub.d/30_uefi-firmware.in
83 +++ b/util/grub.d/30_uefi-firmware.in
84 @@ -32,9 +32,9 @@ OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
85diff --git a/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch b/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
86index aca2636..3f8f67c 100644
87--- a/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
88+++ b/debian/patches/0075-smbios-Add-a-linux-argument-to-apply-linux-modalias-.patch
89@@ -16,7 +16,7 @@ Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=87049f97
90 1 file changed, 24 insertions(+)
91
92 diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
93-index 7a6a391fc..1a9086ddd 100644
94+index 7a6a391fc1..1a9086ddd4 100644
95 --- a/grub-core/commands/smbios.c
96 +++ b/grub-core/commands/smbios.c
97 @@ -64,6 +64,21 @@ grub_smbios_get_eps3 (void)
98diff --git a/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch b/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
99index de249ed..8460c3c 100644
100--- a/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
101+++ b/debian/patches/0076-ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch
102@@ -18,7 +18,7 @@ only if secure boot is disabled.
103 2 files changed, 35 insertions(+), 26 deletions(-)
104
105 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
106-index 6b6aef87f..fe3ca2c59 100644
107+index 6b6aef87f7..fe3ca2c596 100644
108 --- a/grub-core/loader/i386/efi/linux.c
109 +++ b/grub-core/loader/i386/efi/linux.c
110 @@ -27,6 +27,7 @@
111@@ -51,7 +51,7 @@ index 6b6aef87f..fe3ca2c59 100644
112
113 params = grub_efi_allocate_pages_max (0x3fffffff,
114 diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
115-index 4328bcbdb..991eb29db 100644
116+index 4328bcbdb0..991eb29db9 100644
117 --- a/grub-core/loader/i386/linux.c
118 +++ b/grub-core/loader/i386/linux.c
119 @@ -658,35 +658,40 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
120diff --git a/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch b/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
121index fa2d92a..dfd3ee8 100644
122--- a/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
123+++ b/debian/patches/0077-ubuntu-Update-the-linux-boot-protocol-version-check.patch
124@@ -11,7 +11,7 @@ check accordingly.
125 1 file changed, 1 insertion(+), 1 deletion(-)
126
127 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
128-index fe3ca2c59..2929da7a2 100644
129+index fe3ca2c596..2929da7a29 100644
130 --- a/grub-core/loader/i386/efi/linux.c
131 +++ b/grub-core/loader/i386/efi/linux.c
132 @@ -245,7 +245,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
133diff --git a/debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch b/debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
134index dc9a05a..5ce30a2 100644
135--- a/debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
136+++ b/debian/patches/0081-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
137@@ -47,7 +47,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
138 1 file changed, 2 insertions(+), 2 deletions(-)
139
140 diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
141-index 7b44c37b7..b7203c823 100644
142+index 7b44c37b76..b7203c8230 100644
143 --- a/grub-core/script/yylex.l
144 +++ b/grub-core/script/yylex.l
145 @@ -37,11 +37,11 @@
146diff --git a/debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch b/debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch
147index 9916356..b87a7fb 100644
148--- a/debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch
149+++ b/debian/patches/0082-safemath-Add-some-arithmetic-primitives-that-check-f.patch
150@@ -25,7 +25,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
151 create mode 100644 include/grub/safemath.h
152
153 diff --git a/INSTALL b/INSTALL
154-index 342c158e9..991479b52 100644
155+index 342c158e91..991479b521 100644
156 --- a/INSTALL
157 +++ b/INSTALL
158 @@ -11,27 +11,9 @@ GRUB depends on some software packages installed into your system. If
159@@ -59,7 +59,7 @@ index 342c158e9..991479b52 100644
160 * GNU Bison 2.3 or later
161 * GNU gettext 0.17 or later
162 diff --git a/include/grub/compiler.h b/include/grub/compiler.h
163-index c9e1d7a73..8f3be3ae7 100644
164+index c9e1d7a73d..8f3be3ae70 100644
165 --- a/include/grub/compiler.h
166 +++ b/include/grub/compiler.h
167 @@ -48,4 +48,12 @@
168@@ -77,7 +77,7 @@ index c9e1d7a73..8f3be3ae7 100644
169 #endif /* ! GRUB_COMPILER_HEADER */
170 diff --git a/include/grub/safemath.h b/include/grub/safemath.h
171 new file mode 100644
172-index 000000000..c17b89bba
173+index 0000000000..c17b89bba1
174 --- /dev/null
175 +++ b/include/grub/safemath.h
176 @@ -0,0 +1,37 @@
177diff --git a/debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch b/debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch
178index 85019d5..6238eee 100644
179--- a/debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch
180+++ b/debian/patches/0083-calloc-Make-sure-we-always-have-an-overflow-checking.patch
181@@ -22,7 +22,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
182 7 files changed, 85 insertions(+), 3 deletions(-)
183
184 diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
185-index 65db79baa..dfd8a8ec4 100644
186+index 65db79baa1..dfd8a8ec48 100644
187 --- a/grub-core/kern/emu/misc.c
188 +++ b/grub-core/kern/emu/misc.c
189 @@ -85,6 +85,18 @@ grub_util_error (const char *fmt, ...)
190@@ -45,7 +45,7 @@ index 65db79baa..dfd8a8ec4 100644
191 xmalloc (grub_size_t size)
192 {
193 diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c
194-index f262e95e3..145b01d37 100644
195+index f262e95e38..145b01d371 100644
196 --- a/grub-core/kern/emu/mm.c
197 +++ b/grub-core/kern/emu/mm.c
198 @@ -25,6 +25,16 @@
199@@ -66,7 +66,7 @@ index f262e95e3..145b01d37 100644
200 grub_malloc (grub_size_t size)
201 {
202 diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
203-index ee88ff611..f2822a836 100644
204+index ee88ff6118..f2822a8364 100644
205 --- a/grub-core/kern/mm.c
206 +++ b/grub-core/kern/mm.c
207 @@ -67,8 +67,10 @@
208@@ -133,7 +133,7 @@ index ee88ff611..f2822a836 100644
209 grub_debug_malloc (const char *file, int line, grub_size_t size)
210 {
211 diff --git a/grub-core/lib/libgcrypt_wrap/mem.c b/grub-core/lib/libgcrypt_wrap/mem.c
212-index beeb661a3..74c6eafe5 100644
213+index beeb661a3c..74c6eafe52 100644
214 --- a/grub-core/lib/libgcrypt_wrap/mem.c
215 +++ b/grub-core/lib/libgcrypt_wrap/mem.c
216 @@ -4,6 +4,7 @@
217@@ -169,7 +169,7 @@ index beeb661a3..74c6eafe5 100644
218 grub_fatal ("gcry_xcalloc failed");
219 return ret;
220 diff --git a/grub-core/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h
221-index 3b46f47ff..7a8d385e9 100644
222+index 3b46f47ff5..7a8d385e97 100644
223 --- a/grub-core/lib/posix_wrap/stdlib.h
224 +++ b/grub-core/lib/posix_wrap/stdlib.h
225 @@ -21,6 +21,7 @@
226@@ -195,7 +195,7 @@ index 3b46f47ff..7a8d385e9 100644
227
228 static inline void *
229 diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h
230-index ce464cfd0..ff9c48a64 100644
231+index ce464cfd00..ff9c48a649 100644
232 --- a/include/grub/emu/misc.h
233 +++ b/include/grub/emu/misc.h
234 @@ -47,6 +47,7 @@ grub_util_device_is_mapped (const char *dev);
235@@ -207,7 +207,7 @@ index ce464cfd0..ff9c48a64 100644
236 void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) WARN_UNUSED_RESULT;
237 char * EXPORT_FUNC(xstrdup) (const char *str) WARN_UNUSED_RESULT;
238 diff --git a/include/grub/mm.h b/include/grub/mm.h
239-index 28e2e53eb..9c38dd3ca 100644
240+index 28e2e53eb3..9c38dd3ca5 100644
241 --- a/include/grub/mm.h
242 +++ b/include/grub/mm.h
243 @@ -29,6 +29,7 @@
244diff --git a/debian/patches/0084-calloc-Use-calloc-at-most-places.patch b/debian/patches/0084-calloc-Use-calloc-at-most-places.patch
245index 4a90d3f..ac5217f 100644
246--- a/debian/patches/0084-calloc-Use-calloc-at-most-places.patch
247+++ b/debian/patches/0084-calloc-Use-calloc-at-most-places.patch
248@@ -111,7 +111,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
249 86 files changed, 176 insertions(+), 175 deletions(-)
250
251 diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c
252-index 34a7ff1b5..a06cce302 100644
253+index 34a7ff1b5f..a06cce302d 100644
254 --- a/grub-core/bus/usb/usbhub.c
255 +++ b/grub-core/bus/usb/usbhub.c
256 @@ -149,8 +149,8 @@ grub_usb_add_hub (grub_usb_device_t dev)
257@@ -137,7 +137,7 @@ index 34a7ff1b5..a06cce302 100644
258 {
259 grub_free (hub->devices);
260 diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
261-index 902788250..d29188efa 100644
262+index 902788250e..d29188efaf 100644
263 --- a/grub-core/commands/efi/lsefisystab.c
264 +++ b/grub-core/commands/efi/lsefisystab.c
265 @@ -73,7 +73,8 @@ grub_cmd_lsefisystab (struct grub_command *cmd __attribute__ ((unused)),
266@@ -151,7 +151,7 @@ index 902788250..d29188efa 100644
267 return grub_errno;
268 *grub_utf16_to_utf8 ((grub_uint8_t *) vendor, st->firmware_vendor,
269 diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
270-index db7a8f002..5e3ec0d5e 100644
271+index db7a8f0027..5e3ec0d5e4 100644
272 --- a/grub-core/commands/legacycfg.c
273 +++ b/grub-core/commands/legacycfg.c
274 @@ -314,7 +314,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
275@@ -182,7 +182,7 @@ index db7a8f002..5e3ec0d5e 100644
276 return grub_errno;
277 grub_memcpy (newargs + 1, args, argc * sizeof (newargs[0]));
278 diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c
279-index 2c5363da7..9164df744 100644
280+index 2c5363da7f..9164df744a 100644
281 --- a/grub-core/commands/menuentry.c
282 +++ b/grub-core/commands/menuentry.c
283 @@ -154,7 +154,7 @@ grub_normal_add_menu_entry (int argc, const char **args,
284@@ -195,7 +195,7 @@ index 2c5363da7..9164df744 100644
285 goto fail;
286
287 diff --git a/grub-core/commands/nativedisk.c b/grub-core/commands/nativedisk.c
288-index 699447d11..7c8f97f6a 100644
289+index 699447d11e..7c8f97f6ad 100644
290 --- a/grub-core/commands/nativedisk.c
291 +++ b/grub-core/commands/nativedisk.c
292 @@ -195,7 +195,7 @@ grub_cmd_nativedisk (grub_command_t cmd __attribute__ ((unused)),
293@@ -208,7 +208,7 @@ index 699447d11..7c8f97f6a 100644
294 return grub_errno;
295
296 diff --git a/grub-core/commands/parttool.c b/grub-core/commands/parttool.c
297-index 22b46b187..051e31320 100644
298+index 22b46b1874..051e31320e 100644
299 --- a/grub-core/commands/parttool.c
300 +++ b/grub-core/commands/parttool.c
301 @@ -59,7 +59,13 @@ grub_parttool_register(const char *part_name,
302@@ -245,7 +245,7 @@ index 22b46b187..051e31320 100644
303 if (! parsed[j])
304 {
305 diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c
306-index f00b184c8..4019164f3 100644
307+index f00b184c81..4019164f36 100644
308 --- a/grub-core/commands/regexp.c
309 +++ b/grub-core/commands/regexp.c
310 @@ -116,7 +116,7 @@ grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args)
311@@ -258,7 +258,7 @@ index f00b184c8..4019164f3 100644
312 goto fail;
313
314 diff --git a/grub-core/commands/search_wrap.c b/grub-core/commands/search_wrap.c
315-index d7fd26b94..47fc8eb99 100644
316+index d7fd26b940..47fc8eb996 100644
317 --- a/grub-core/commands/search_wrap.c
318 +++ b/grub-core/commands/search_wrap.c
319 @@ -122,7 +122,7 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args)
320@@ -271,7 +271,7 @@ index d7fd26b94..47fc8eb99 100644
321 return grub_errno;
322 j = 0;
323 diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c
324-index c3b578acf..68ca9e0be 100644
325+index c3b578acf2..68ca9e0be9 100644
326 --- a/grub-core/disk/diskfilter.c
327 +++ b/grub-core/disk/diskfilter.c
328 @@ -1134,7 +1134,7 @@ grub_diskfilter_make_raid (grub_size_t uuidlen, char *uuid, int nmemb,
329@@ -293,7 +293,7 @@ index c3b578acf..68ca9e0be 100644
330 for (p = disk->partition; p; p = p->parent)
331 pv->partmaps[s++] = xstrdup (p->partmap->name);
332 diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
333-index f73257e66..03674cb47 100644
334+index f73257e66d..03674cb477 100644
335 --- a/grub-core/disk/ieee1275/ofdisk.c
336 +++ b/grub-core/disk/ieee1275/ofdisk.c
337 @@ -297,7 +297,7 @@ dev_iterate (const struct grub_ieee1275_devalias *alias)
338@@ -306,7 +306,7 @@ index f73257e66..03674cb47 100644
339 if (!table)
340 {
341 diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c
342-index 2a22d2d6c..e6323701a 100644
343+index 2a22d2d6c1..e6323701ab 100644
344 --- a/grub-core/disk/ldm.c
345 +++ b/grub-core/disk/ldm.c
346 @@ -323,8 +323,8 @@ make_vg (grub_disk_t disk,
347@@ -352,7 +352,7 @@ index 2a22d2d6c..e6323701a 100644
348 return grub_errno;
349 for (i = 0; i < *nsectors; i++)
350 diff --git a/grub-core/disk/luks.c b/grub-core/disk/luks.c
351-index 86c50c612..18b3a8bb1 100644
352+index 86c50c6121..18b3a8bb1d 100644
353 --- a/grub-core/disk/luks.c
354 +++ b/grub-core/disk/luks.c
355 @@ -336,7 +336,7 @@ luks_recover_key (grub_disk_t source,
356@@ -365,7 +365,7 @@ index 86c50c612..18b3a8bb1 100644
357 return grub_errno;
358
359 diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
360-index 7b265c780..d1df640b3 100644
361+index 7b265c780c..d1df640b31 100644
362 --- a/grub-core/disk/lvm.c
363 +++ b/grub-core/disk/lvm.c
364 @@ -173,7 +173,7 @@ grub_lvm_detect (grub_disk_t disk,
365@@ -398,7 +398,7 @@ index 7b265c780..d1df640b3 100644
366
367 p = grub_strstr (p, "stripes = [");
368 diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c
369-index 48476cbbf..d6612eebd 100644
370+index 48476cbbf9..d6612eebd7 100644
371 --- a/grub-core/disk/xen/xendisk.c
372 +++ b/grub-core/disk/xen/xendisk.c
373 @@ -426,7 +426,7 @@ grub_xendisk_init (void)
374@@ -411,7 +411,7 @@ index 48476cbbf..d6612eebd 100644
375 return;
376 if (grub_xenstore_dir ("device/vbd", fill, &ctr))
377 diff --git a/grub-core/efiemu/loadcore.c b/grub-core/efiemu/loadcore.c
378-index 44085ef81..2b924623f 100644
379+index 44085ef818..2b924623f5 100644
380 --- a/grub-core/efiemu/loadcore.c
381 +++ b/grub-core/efiemu/loadcore.c
382 @@ -201,7 +201,7 @@ grub_efiemu_count_symbols (const Elf_Ehdr *e)
383@@ -424,7 +424,7 @@ index 44085ef81..2b924623f 100644
384 /* Relocators */
385 for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
386 diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c
387-index 52a032f7b..9b8e0d0ad 100644
388+index 52a032f7b2..9b8e0d0ad1 100644
389 --- a/grub-core/efiemu/mm.c
390 +++ b/grub-core/efiemu/mm.c
391 @@ -554,11 +554,11 @@ grub_efiemu_mmap_sort_and_uniq (void)
392@@ -451,7 +451,7 @@ index 52a032f7b..9b8e0d0ad 100644
393 {
394 grub_efiemu_unload ();
395 diff --git a/grub-core/font/font.c b/grub-core/font/font.c
396-index 85a292557..8e118b315 100644
397+index 85a292557a..8e118b315c 100644
398 --- a/grub-core/font/font.c
399 +++ b/grub-core/font/font.c
400 @@ -293,8 +293,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
401@@ -465,7 +465,7 @@ index 85a292557..8e118b315 100644
402 return 1;
403 font->bmp_idx = grub_malloc (0x10000 * sizeof (grub_uint16_t));
404 diff --git a/grub-core/fs/affs.c b/grub-core/fs/affs.c
405-index 6b6a2bc91..220b3712f 100644
406+index 6b6a2bc913..220b3712f2 100644
407 --- a/grub-core/fs/affs.c
408 +++ b/grub-core/fs/affs.c
409 @@ -301,7 +301,7 @@ grub_affs_read_symlink (grub_fshelp_node_t node)
410@@ -496,7 +496,7 @@ index 6b6a2bc91..220b3712f 100644
411 *grub_latin1_to_utf8 ((grub_uint8_t *) *label, file.name, len) = '\0';
412 }
413 diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
414-index 48bd3d04a..11272efc1 100644
415+index 48bd3d04a5..11272efc1a 100644
416 --- a/grub-core/fs/btrfs.c
417 +++ b/grub-core/fs/btrfs.c
418 @@ -413,7 +413,7 @@ lower_bound (struct grub_btrfs_data *data,
419@@ -527,7 +527,7 @@ index 48bd3d04a..11272efc1 100644
420 return grub_errno;
421 for (i = 0; i < *nsectors; i++)
422 diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c
423-index ac0a40990..3fe842b4d 100644
424+index ac0a40990e..3fe842b4d8 100644
425 --- a/grub-core/fs/hfs.c
426 +++ b/grub-core/fs/hfs.c
427 @@ -1360,7 +1360,7 @@ grub_hfs_label (grub_device_t device, char **label)
428@@ -540,7 +540,7 @@ index ac0a40990..3fe842b4d 100644
429 macroman_to_utf8 (*label, data->sblock.volname + 1,
430 len + 1, 0);
431 diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
432-index 54786bb1c..dae43becc 100644
433+index 54786bb1c6..dae43becc9 100644
434 --- a/grub-core/fs/hfsplus.c
435 +++ b/grub-core/fs/hfsplus.c
436 @@ -720,7 +720,7 @@ list_nodes (void *record, void *hook_arg)
437@@ -571,7 +571,7 @@ index 54786bb1c..dae43becc 100644
438 {
439 grub_free (label_name);
440 diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
441-index 49c0c632b..4f1b52a55 100644
442+index 49c0c632bf..4f1b52a552 100644
443 --- a/grub-core/fs/iso9660.c
444 +++ b/grub-core/fs/iso9660.c
445 @@ -331,7 +331,7 @@ grub_iso9660_convert_string (grub_uint8_t *us, int len)
446@@ -584,7 +584,7 @@ index 49c0c632b..4f1b52a55 100644
447 return NULL;
448
449 diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
450-index fc4e1f678..2f34f76da 100644
451+index fc4e1f678d..2f34f76da8 100644
452 --- a/grub-core/fs/ntfs.c
453 +++ b/grub-core/fs/ntfs.c
454 @@ -556,8 +556,8 @@ get_utf8 (grub_uint8_t *in, grub_size_t len)
455@@ -599,7 +599,7 @@ index fc4e1f678..2f34f76da 100644
456 {
457 grub_free (buf);
458 diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c
459-index 50c1fe72f..90f7fb379 100644
460+index 50c1fe72f4..90f7fb3791 100644
461 --- a/grub-core/fs/sfs.c
462 +++ b/grub-core/fs/sfs.c
463 @@ -266,7 +266,7 @@ grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
464@@ -612,7 +612,7 @@ index 50c1fe72f..90f7fb379 100644
465 {
466 grub_errno = 0;
467 diff --git a/grub-core/fs/tar.c b/grub-core/fs/tar.c
468-index 7d63e0c99..c551ed6b5 100644
469+index 7d63e0c99c..c551ed6b52 100644
470 --- a/grub-core/fs/tar.c
471 +++ b/grub-core/fs/tar.c
472 @@ -120,7 +120,7 @@ grub_cpio_find_file (struct grub_archelp_data *data, char **name,
473@@ -625,7 +625,7 @@ index 7d63e0c99..c551ed6b5 100644
474 return grub_errno;
475 grub_free (data->linkname);
476 diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c
477-index dc8b6e2d1..a83761674 100644
478+index dc8b6e2d1c..a83761674a 100644
479 --- a/grub-core/fs/udf.c
480 +++ b/grub-core/fs/udf.c
481 @@ -873,7 +873,7 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf)
482@@ -647,7 +647,7 @@ index dc8b6e2d1..a83761674 100644
483 return NULL;
484 for (i = 0; i < utf16len; i++)
485 diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
486-index 2f72e42bf..381dde556 100644
487+index 2f72e42bf8..381dde556d 100644
488 --- a/grub-core/fs/zfs/zfs.c
489 +++ b/grub-core/fs/zfs/zfs.c
490 @@ -3325,7 +3325,7 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol,
491@@ -669,7 +669,7 @@ index 2f72e42bf..381dde556 100644
492 return grub_errno;
493 for (i = 0; i < *nsectors; i++)
494 diff --git a/grub-core/gfxmenu/gui_string_util.c b/grub-core/gfxmenu/gui_string_util.c
495-index a9a415e31..ba1e1eab3 100644
496+index a9a415e312..ba1e1eab31 100644
497 --- a/grub-core/gfxmenu/gui_string_util.c
498 +++ b/grub-core/gfxmenu/gui_string_util.c
499 @@ -55,7 +55,7 @@ canonicalize_path (const char *path)
500@@ -682,7 +682,7 @@ index a9a415e31..ba1e1eab3 100644
501 return 0;
502
503 diff --git a/grub-core/gfxmenu/widget-box.c b/grub-core/gfxmenu/widget-box.c
504-index b60602889..470597ded 100644
505+index b606028891..470597ded2 100644
506 --- a/grub-core/gfxmenu/widget-box.c
507 +++ b/grub-core/gfxmenu/widget-box.c
508 @@ -303,10 +303,10 @@ grub_gfxmenu_create_box (const char *pixmaps_prefix,
509@@ -699,7 +699,7 @@ index b60602889..470597ded 100644
510 /* Initialize all pixmap pointers to NULL so that proper destruction can
511 be performed if an error is encountered partway through construction. */
512 diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c
513-index 6208a9763..43d98a7bd 100644
514+index 6208a97636..43d98a7bdf 100644
515 --- a/grub-core/io/gzio.c
516 +++ b/grub-core/io/gzio.c
517 @@ -554,7 +554,7 @@ huft_build (unsigned *b, /* code lengths in bits (all assumed <= BMAX) */
518@@ -712,7 +712,7 @@ index 6208a9763..43d98a7bd 100644
519 {
520 if (h)
521 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
522-index 6e1ceb905..dc31caa21 100644
523+index 6e1ceb9051..dc31caa213 100644
524 --- a/grub-core/kern/efi/efi.c
525 +++ b/grub-core/kern/efi/efi.c
526 @@ -202,7 +202,7 @@ grub_efi_set_variable(const char *var, const grub_efi_guid_t *guid,
527@@ -743,7 +743,7 @@ index 6e1ceb905..dc31caa21 100644
528 {
529 grub_free (name);
530 diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
531-index 8ac523953..f90b6c9ce 100644
532+index 8ac5239538..f90b6c9ce4 100644
533 --- a/grub-core/kern/emu/hostdisk.c
534 +++ b/grub-core/kern/emu/hostdisk.c
535 @@ -627,7 +627,7 @@ static char *
536@@ -756,7 +756,7 @@ index 8ac523953..f90b6c9ce 100644
537 size_t i;
538 int first = 1;
539 diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c
540-index 2b85f4950..f90be6566 100644
541+index 2b85f4950b..f90be6566b 100644
542 --- a/grub-core/kern/fs.c
543 +++ b/grub-core/kern/fs.c
544 @@ -151,7 +151,7 @@ grub_fs_blocklist_open (grub_file_t file, const char *name)
545@@ -769,7 +769,7 @@ index 2b85f4950..f90be6566 100644
546 return 0;
547
548 diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
549-index 18cad5803..83c068d61 100644
550+index 18cad5803b..83c068d61b 100644
551 --- a/grub-core/kern/misc.c
552 +++ b/grub-core/kern/misc.c
553 @@ -691,7 +691,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
554@@ -782,7 +782,7 @@ index 18cad5803..83c068d61 100644
555 {
556 grub_errno = GRUB_ERR_NONE;
557 diff --git a/grub-core/kern/parser.c b/grub-core/kern/parser.c
558-index 78175aac2..619db3122 100644
559+index 78175aac2d..619db3122a 100644
560 --- a/grub-core/kern/parser.c
561 +++ b/grub-core/kern/parser.c
562 @@ -213,7 +213,7 @@ grub_parser_split_cmdline (const char *cmdline,
563@@ -795,7 +795,7 @@ index 78175aac2..619db3122 100644
564 {
565 grub_free (args);
566 diff --git a/grub-core/kern/uboot/uboot.c b/grub-core/kern/uboot/uboot.c
567-index be4816fe6..aac8f9ae1 100644
568+index be4816fe6f..aac8f9ae1f 100644
569 --- a/grub-core/kern/uboot/uboot.c
570 +++ b/grub-core/kern/uboot/uboot.c
571 @@ -133,7 +133,7 @@ grub_uboot_dev_enum (void)
572@@ -808,7 +808,7 @@ index be4816fe6..aac8f9ae1 100644
573 return 0;
574
575 diff --git a/grub-core/lib/libgcrypt/cipher/ac.c b/grub-core/lib/libgcrypt/cipher/ac.c
576-index f5e946a2d..63f6fcd11 100644
577+index f5e946a2d8..63f6fcd11e 100644
578 --- a/grub-core/lib/libgcrypt/cipher/ac.c
579 +++ b/grub-core/lib/libgcrypt/cipher/ac.c
580 @@ -185,7 +185,7 @@ ac_data_mpi_copy (gcry_ac_mpi_t *data_mpis, unsigned int data_mpis_n,
581@@ -848,7 +848,7 @@ index f5e946a2d..63f6fcd11 100644
582 {
583 err = gcry_error_from_errno (errno);
584 diff --git a/grub-core/lib/libgcrypt/cipher/primegen.c b/grub-core/lib/libgcrypt/cipher/primegen.c
585-index 2788e349f..b12e79b19 100644
586+index 2788e349fa..b12e79b192 100644
587 --- a/grub-core/lib/libgcrypt/cipher/primegen.c
588 +++ b/grub-core/lib/libgcrypt/cipher/primegen.c
589 @@ -383,7 +383,7 @@ prime_generate_internal (int need_q_factor,
590@@ -870,7 +870,7 @@ index 2788e349f..b12e79b19 100644
591 val_2 = mpi_alloc_set_ui( 2 );
592 val_3 = mpi_alloc_set_ui( 3);
593 diff --git a/grub-core/lib/libgcrypt/cipher/pubkey.c b/grub-core/lib/libgcrypt/cipher/pubkey.c
594-index 910982141..ca087ad75 100644
595+index 910982141e..ca087ad75b 100644
596 --- a/grub-core/lib/libgcrypt/cipher/pubkey.c
597 +++ b/grub-core/lib/libgcrypt/cipher/pubkey.c
598 @@ -2941,7 +2941,7 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t s_pkey)
599@@ -892,7 +892,7 @@ index 910982141..ca087ad75 100644
600 {
601 rc = gpg_err_code_from_syserror ();
602 diff --git a/grub-core/lib/priority_queue.c b/grub-core/lib/priority_queue.c
603-index 659be0b7f..7d5e7c05a 100644
604+index 659be0b7f4..7d5e7c05aa 100644
605 --- a/grub-core/lib/priority_queue.c
606 +++ b/grub-core/lib/priority_queue.c
607 @@ -92,7 +92,7 @@ grub_priority_queue_new (grub_size_t elsize,
608@@ -905,7 +905,7 @@ index 659be0b7f..7d5e7c05a 100644
609 return 0;
610 ret = (struct grub_priority_queue *) grub_malloc (sizeof (*ret));
611 diff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c
612-index ee9fa7b4f..467305b46 100644
613+index ee9fa7b4fe..467305b46a 100644
614 --- a/grub-core/lib/reed_solomon.c
615 +++ b/grub-core/lib/reed_solomon.c
616 @@ -20,6 +20,7 @@
617@@ -931,7 +931,7 @@ index ee9fa7b4f..467305b46 100644
618 /* Multiply with X - a^r */
619 for (j = 0; j < rs; j++)
620 diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
621-index ea3ebc719..5847aac36 100644
622+index ea3ebc719b..5847aac364 100644
623 --- a/grub-core/lib/relocator.c
624 +++ b/grub-core/lib/relocator.c
625 @@ -495,9 +495,9 @@ malloc_in_range (struct grub_relocator *rel,
626@@ -967,7 +967,7 @@ index ea3ebc719..5847aac36 100644
627 {
628 grub_free (from);
629 diff --git a/grub-core/lib/zstd/fse_decompress.c b/grub-core/lib/zstd/fse_decompress.c
630-index 72bbead5b..2227b84bc 100644
631+index 72bbead5be..2227b84bc7 100644
632 --- a/grub-core/lib/zstd/fse_decompress.c
633 +++ b/grub-core/lib/zstd/fse_decompress.c
634 @@ -82,7 +82,7 @@
635@@ -980,7 +980,7 @@ index 72bbead5b..2227b84bc 100644
636
637 void FSE_freeDTable (FSE_DTable* dt)
638 diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
639-index 092e8e307..979d425df 100644
640+index 092e8e3077..979d425dfb 100644
641 --- a/grub-core/loader/arm/linux.c
642 +++ b/grub-core/loader/arm/linux.c
643 @@ -82,7 +82,7 @@ linux_prepare_atag (void *target_atag)
644@@ -993,7 +993,7 @@ index 092e8e307..979d425df 100644
645 return grub_errno;
646
647 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
648-index 04e815c05..b9a2df34b 100644
649+index 04e815c052..b9a2df34b1 100644
650 --- a/grub-core/loader/efi/chainloader.c
651 +++ b/grub-core/loader/efi/chainloader.c
652 @@ -126,7 +126,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp,
653@@ -1006,7 +1006,7 @@ index 04e815c05..b9a2df34b 100644
654 return;
655
656 diff --git a/grub-core/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c
657-index af6741d15..a8d8bf7da 100644
658+index af6741d157..a8d8bf7dae 100644
659 --- a/grub-core/loader/i386/bsdXX.c
660 +++ b/grub-core/loader/i386/bsdXX.c
661 @@ -48,7 +48,7 @@ read_headers (grub_file_t file, const char *filename, Elf_Ehdr *e, char **shdr)
662@@ -1019,7 +1019,7 @@ index af6741d15..a8d8bf7da 100644
663 return grub_errno;
664
665 diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c
666-index e64ed08f5..b7d176b5d 100644
667+index e64ed08f58..b7d176b5d3 100644
668 --- a/grub-core/loader/i386/xnu.c
669 +++ b/grub-core/loader/i386/xnu.c
670 @@ -295,7 +295,7 @@ grub_xnu_devprop_add_property_utf8 (struct grub_xnu_devprop_device_descriptor *d
671@@ -1041,7 +1041,7 @@ index e64ed08f5..b7d176b5d 100644
672 return grub_errno;
673 grub_memcpy (utf16, name, sizeof (grub_uint16_t) * namelen);
674 diff --git a/grub-core/loader/macho.c b/grub-core/loader/macho.c
675-index 085f9c689..05710c48e 100644
676+index 085f9c6890..05710c48e0 100644
677 --- a/grub-core/loader/macho.c
678 +++ b/grub-core/loader/macho.c
679 @@ -97,7 +97,7 @@ grub_macho_file (grub_file_t file, const char *filename, int is_64bit)
680@@ -1054,7 +1054,7 @@ index 085f9c689..05710c48e 100644
681 goto fail;
682 if (grub_file_read (macho->file, archs,
683 diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c
684-index 70cd1db51..cc6853692 100644
685+index 70cd1db513..cc6853692a 100644
686 --- a/grub-core/loader/multiboot_elfxx.c
687 +++ b/grub-core/loader/multiboot_elfxx.c
688 @@ -217,7 +217,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld)
689@@ -1067,7 +1067,7 @@ index 70cd1db51..cc6853692 100644
690 return grub_errno;
691
692 diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
693-index e0f47e72b..2f0ebd0b8 100644
694+index e0f47e72b0..2f0ebd0b8b 100644
695 --- a/grub-core/loader/xnu.c
696 +++ b/grub-core/loader/xnu.c
697 @@ -801,7 +801,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
698@@ -1080,7 +1080,7 @@ index e0f47e72b..2f0ebd0b8 100644
699 {
700 grub_file_close (file);
701 diff --git a/grub-core/mmap/mmap.c b/grub-core/mmap/mmap.c
702-index 6a31cbae3..57b4e9a72 100644
703+index 6a31cbae32..57b4e9a72a 100644
704 --- a/grub-core/mmap/mmap.c
705 +++ b/grub-core/mmap/mmap.c
706 @@ -143,9 +143,9 @@ grub_mmap_iterate (grub_memory_hook_t hook, void *hook_data)
707@@ -1096,7 +1096,7 @@ index 6a31cbae3..57b4e9a72 100644
708 if (! ctx.scanline_events || !present)
709 {
710 diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
711-index 558d97ba1..dd0ffcdae 100644
712+index 558d97ba1e..dd0ffcdaea 100644
713 --- a/grub-core/net/bootp.c
714 +++ b/grub-core/net/bootp.c
715 @@ -1559,7 +1559,7 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
716@@ -1109,7 +1109,7 @@ index 558d97ba1..dd0ffcdae 100644
717 return grub_errno;
718
719 diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
720-index 5d9afe093..e332d5eb4 100644
721+index 5d9afe093c..e332d5eb4a 100644
722 --- a/grub-core/net/dns.c
723 +++ b/grub-core/net/dns.c
724 @@ -285,8 +285,8 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)),
725@@ -1144,7 +1144,7 @@ index 5d9afe093..e332d5eb4 100644
726 return grub_errno;
727
728 diff --git a/grub-core/net/net.c b/grub-core/net/net.c
729-index b917a75d5..fed7bc57c 100644
730+index b917a75d54..fed7bc57cb 100644
731 --- a/grub-core/net/net.c
732 +++ b/grub-core/net/net.c
733 @@ -333,8 +333,8 @@ grub_cmd_ipv6_autoconf (struct grub_command *cmd __attribute__ ((unused)),
734@@ -1159,7 +1159,7 @@ index b917a75d5..fed7bc57c 100644
735 {
736 grub_free (ifaces);
737 diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c
738-index b0ab47d73..d57fb72fa 100644
739+index b0ab47d73f..d57fb72faa 100644
740 --- a/grub-core/normal/charset.c
741 +++ b/grub-core/normal/charset.c
742 @@ -203,7 +203,7 @@ grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg,
743@@ -1201,7 +1201,7 @@ index b0ab47d73..d57fb72fa 100644
744 return -1;
745 for (ptr = logical; ptr <= logical + logical_len; ptr++)
746 diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c
747-index c037d5050..c57242e2e 100644
748+index c037d5050e..c57242e2ea 100644
749 --- a/grub-core/normal/cmdline.c
750 +++ b/grub-core/normal/cmdline.c
751 @@ -41,7 +41,7 @@ grub_err_t
752@@ -1268,7 +1268,7 @@ index c037d5050..c57242e2e 100644
753 {
754 grub_print_error ();
755 diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c
756-index cdf3590a3..1993995be 100644
757+index cdf3590a36..1993995be6 100644
758 --- a/grub-core/normal/menu_entry.c
759 +++ b/grub-core/normal/menu_entry.c
760 @@ -95,8 +95,8 @@ init_line (struct screen *screen, struct line *linep)
761@@ -1328,7 +1328,7 @@ index cdf3590a3..1993995be 100644
762 {
763 grub_print_error ();
764 diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
765-index e22bb91f6..18240e76c 100644
766+index e22bb91f6e..18240e76ce 100644
767 --- a/grub-core/normal/menu_text.c
768 +++ b/grub-core/normal/menu_text.c
769 @@ -78,7 +78,7 @@ grub_print_message_indented_real (const char *msg, int margin_left,
770@@ -1350,7 +1350,7 @@ index e22bb91f6..18240e76c 100644
771 /* XXX How to show this error? */
772 return;
773 diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c
774-index a1e5c5a0d..cc8c173b6 100644
775+index a1e5c5a0da..cc8c173b6e 100644
776 --- a/grub-core/normal/term.c
777 +++ b/grub-core/normal/term.c
778 @@ -264,7 +264,7 @@ grub_term_save_pos (void)
779@@ -1372,7 +1372,7 @@ index a1e5c5a0d..cc8c173b6 100644
780 grub_error_pop ();
781
782 diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
783-index 7adc0f30e..a5bd0752f 100644
784+index 7adc0f30ee..a5bd0752fb 100644
785 --- a/grub-core/osdep/linux/getroot.c
786 +++ b/grub-core/osdep/linux/getroot.c
787 @@ -168,7 +168,7 @@ grub_util_raid_getmembers (const char *name, int bootable)
788@@ -1403,7 +1403,7 @@ index 7adc0f30e..a5bd0752f 100644
789 again:
790 fp = grub_util_fopen ("/proc/self/mountinfo", "r");
791 diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
792-index 5478030fd..89dc70d93 100644
793+index 5478030fde..89dc70d93c 100644
794 --- a/grub-core/osdep/unix/config.c
795 +++ b/grub-core/osdep/unix/config.c
796 @@ -130,7 +130,7 @@ grub_util_load_config (struct grub_util_config *cfg)
797@@ -1416,7 +1416,7 @@ index 5478030fd..89dc70d93 100644
798 if (grub_util_is_regular (cfgfile))
799 sorted_cfgpaths[i++] = xstrdup (cfgfile);
800 diff --git a/grub-core/osdep/windows/getroot.c b/grub-core/osdep/windows/getroot.c
801-index 661d95461..eada663b2 100644
802+index 661d954619..eada663b26 100644
803 --- a/grub-core/osdep/windows/getroot.c
804 +++ b/grub-core/osdep/windows/getroot.c
805 @@ -59,7 +59,7 @@ grub_get_mount_point (const TCHAR *path)
806@@ -1429,7 +1429,7 @@ index 661d95461..eada663b2 100644
807 /* When pointing to EFI system partition GetVolumePathName fails
808 for ESP root and returns abberant information for everything
809 diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c
810-index 355100789..0be327394 100644
811+index 355100789a..0be3273949 100644
812 --- a/grub-core/osdep/windows/hostdisk.c
813 +++ b/grub-core/osdep/windows/hostdisk.c
814 @@ -111,7 +111,7 @@ grub_util_get_windows_path_real (const char *path)
815@@ -1451,7 +1451,7 @@ index 355100789..0be327394 100644
816 pattern[l] = '\\';
817 pattern[l + 1] = '*';
818 diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
819-index e8ffd62c6..6297de632 100644
820+index e8ffd62c6a..6297de6326 100644
821 --- a/grub-core/osdep/windows/init.c
822 +++ b/grub-core/osdep/windows/init.c
823 @@ -161,7 +161,7 @@ grub_util_host_init (int *argc __attribute__ ((unused)),
824@@ -1464,7 +1464,7 @@ index e8ffd62c6..6297de632 100644
825 for (i = 0; i < *argc; i++)
826 (*argv)[i] = grub_util_tchar_to_utf8 (targv[i]);
827 diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
828-index a3f738fb9..b160949d8 100644
829+index a3f738fb9b..b160949d8e 100644
830 --- a/grub-core/osdep/windows/platform.c
831 +++ b/grub-core/osdep/windows/platform.c
832 @@ -231,8 +231,8 @@ grub_install_register_efi (grub_device_t efidir_grub_dev, const char *efidir,
833@@ -1479,7 +1479,7 @@ index a3f738fb9..b160949d8 100644
834 (const grub_uint8_t *) efi_distributor,
835 distrib8_len, 0);
836 diff --git a/grub-core/osdep/windows/relpath.c b/grub-core/osdep/windows/relpath.c
837-index cb0861744..478e8ef14 100644
838+index cb0861744a..478e8ef14d 100644
839 --- a/grub-core/osdep/windows/relpath.c
840 +++ b/grub-core/osdep/windows/relpath.c
841 @@ -72,7 +72,7 @@ grub_make_system_path_relative_to_its_root (const char *path)
842@@ -1492,7 +1492,7 @@ index cb0861744..478e8ef14 100644
843 && dirwindows[offset] != '/'
844 && dirwindows[offset])
845 diff --git a/grub-core/partmap/gpt.c b/grub-core/partmap/gpt.c
846-index 103f6796f..72a2e37cd 100644
847+index 103f6796f3..72a2e37cd4 100644
848 --- a/grub-core/partmap/gpt.c
849 +++ b/grub-core/partmap/gpt.c
850 @@ -199,7 +199,7 @@ gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
851@@ -1505,7 +1505,7 @@ index 103f6796f..72a2e37cd 100644
852 return grub_errno;
853 for (i = 0; i < *nsectors; i++)
854 diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c
855-index 7b8e45076..ee3f24982 100644
856+index 7b8e450762..ee3f24982b 100644
857 --- a/grub-core/partmap/msdos.c
858 +++ b/grub-core/partmap/msdos.c
859 @@ -337,7 +337,7 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
860@@ -1518,7 +1518,7 @@ index 7b8e45076..ee3f24982 100644
861 return grub_errno;
862 for (i = 0; i < *nsectors; i++)
863 diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
864-index ee299fd0e..c8d6806fe 100644
865+index ee299fd0ea..c8d6806fe0 100644
866 --- a/grub-core/script/execute.c
867 +++ b/grub-core/script/execute.c
868 @@ -553,7 +553,7 @@ gettext_append (struct grub_script_argv *result, const char *orig_str)
869@@ -1531,7 +1531,7 @@ index ee299fd0e..c8d6806fe 100644
870 if (parse_string (orig_str, gettext_save_allow, &ctx, 0))
871 goto fail;
872 diff --git a/grub-core/tests/fake_input.c b/grub-core/tests/fake_input.c
873-index 2d6085298..b5eb516be 100644
874+index 2d60852989..b5eb516be2 100644
875 --- a/grub-core/tests/fake_input.c
876 +++ b/grub-core/tests/fake_input.c
877 @@ -49,7 +49,7 @@ grub_terminal_input_fake_sequence (int *seq_in, int nseq_in)
878@@ -1544,7 +1544,7 @@ index 2d6085298..b5eb516be 100644
879 return;
880
881 diff --git a/grub-core/tests/video_checksum.c b/grub-core/tests/video_checksum.c
882-index 74d5b65e5..44d081069 100644
883+index 74d5b65e5c..44d0810698 100644
884 --- a/grub-core/tests/video_checksum.c
885 +++ b/grub-core/tests/video_checksum.c
886 @@ -336,7 +336,7 @@ grub_video_capture_write_bmp (const char *fname,
887@@ -1575,7 +1575,7 @@ index 74d5b65e5..44d081069 100644
888 grub_uint16_t gmask = ((1 << mode_info->green_mask_size) - 1);
889 grub_uint16_t bmask = ((1 << mode_info->blue_mask_size) - 1);
890 diff --git a/grub-core/video/capture.c b/grub-core/video/capture.c
891-index 4f83c7441..4d3195e01 100644
892+index 4f83c74411..4d3195e017 100644
893 --- a/grub-core/video/capture.c
894 +++ b/grub-core/video/capture.c
895 @@ -89,7 +89,7 @@ grub_video_capture_start (const struct grub_video_mode_info *mode_info,
896@@ -1588,7 +1588,7 @@ index 4f83c7441..4d3195e01 100644
897 return grub_errno;
898
899 diff --git a/grub-core/video/emu/sdl.c b/grub-core/video/emu/sdl.c
900-index a2f639f66..0ebab6f57 100644
901+index a2f639f66d..0ebab6f57d 100644
902 --- a/grub-core/video/emu/sdl.c
903 +++ b/grub-core/video/emu/sdl.c
904 @@ -172,7 +172,7 @@ grub_video_sdl_set_palette (unsigned int start, unsigned int count,
905@@ -1601,7 +1601,7 @@ index a2f639f66..0ebab6f57 100644
906 {
907 tmp[i].r = palette_data[i].r;
908 diff --git a/grub-core/video/i386/pc/vga.c b/grub-core/video/i386/pc/vga.c
909-index 01f47112d..b2f776c99 100644
910+index 01f47112d3..b2f776c997 100644
911 --- a/grub-core/video/i386/pc/vga.c
912 +++ b/grub-core/video/i386/pc/vga.c
913 @@ -127,7 +127,7 @@ grub_video_vga_setup (unsigned int width, unsigned int height,
914@@ -1614,7 +1614,7 @@ index 01f47112d..b2f776c99 100644
915 framebuffer.back_page = 0;
916 if (!framebuffer.temporary_buffer)
917 diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
918-index 777e71334..61bd64537 100644
919+index 777e71334c..61bd645379 100644
920 --- a/grub-core/video/readers/png.c
921 +++ b/grub-core/video/readers/png.c
922 @@ -309,7 +309,7 @@ grub_png_decode_image_header (struct grub_png_data *data)
923@@ -1627,7 +1627,7 @@ index 777e71334..61bd64537 100644
924 return grub_errno;
925
926 diff --git a/include/grub/unicode.h b/include/grub/unicode.h
927-index a0403e91f..4de986a85 100644
928+index a0403e91f9..4de986a857 100644
929 --- a/include/grub/unicode.h
930 +++ b/include/grub/unicode.h
931 @@ -293,7 +293,7 @@ grub_unicode_glyph_dup (const struct grub_unicode_glyph *in)
932@@ -1649,7 +1649,7 @@ index a0403e91f..4de986a85 100644
933 return;
934 grub_memcpy (out->combining_ptr, in->combining_ptr,
935 diff --git a/util/getroot.c b/util/getroot.c
936-index cdd41153c..6ae35ecaa 100644
937+index cdd41153c5..6ae35ecaa6 100644
938 --- a/util/getroot.c
939 +++ b/util/getroot.c
940 @@ -200,7 +200,7 @@ make_device_name (const char *drive)
941@@ -1662,7 +1662,7 @@ index cdd41153c..6ae35ecaa 100644
942 for (iptr = drive; *iptr; iptr++)
943 {
944 diff --git a/util/grub-file.c b/util/grub-file.c
945-index 50c18b683..b2e7dd69f 100644
946+index 50c18b6835..b2e7dd69f4 100644
947 --- a/util/grub-file.c
948 +++ b/util/grub-file.c
949 @@ -54,7 +54,7 @@ main (int argc, char *argv[])
950@@ -1675,7 +1675,7 @@ index 50c18b683..b2e7dd69f 100644
951 if (argc == 2 && strcmp (argv[1], "--version") == 0)
952 {
953 diff --git a/util/grub-fstest.c b/util/grub-fstest.c
954-index f14e02d97..57246af7c 100644
955+index f14e02d972..57246af7c6 100644
956 --- a/util/grub-fstest.c
957 +++ b/util/grub-fstest.c
958 @@ -650,7 +650,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
959@@ -1697,7 +1697,7 @@ index f14e02d97..57246af7c 100644
960 argp_parse (&argp, argc, argv, 0, 0, 0);
961
962 diff --git a/util/grub-install-common.c b/util/grub-install-common.c
963-index fdfe2c7ea..447504d3f 100644
964+index fdfe2c7ead..447504d3f4 100644
965 --- a/util/grub-install-common.c
966 +++ b/util/grub-install-common.c
967 @@ -286,7 +286,7 @@ handle_install_list (struct install_list *il, const char *val,
968@@ -1710,7 +1710,7 @@ index fdfe2c7ea..447504d3f 100644
969 for (ce = il->entries; ; ce++)
970 {
971 diff --git a/util/grub-install.c b/util/grub-install.c
972-index f408b1986..843dfc7c8 100644
973+index f408b19860..843dfc7c80 100644
974 --- a/util/grub-install.c
975 +++ b/util/grub-install.c
976 @@ -658,7 +658,7 @@ device_map_check_duplicates (const char *dev_map)
977@@ -1732,7 +1732,7 @@ index f408b1986..843dfc7c8 100644
978 for (curdev = grub_devices, curdrive = grub_drives; *curdev; curdev++,
979 curdrive++)
980 diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
981-index bc087c2b5..d97d0e7be 100644
982+index bc087c2b57..d97d0e7bef 100644
983 --- a/util/grub-mkimagexx.c
984 +++ b/util/grub-mkimagexx.c
985 @@ -2294,10 +2294,8 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path,
986@@ -1749,7 +1749,7 @@ index bc087c2b5..d97d0e7be 100644
987 SUFFIX (locate_sections) (e, kernel_path, &smd, layout, image_target);
988
989 diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
990-index 45d6140d3..cb972f120 100644
991+index 45d6140d3e..cb972f120b 100644
992 --- a/util/grub-mkrescue.c
993 +++ b/util/grub-mkrescue.c
994 @@ -441,8 +441,8 @@ main (int argc, char *argv[])
995@@ -1764,7 +1764,7 @@ index 45d6140d3..cb972f120 100644
996 xorriso_tail_argc = 0;
997 /* Program name */
998 diff --git a/util/grub-mkstandalone.c b/util/grub-mkstandalone.c
999-index 4907d44c0..edf309717 100644
1000+index 4907d44c0b..edf309717c 100644
1001 --- a/util/grub-mkstandalone.c
1002 +++ b/util/grub-mkstandalone.c
1003 @@ -296,7 +296,7 @@ main (int argc, char *argv[])
1004@@ -1777,7 +1777,7 @@ index 4907d44c0..edf309717 100644
1005 argp_parse (&argp, argc, argv, 0, 0, 0);
1006
1007 diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c
1008-index 0d4084a10..11331294f 100644
1009+index 0d4084a108..11331294f1 100644
1010 --- a/util/grub-pe2elf.c
1011 +++ b/util/grub-pe2elf.c
1012 @@ -100,9 +100,9 @@ write_section_data (FILE* fp, const char *name, char *image,
1013@@ -1817,7 +1817,7 @@ index 0d4084a10..11331294f 100644
1014 for (i = 0; i < (int) pe_chdr->num_symbols;
1015 i += pe_symtab->num_aux + 1, pe_symtab += pe_symtab->num_aux + 1)
1016 diff --git a/util/grub-probe.c b/util/grub-probe.c
1017-index 81d27eead..cbe6ed94c 100644
1018+index 81d27eead5..cbe6ed94ca 100644
1019 --- a/util/grub-probe.c
1020 +++ b/util/grub-probe.c
1021 @@ -361,8 +361,8 @@ probe (const char *path, char **device_names, char delim)
1022diff --git a/debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch b/debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch
1023index 851135d..e0bb952 100644
1024--- a/debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch
1025+++ b/debian/patches/0085-malloc-Use-overflow-checking-primitives-where-we-do-.patch
1026@@ -55,7 +55,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1027 23 files changed, 382 insertions(+), 113 deletions(-)
1028
1029 diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
1030-index 5e3ec0d5e..cc5971f4d 100644
1031+index 5e3ec0d5e4..cc5971f4db 100644
1032 --- a/grub-core/commands/legacycfg.c
1033 +++ b/grub-core/commands/legacycfg.c
1034 @@ -32,6 +32,7 @@
1035@@ -118,7 +118,7 @@ index 5e3ec0d5e..cc5971f4d 100644
1036 grub_free (suffix);
1037 return grub_errno;
1038 diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c
1039-index 4a106ca04..cc3290311 100644
1040+index 4a106ca040..cc3290311f 100644
1041 --- a/grub-core/commands/wildcard.c
1042 +++ b/grub-core/commands/wildcard.c
1043 @@ -23,6 +23,7 @@
1044@@ -220,7 +220,7 @@ index 4a106ca04..cc3290311 100644
1045 return 1;
1046 }
1047 diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c
1048-index e6323701a..58f8a53e1 100644
1049+index e6323701ab..58f8a53e1a 100644
1050 --- a/grub-core/disk/ldm.c
1051 +++ b/grub-core/disk/ldm.c
1052 @@ -25,6 +25,7 @@
1053@@ -291,7 +291,7 @@ index e6323701a..58f8a53e1 100644
1054 goto fail2;
1055 comp->segments = t;
1056 diff --git a/grub-core/font/font.c b/grub-core/font/font.c
1057-index 8e118b315..5edb477ac 100644
1058+index 8e118b315c..5edb477ac2 100644
1059 --- a/grub-core/font/font.c
1060 +++ b/grub-core/font/font.c
1061 @@ -30,6 +30,7 @@
1062@@ -318,7 +318,7 @@ index 8e118b315..5edb477ac 100644
1063 return 0;
1064
1065 diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
1066-index 11272efc1..2b65bd56a 100644
1067+index 11272efc1a..2b65bd56a0 100644
1068 --- a/grub-core/fs/btrfs.c
1069 +++ b/grub-core/fs/btrfs.c
1070 @@ -40,6 +40,7 @@
1071@@ -375,7 +375,7 @@ index 11272efc1..2b65bd56a 100644
1072 }
1073 }
1074 diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
1075-index 9b389802a..ac33bcd68 100644
1076+index 9b389802a3..ac33bcd68c 100644
1077 --- a/grub-core/fs/ext2.c
1078 +++ b/grub-core/fs/ext2.c
1079 @@ -46,6 +46,7 @@
1080@@ -410,7 +410,7 @@ index 9b389802a..ac33bcd68 100644
1081 return 0;
1082
1083 diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
1084-index 4f1b52a55..7ba5b300b 100644
1085+index 4f1b52a552..7ba5b300bc 100644
1086 --- a/grub-core/fs/iso9660.c
1087 +++ b/grub-core/fs/iso9660.c
1088 @@ -28,6 +28,7 @@
1089@@ -514,7 +514,7 @@ index 4f1b52a55..7ba5b300b 100644
1090 grub_free (ctx.filename);
1091 grub_free (node);
1092 diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c
1093-index 90f7fb379..de2b107a4 100644
1094+index 90f7fb3791..de2b107a4a 100644
1095 --- a/grub-core/fs/sfs.c
1096 +++ b/grub-core/fs/sfs.c
1097 @@ -26,6 +26,7 @@
1098@@ -578,7 +578,7 @@ index 90f7fb379..de2b107a4 100644
1099 *grub_latin1_to_utf8 ((grub_uint8_t *) *label,
1100 (const grub_uint8_t *) data->label,
1101 diff --git a/grub-core/fs/squash4.c b/grub-core/fs/squash4.c
1102-index 95d5c1e1f..785123894 100644
1103+index 95d5c1e1ff..785123894e 100644
1104 --- a/grub-core/fs/squash4.c
1105 +++ b/grub-core/fs/squash4.c
1106 @@ -26,6 +26,7 @@
1107@@ -677,7 +677,7 @@ index 95d5c1e1f..785123894 100644
1108 node->ino = ino;
1109 node->stack[node->stsize].ino_chunk = grub_le_to_cpu32 (dh.ino_chunk);
1110 diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c
1111-index a83761674..21ac7f446 100644
1112+index a83761674a..21ac7f4460 100644
1113 --- a/grub-core/fs/udf.c
1114 +++ b/grub-core/fs/udf.c
1115 @@ -28,6 +28,7 @@
1116@@ -786,7 +786,7 @@ index a83761674..21ac7f446 100644
1117 grub_free (out);
1118 grub_error (GRUB_ERR_BAD_FS, "invalid symlink");
1119 diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
1120-index 96ffecbfc..ea6590290 100644
1121+index 96ffecbfc9..ea6590290b 100644
1122 --- a/grub-core/fs/xfs.c
1123 +++ b/grub-core/fs/xfs.c
1124 @@ -25,6 +25,7 @@
1125@@ -822,7 +822,7 @@ index 96ffecbfc..ea6590290 100644
1126 if (! data)
1127 goto fail;
1128 diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
1129-index 381dde556..36d0373a6 100644
1130+index 381dde556d..36d0373a6a 100644
1131 --- a/grub-core/fs/zfs/zfs.c
1132 +++ b/grub-core/fs/zfs/zfs.c
1133 @@ -55,6 +55,7 @@
1134@@ -875,7 +875,7 @@ index 381dde556..36d0373a6 100644
1135 return 0;
1136 grub_memcpy (ret, nvlist, sizeof (grub_uint32_t));
1137 diff --git a/grub-core/fs/zfs/zfscrypt.c b/grub-core/fs/zfs/zfscrypt.c
1138-index 1402e0bc2..de3b015f5 100644
1139+index 1402e0bc29..de3b015f58 100644
1140 --- a/grub-core/fs/zfs/zfscrypt.c
1141 +++ b/grub-core/fs/zfs/zfscrypt.c
1142 @@ -22,6 +22,7 @@
1143@@ -902,7 +902,7 @@ index 1402e0bc2..de3b015f5 100644
1144 return grub_errno;
1145 key->is_passphrase = passphrase;
1146 diff --git a/grub-core/lib/arg.c b/grub-core/lib/arg.c
1147-index fd7744a6f..3288609a5 100644
1148+index fd7744a6ff..3288609a5e 100644
1149 --- a/grub-core/lib/arg.c
1150 +++ b/grub-core/lib/arg.c
1151 @@ -23,6 +23,7 @@
1152@@ -954,7 +954,7 @@ index fd7744a6f..3288609a5 100644
1153 return 0;
1154
1155 diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
1156-index 5b9b92d6b..ef0d63afc 100644
1157+index 5b9b92d6ba..ef0d63afc8 100644
1158 --- a/grub-core/loader/i386/bsd.c
1159 +++ b/grub-core/loader/i386/bsd.c
1160 @@ -35,6 +35,7 @@
1161@@ -984,7 +984,7 @@ index 5b9b92d6b..ef0d63afc 100644
1162 return grub_errno;
1163
1164 diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
1165-index e332d5eb4..906ec7d67 100644
1166+index e332d5eb4a..906ec7d678 100644
1167 --- a/grub-core/net/dns.c
1168 +++ b/grub-core/net/dns.c
1169 @@ -22,6 +22,7 @@
1170@@ -1013,7 +1013,7 @@ index e332d5eb4..906ec7d67 100644
1171 return grub_errno;
1172 dns_servers_alloc = na;
1173 diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c
1174-index d57fb72fa..4dfcc3107 100644
1175+index d57fb72faa..4dfcc31078 100644
1176 --- a/grub-core/normal/charset.c
1177 +++ b/grub-core/normal/charset.c
1178 @@ -48,6 +48,7 @@
1179@@ -1050,7 +1050,7 @@ index d57fb72fa..4dfcc3107 100644
1180 continue;
1181 }
1182 diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c
1183-index c57242e2e..de03fe63b 100644
1184+index c57242e2ea..de03fe63b3 100644
1185 --- a/grub-core/normal/cmdline.c
1186 +++ b/grub-core/normal/cmdline.c
1187 @@ -28,6 +28,7 @@
1188@@ -1086,7 +1086,7 @@ index c57242e2e..de03fe63b 100644
1189 grub_errno = GRUB_ERR_NONE;
1190 (*max_len) /= 2;
1191 diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c
1192-index 1993995be..50eef918c 100644
1193+index 1993995be6..50eef918cf 100644
1194 --- a/grub-core/normal/menu_entry.c
1195 +++ b/grub-core/normal/menu_entry.c
1196 @@ -27,6 +27,7 @@
1197@@ -1119,7 +1119,7 @@ index 1993995be..50eef918c 100644
1198
1199 return 1;
1200 diff --git a/grub-core/script/argv.c b/grub-core/script/argv.c
1201-index 217ec5d1e..5751fdd57 100644
1202+index 217ec5d1e1..5751fdd570 100644
1203 --- a/grub-core/script/argv.c
1204 +++ b/grub-core/script/argv.c
1205 @@ -20,6 +20,7 @@
1206@@ -1170,7 +1170,7 @@ index 217ec5d1e..5751fdd57 100644
1207 return 1;
1208
1209 diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c
1210-index c6bd3172f..5fb0cbd0b 100644
1211+index c6bd3172fa..5fb0cbd0bc 100644
1212 --- a/grub-core/script/lexer.c
1213 +++ b/grub-core/script/lexer.c
1214 @@ -24,6 +24,7 @@
1215@@ -1231,7 +1231,7 @@ index c6bd3172f..5fb0cbd0b 100644
1216 }
1217
1218 diff --git a/grub-core/video/bitmap.c b/grub-core/video/bitmap.c
1219-index b2e031566..6256e209a 100644
1220+index b2e0315665..6256e209a6 100644
1221 --- a/grub-core/video/bitmap.c
1222 +++ b/grub-core/video/bitmap.c
1223 @@ -23,6 +23,7 @@
1224@@ -1286,7 +1286,7 @@ index b2e031566..6256e209a 100644
1225
1226 /* Frees all resources allocated by bitmap. */
1227 diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
1228-index 61bd64537..0157ff742 100644
1229+index 61bd645379..0157ff7420 100644
1230 --- a/grub-core/video/readers/png.c
1231 +++ b/grub-core/video/readers/png.c
1232 @@ -23,6 +23,7 @@
1233diff --git a/debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch b/debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch
1234index aa649ab..438d655 100644
1235--- a/debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch
1236+++ b/debian/patches/0086-iso9660-Don-t-leak-memory-on-realloc-failures.patch
1237@@ -10,7 +10,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1238 1 file changed, 20 insertions(+), 4 deletions(-)
1239
1240 diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
1241-index 7ba5b300b..5ec4433b8 100644
1242+index 7ba5b300bc..5ec4433b8f 100644
1243 --- a/grub-core/fs/iso9660.c
1244 +++ b/grub-core/fs/iso9660.c
1245 @@ -533,14 +533,20 @@ add_part (struct iterate_dir_ctx *ctx,
1246diff --git a/debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch b/debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch
1247index 2721623..2935ce4 100644
1248--- a/debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch
1249+++ b/debian/patches/0087-font-Do-not-load-more-than-one-NAME-section.patch
1250@@ -16,7 +16,7 @@ Reviewed-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
1251 1 file changed, 6 insertions(+)
1252
1253 diff --git a/grub-core/font/font.c b/grub-core/font/font.c
1254-index 5edb477ac..d09bb38d8 100644
1255+index 5edb477ac2..d09bb38d89 100644
1256 --- a/grub-core/font/font.c
1257 +++ b/grub-core/font/font.c
1258 @@ -532,6 +532,12 @@ grub_font_load (const char *filename)
1259diff --git a/debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch b/debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch
1260index 993dcbd..dbf1ae4 100644
1261--- a/debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch
1262+++ b/debian/patches/0088-gfxmenu-Fix-double-free-in-load_image.patch
1263@@ -15,7 +15,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1264 1 file changed, 4 insertions(+), 1 deletion(-)
1265
1266 diff --git a/grub-core/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c
1267-index 29784ed2d..6b2e976f1 100644
1268+index 29784ed2d9..6b2e976f16 100644
1269 --- a/grub-core/gfxmenu/gui_image.c
1270 +++ b/grub-core/gfxmenu/gui_image.c
1271 @@ -195,7 +195,10 @@ load_image (grub_gui_image_t self, const char *path)
1272diff --git a/debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch b/debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch
1273index 737b79e..eb283a5 100644
1274--- a/debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch
1275+++ b/debian/patches/0089-lzma-Make-sure-we-don-t-dereference-past-array.patch
1276@@ -21,7 +21,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1277 1 file changed, 8 insertions(+), 2 deletions(-)
1278
1279 diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c
1280-index f2ec04a8c..753e56a95 100644
1281+index f2ec04a8c2..753e56a95e 100644
1282 --- a/grub-core/lib/LzmaEnc.c
1283 +++ b/grub-core/lib/LzmaEnc.c
1284 @@ -1877,13 +1877,19 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
1285diff --git a/debian/patches/0090-tftp-Do-not-use-priority-queue.patch b/debian/patches/0090-tftp-Do-not-use-priority-queue.patch
1286index a002fcd..df1a56c 100644
1287--- a/debian/patches/0090-tftp-Do-not-use-priority-queue.patch
1288+++ b/debian/patches/0090-tftp-Do-not-use-priority-queue.patch
1289@@ -34,7 +34,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1290 1 file changed, 53 insertions(+), 118 deletions(-)
1291
1292 diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
1293-index a0817a075..e6566fa17 100644
1294+index a0817a075d..e6566fa176 100644
1295 --- a/grub-core/net/tftp.c
1296 +++ b/grub-core/net/tftp.c
1297 @@ -25,7 +25,6 @@
1298diff --git a/debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch b/debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch
1299index 53bcd7a..4865443 100644
1300--- a/debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch
1301+++ b/debian/patches/0091-script-Remove-unused-fields-from-grub_script_functio.patch
1302@@ -10,7 +10,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1303 1 file changed, 5 deletions(-)
1304
1305 diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h
1306-index 360c2be1f..b382bcf09 100644
1307+index 360c2be1f0..b382bcf09b 100644
1308 --- a/include/grub/script_sh.h
1309 +++ b/include/grub/script_sh.h
1310 @@ -359,13 +359,8 @@ struct grub_script_function
1311diff --git a/debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch b/debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch
1312index 537d3ca..08e4973 100644
1313--- a/debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch
1314+++ b/debian/patches/0092-script-Avoid-a-use-after-free-when-redefining-a-func.patch
1315@@ -27,7 +27,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1316 4 files changed, 19 insertions(+), 4 deletions(-)
1317
1318 diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
1319-index c8d6806fe..7e028e135 100644
1320+index c8d6806fe0..7e028e1355 100644
1321 --- a/grub-core/script/execute.c
1322 +++ b/grub-core/script/execute.c
1323 @@ -838,7 +838,9 @@ grub_script_function_call (grub_script_function_t func, int argc, char **args)
1324@@ -41,7 +41,7 @@ index c8d6806fe..7e028e135 100644
1325 function_return = 0;
1326 active_loops = loops;
1327 diff --git a/grub-core/script/function.c b/grub-core/script/function.c
1328-index d36655e51..3aad04bf9 100644
1329+index d36655e510..3aad04bf9d 100644
1330 --- a/grub-core/script/function.c
1331 +++ b/grub-core/script/function.c
1332 @@ -34,6 +34,7 @@ grub_script_function_create (struct grub_script_arg *functionname_arg,
1333@@ -76,7 +76,7 @@ index d36655e51..3aad04bf9 100644
1334 else
1335 {
1336 diff --git a/grub-core/script/parser.y b/grub-core/script/parser.y
1337-index 4f0ab8319..f80b86b6f 100644
1338+index 4f0ab8319e..f80b86b6f1 100644
1339 --- a/grub-core/script/parser.y
1340 +++ b/grub-core/script/parser.y
1341 @@ -289,7 +289,8 @@ function: "function" "name"
1342@@ -90,7 +90,7 @@ index 4f0ab8319..f80b86b6f 100644
1343
1344 state->scripts = $<scripts>3;
1345 diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h
1346-index b382bcf09..6c48e0751 100644
1347+index b382bcf09b..6c48e07512 100644
1348 --- a/include/grub/script_sh.h
1349 +++ b/include/grub/script_sh.h
1350 @@ -361,6 +361,8 @@ struct grub_script_function
1351diff --git a/debian/patches/0093-hfsplus-fix-two-more-overflows.patch b/debian/patches/0093-hfsplus-fix-two-more-overflows.patch
1352index 407f8f5..cb67208 100644
1353--- a/debian/patches/0093-hfsplus-fix-two-more-overflows.patch
1354+++ b/debian/patches/0093-hfsplus-fix-two-more-overflows.patch
1355@@ -15,7 +15,7 @@ Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
1356 1 file changed, 8 insertions(+), 3 deletions(-)
1357
1358 diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
1359-index dae43becc..9c4e4c88c 100644
1360+index dae43becc9..9c4e4c88c9 100644
1361 --- a/grub-core/fs/hfsplus.c
1362 +++ b/grub-core/fs/hfsplus.c
1363 @@ -31,6 +31,7 @@
1364diff --git a/debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch b/debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch
1365index e07fb97..36e67c6 100644
1366--- a/debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch
1367+++ b/debian/patches/0094-lvm-fix-two-more-potential-data-dependent-alloc-over.patch
1368@@ -15,7 +15,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1369 1 file changed, 31 insertions(+), 8 deletions(-)
1370
1371 diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
1372-index d1df640b3..d154f7c01 100644
1373+index d1df640b31..d154f7c01b 100644
1374 --- a/grub-core/disk/lvm.c
1375 +++ b/grub-core/disk/lvm.c
1376 @@ -25,6 +25,7 @@
1377diff --git a/debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch b/debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch
1378index e4f696d..7509a9d 100644
1379--- a/debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch
1380+++ b/debian/patches/0095-efi-fix-some-malformed-device-path-arithmetic-errors.patch
1381@@ -24,7 +24,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1382 4 files changed, 88 insertions(+), 21 deletions(-)
1383
1384 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
1385-index dc31caa21..b1a8b39b4 100644
1386+index dc31caa213..b1a8b39b49 100644
1387 --- a/grub-core/kern/efi/efi.c
1388 +++ b/grub-core/kern/efi/efi.c
1389 @@ -332,7 +332,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
1390@@ -150,7 +150,7 @@ index dc31caa21..b1a8b39b4 100644
1391 return 0;
1392 }
1393 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
1394-index b9a2df34b..f8a34cd49 100644
1395+index b9a2df34b1..f8a34cd491 100644
1396 --- a/grub-core/loader/efi/chainloader.c
1397 +++ b/grub-core/loader/efi/chainloader.c
1398 @@ -126,6 +126,12 @@ copy_file_path (grub_efi_file_path_device_path_t *fp,
1399@@ -188,7 +188,7 @@ index b9a2df34b..f8a34cd49 100644
1400 break;
1401 d = GRUB_EFI_NEXT_DEVICE_PATH (d);
1402 diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c
1403-index b7d176b5d..c50cb5410 100644
1404+index b7d176b5d3..c50cb54109 100644
1405 --- a/grub-core/loader/i386/xnu.c
1406 +++ b/grub-core/loader/i386/xnu.c
1407 @@ -516,14 +516,15 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
1408@@ -212,7 +212,7 @@ index b7d176b5d..c50cb5410 100644
1409 dev = grub_xnu_devprop_add_device (dpstart, (char *) buf
1410 - (char *) dpstart);
1411 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
1412-index 9824fbcd0..08bff60b5 100644
1413+index 9824fbcd0d..08bff60b51 100644
1414 --- a/include/grub/efi/api.h
1415 +++ b/include/grub/efi/api.h
1416 @@ -640,6 +640,7 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t;
1417diff --git a/debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch b/debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch
1418index f85e211..0e0f9e5 100644
1419--- a/debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch
1420+++ b/debian/patches/0096-linuxefi-fail-kernel-validation-without-shim-protoco.patch
1421@@ -20,7 +20,7 @@ Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
1422 4 files changed, 12 insertions(+), 5 deletions(-)
1423
1424 diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
1425-index 1a5296a60..3f5496fc5 100644
1426+index 1a5296a60c..3f5496fc55 100644
1427 --- a/grub-core/loader/arm64/linux.c
1428 +++ b/grub-core/loader/arm64/linux.c
1429 @@ -34,6 +34,7 @@
1430@@ -52,7 +52,7 @@ index 1a5296a60..3f5496fc5 100644
1431
1432 cmdline_size = grub_loader_cmdline_size (argc, argv) + sizeof (LINUX_IMAGE);
1433 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
1434-index f8a34cd49..cf89cedf8 100644
1435+index f8a34cd491..cf89cedf8d 100644
1436 --- a/grub-core/loader/efi/chainloader.c
1437 +++ b/grub-core/loader/efi/chainloader.c
1438 @@ -1096,6 +1096,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
1439@@ -64,7 +64,7 @@ index f8a34cd49..cf89cedf8 100644
1440 grub_file_close (file);
1441 grub_device_close (dev);
1442 diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
1443-index e372b26a1..f6d30bcf7 100644
1444+index e372b26a1b..f6d30bcf7c 100644
1445 --- a/grub-core/loader/efi/linux.c
1446 +++ b/grub-core/loader/efi/linux.c
1447 @@ -34,6 +34,7 @@ struct grub_efi_shim_lock
1448@@ -76,7 +76,7 @@ index e372b26a1..f6d30bcf7 100644
1449 grub_linuxefi_secure_validate (void *data, grub_uint32_t size)
1450 {
1451 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
1452-index 2929da7a2..e357bf67c 100644
1453+index 2929da7a29..e357bf67c6 100644
1454 --- a/grub-core/loader/i386/efi/linux.c
1455 +++ b/grub-core/loader/i386/efi/linux.c
1456 @@ -199,7 +199,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
1457diff --git a/debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch b/debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch
1458index 5015df4..fd7f502 100644
1459--- a/debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch
1460+++ b/debian/patches/0097-Fix-a-regression-caused-by-efi-fix-some-malformed-de.patch
1461@@ -21,7 +21,7 @@ Remove the bogus check, and also propagate errors from copy_file_path.
1462 1 file changed, 13 insertions(+), 12 deletions(-)
1463
1464 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
1465-index cf89cedf8..d0c53077e 100644
1466+index cf89cedf8d..d0c53077e8 100644
1467 --- a/grub-core/loader/efi/chainloader.c
1468 +++ b/grub-core/loader/efi/chainloader.c
1469 @@ -116,7 +116,7 @@ grub_chainloader_boot (void)
1470diff --git a/debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch b/debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch
1471index 4e43597..7ea7d7d 100644
1472--- a/debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch
1473+++ b/debian/patches/0098-efi-Fix-use-after-free-in-halt-reboot-path.patch
1474@@ -52,7 +52,7 @@ Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
1475 9 files changed, 28 insertions(+), 7 deletions(-)
1476
1477 diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c
1478-index 06df60e2f..40c3b467f 100644
1479+index 06df60e2f0..40c3b467fc 100644
1480 --- a/grub-core/kern/arm/efi/init.c
1481 +++ b/grub-core/kern/arm/efi/init.c
1482 @@ -71,4 +71,7 @@ grub_machine_fini (int flags)
1483@@ -64,7 +64,7 @@ index 06df60e2f..40c3b467f 100644
1484 + grub_efi_memory_fini ();
1485 }
1486 diff --git a/grub-core/kern/arm64/efi/init.c b/grub-core/kern/arm64/efi/init.c
1487-index 6224999ec..5010caefd 100644
1488+index 6224999ec9..5010caefd6 100644
1489 --- a/grub-core/kern/arm64/efi/init.c
1490 +++ b/grub-core/kern/arm64/efi/init.c
1491 @@ -57,4 +57,7 @@ grub_machine_fini (int flags)
1492@@ -76,7 +76,7 @@ index 6224999ec..5010caefd 100644
1493 + grub_efi_memory_fini ();
1494 }
1495 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
1496-index b1a8b39b4..88bbd34ea 100644
1497+index b1a8b39b49..88bbd34eac 100644
1498 --- a/grub-core/kern/efi/efi.c
1499 +++ b/grub-core/kern/efi/efi.c
1500 @@ -157,7 +157,8 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
1501@@ -90,7 +90,7 @@ index b1a8b39b4..88bbd34ea 100644
1502 GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
1503 for (;;) ;
1504 diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
1505-index 3dfdf2d22..2c31847bf 100644
1506+index 3dfdf2d22b..2c31847bf6 100644
1507 --- a/grub-core/kern/efi/init.c
1508 +++ b/grub-core/kern/efi/init.c
1509 @@ -80,5 +80,4 @@ grub_efi_fini (void)
1510@@ -100,7 +100,7 @@ index 3dfdf2d22..2c31847bf 100644
1511 - grub_efi_memory_fini ();
1512 }
1513 diff --git a/grub-core/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c
1514-index da499aba0..deb2eacd8 100644
1515+index da499aba04..deb2eacd8d 100644
1516 --- a/grub-core/kern/i386/efi/init.c
1517 +++ b/grub-core/kern/i386/efi/init.c
1518 @@ -39,6 +39,11 @@ grub_machine_init (void)
1519@@ -118,7 +118,7 @@ index da499aba0..deb2eacd8 100644
1520 + grub_efi_memory_fini ();
1521 }
1522 diff --git a/grub-core/kern/ia64/efi/init.c b/grub-core/kern/ia64/efi/init.c
1523-index b5ecbd091..f1965571b 100644
1524+index b5ecbd0912..f1965571b1 100644
1525 --- a/grub-core/kern/ia64/efi/init.c
1526 +++ b/grub-core/kern/ia64/efi/init.c
1527 @@ -70,6 +70,11 @@ grub_machine_init (void)
1528@@ -136,7 +136,7 @@ index b5ecbd091..f1965571b 100644
1529 + grub_efi_memory_fini ();
1530 }
1531 diff --git a/grub-core/kern/riscv/efi/init.c b/grub-core/kern/riscv/efi/init.c
1532-index 7eb1969d0..38795fe67 100644
1533+index 7eb1969d0b..38795fe674 100644
1534 --- a/grub-core/kern/riscv/efi/init.c
1535 +++ b/grub-core/kern/riscv/efi/init.c
1536 @@ -73,4 +73,7 @@ grub_machine_fini (int flags)
1537@@ -148,7 +148,7 @@ index 7eb1969d0..38795fe67 100644
1538 + grub_efi_memory_fini ();
1539 }
1540 diff --git a/grub-core/lib/efi/halt.c b/grub-core/lib/efi/halt.c
1541-index 5859f0498..29d413641 100644
1542+index 5859f0498a..29d4136416 100644
1543 --- a/grub-core/lib/efi/halt.c
1544 +++ b/grub-core/lib/efi/halt.c
1545 @@ -28,7 +28,8 @@
1546@@ -162,7 +162,7 @@ index 5859f0498..29d413641 100644
1547 !defined(__riscv)
1548 grub_acpi_halt ();
1549 diff --git a/include/grub/loader.h b/include/grub/loader.h
1550-index 7f82a499f..b20864282 100644
1551+index 7f82a499fd..b208642821 100644
1552 --- a/include/grub/loader.h
1553 +++ b/include/grub/loader.h
1554 @@ -33,6 +33,7 @@ enum
1555diff --git a/debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch b/debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch
1556index 89c1a00..42d6ff3 100644
1557--- a/debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch
1558+++ b/debian/patches/0099-chainloader-Avoid-a-double-free-when-validation-fail.patch
1559@@ -8,7 +8,7 @@ Subject: chainloader: Avoid a double free when validation fails
1560 1 file changed, 6 insertions(+), 3 deletions(-)
1561
1562 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
1563-index d0c53077e..144a6549d 100644
1564+index d0c53077e8..144a6549df 100644
1565 --- a/grub-core/loader/efi/chainloader.c
1566 +++ b/grub-core/loader/efi/chainloader.c
1567 @@ -1085,6 +1085,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
1568diff --git a/debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch b/debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch
1569index 2cdc917..34464ab 100644
1570--- a/debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch
1571+++ b/debian/patches/0100-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch
1572@@ -19,7 +19,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1573 4 files changed, 31 insertions(+), 10 deletions(-)
1574
1575 diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
1576-index 991eb29db..4e14eb188 100644
1577+index 991eb29db9..4e14eb1887 100644
1578 --- a/grub-core/loader/i386/linux.c
1579 +++ b/grub-core/loader/i386/linux.c
1580 @@ -36,6 +36,7 @@
1581@@ -47,7 +47,7 @@ index 991eb29db..4e14eb188 100644
1582 return err;
1583 real_mode_mem = get_virtual_current_address (ch);
1584 diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
1585-index 3866f048b..81ab3c0c1 100644
1586+index 3866f048bb..81ab3c0c15 100644
1587 --- a/grub-core/loader/i386/pc/linux.c
1588 +++ b/grub-core/loader/i386/pc/linux.c
1589 @@ -36,6 +36,7 @@
1590@@ -74,7 +74,7 @@ index 3866f048b..81ab3c0c1 100644
1591 if (! grub_linux_is_bzimage
1592 && GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size
1593 diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c
1594-index 8f662c8ac..cd24874ca 100644
1595+index 8f662c8ac8..cd24874ca3 100644
1596 --- a/grub-core/loader/i386/xen.c
1597 +++ b/grub-core/loader/i386/xen.c
1598 @@ -41,6 +41,7 @@
1599@@ -111,7 +111,7 @@ index 8f662c8ac..cd24874ca 100644
1600 goto fail;
1601 kern_chunk_src = get_virtual_current_address (ch);
1602 diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
1603-index 2f0ebd0b8..3fd653993 100644
1604+index 2f0ebd0b8b..3fd653993f 100644
1605 --- a/grub-core/loader/xnu.c
1606 +++ b/grub-core/loader/xnu.c
1607 @@ -35,6 +35,7 @@
1608diff --git a/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch b/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch
1609index d3e5e6e..5f955e5 100644
1610--- a/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch
1611+++ b/debian/patches/0101-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch
1612@@ -35,7 +35,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1613 13 files changed, 69 insertions(+), 58 deletions(-)
1614
1615 diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
1616-index 71dd4f0ab..34cbe834f 100644
1617+index 71dd4f0ab0..34cbe834fa 100644
1618 --- a/grub-core/lib/i386/relocator.c
1619 +++ b/grub-core/lib/i386/relocator.c
1620 @@ -83,11 +83,10 @@ grub_relocator32_boot (struct grub_relocator *rel,
1621@@ -88,7 +88,7 @@ index 71dd4f0ab..34cbe834f 100644
1622 return err;
1623
1624 diff --git a/grub-core/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c
1625-index 9d5f49cb9..743b213e6 100644
1626+index 9d5f49cb93..743b213e69 100644
1627 --- a/grub-core/lib/mips/relocator.c
1628 +++ b/grub-core/lib/mips/relocator.c
1629 @@ -120,10 +120,8 @@ grub_relocator32_boot (struct grub_relocator *rel,
1630@@ -105,7 +105,7 @@ index 9d5f49cb9..743b213e6 100644
1631 if (err)
1632 return err;
1633 diff --git a/grub-core/lib/powerpc/relocator.c b/grub-core/lib/powerpc/relocator.c
1634-index bdf2b111b..8ffb8b686 100644
1635+index bdf2b111be..8ffb8b6868 100644
1636 --- a/grub-core/lib/powerpc/relocator.c
1637 +++ b/grub-core/lib/powerpc/relocator.c
1638 @@ -115,10 +115,8 @@ grub_relocator32_boot (struct grub_relocator *rel,
1639@@ -122,7 +122,7 @@ index bdf2b111b..8ffb8b686 100644
1640 if (err)
1641 return err;
1642 diff --git a/grub-core/lib/x86_64/efi/relocator.c b/grub-core/lib/x86_64/efi/relocator.c
1643-index 3caef7a40..7d200a125 100644
1644+index 3caef7a402..7d200a125e 100644
1645 --- a/grub-core/lib/x86_64/efi/relocator.c
1646 +++ b/grub-core/lib/x86_64/efi/relocator.c
1647 @@ -50,10 +50,9 @@ grub_relocator64_efi_boot (struct grub_relocator *rel,
1648@@ -140,7 +140,7 @@ index 3caef7a40..7d200a125 100644
1649 return err;
1650
1651 diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
1652-index 4e14eb188..04bd78a1f 100644
1653+index 4e14eb1887..04bd78a1fa 100644
1654 --- a/grub-core/loader/i386/linux.c
1655 +++ b/grub-core/loader/i386/linux.c
1656 @@ -184,9 +184,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align,
1657@@ -156,7 +156,7 @@ index 4e14eb188..04bd78a1f 100644
1658 GRUB_RELOCATOR_PREFERENCE_LOW,
1659 1);
1660 diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c
1661-index ad3cc292f..a67d9d0a8 100644
1662+index ad3cc292fd..a67d9d0a80 100644
1663 --- a/grub-core/loader/i386/multiboot_mbi.c
1664 +++ b/grub-core/loader/i386/multiboot_mbi.c
1665 @@ -466,10 +466,9 @@ grub_multiboot_make_mbi (grub_uint32_t *target)
1666@@ -174,7 +174,7 @@ index ad3cc292f..a67d9d0a8 100644
1667 return err;
1668 ptrorig = get_virtual_current_address (ch);
1669 diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
1670-index 81ab3c0c1..6400a5b91 100644
1671+index 81ab3c0c15..6400a5b91d 100644
1672 --- a/grub-core/loader/i386/pc/linux.c
1673 +++ b/grub-core/loader/i386/pc/linux.c
1674 @@ -463,10 +463,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
1675@@ -191,7 +191,7 @@ index 81ab3c0c1..6400a5b91 100644
1676 return err;
1677 initrd_chunk = get_virtual_current_address (ch);
1678 diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c
1679-index 7b723bf18..e4ed95921 100644
1680+index 7b723bf189..e4ed95921d 100644
1681 --- a/grub-core/loader/mips/linux.c
1682 +++ b/grub-core/loader/mips/linux.c
1683 @@ -442,12 +442,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
1684@@ -211,7 +211,7 @@ index 7b723bf18..e4ed95921 100644
1685 if (err)
1686 goto fail;
1687 diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
1688-index 3e6ad166d..3e286908d 100644
1689+index 3e6ad166dc..3e286908dd 100644
1690 --- a/grub-core/loader/multiboot.c
1691 +++ b/grub-core/loader/multiboot.c
1692 @@ -404,7 +404,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),
1693@@ -224,7 +224,7 @@ index 3e6ad166d..3e286908d 100644
1694 GRUB_RELOCATOR_PREFERENCE_NONE, 1);
1695 if (err)
1696 diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c
1697-index cc6853692..f2318e0d1 100644
1698+index cc6853692a..f2318e0d16 100644
1699 --- a/grub-core/loader/multiboot_elfxx.c
1700 +++ b/grub-core/loader/multiboot_elfxx.c
1701 @@ -109,10 +109,10 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld)
1702@@ -252,7 +252,7 @@ index cc6853692..f2318e0d1 100644
1703 GRUB_RELOCATOR_PREFERENCE_NONE,
1704 mld->avoid_efi_boot_services);
1705 diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c
1706-index 53da78615..3ec209283 100644
1707+index 53da786151..3ec2092839 100644
1708 --- a/grub-core/loader/multiboot_mbi2.c
1709 +++ b/grub-core/loader/multiboot_mbi2.c
1710 @@ -295,10 +295,10 @@ grub_multiboot2_load (grub_file_t file, const char *filename)
1711@@ -280,7 +280,7 @@ index 53da78615..3ec209283 100644
1712 GRUB_RELOCATOR_PREFERENCE_NONE, 1);
1713 if (err)
1714 diff --git a/grub-core/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c
1715-index 8089804d4..d648ef0cd 100644
1716+index 8089804d48..d648ef0cd3 100644
1717 --- a/grub-core/loader/xnu_resume.c
1718 +++ b/grub-core/loader/xnu_resume.c
1719 @@ -129,7 +129,7 @@ grub_xnu_resume (char *imagename)
1720@@ -293,7 +293,7 @@ index 8089804d4..d648ef0cd 100644
1721 GRUB_XNU_PAGESIZE,
1722 GRUB_RELOCATOR_PREFERENCE_NONE, 0);
1723 diff --git a/include/grub/relocator.h b/include/grub/relocator.h
1724-index 24d8672d2..1b3bdd92a 100644
1725+index 24d8672d22..1b3bdd92ac 100644
1726 --- a/include/grub/relocator.h
1727 +++ b/include/grub/relocator.h
1728 @@ -49,6 +49,35 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
1729diff --git a/debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch b/debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch
1730index 6adea77..a4d7edd 100644
1731--- a/debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch
1732+++ b/debian/patches/0102-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch
1733@@ -26,7 +26,7 @@ Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1734 1 file changed, 2 insertions(+), 2 deletions(-)
1735
1736 diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
1737-index 5847aac36..f2c1944c2 100644
1738+index 5847aac364..f2c1944c28 100644
1739 --- a/grub-core/lib/relocator.c
1740 +++ b/grub-core/lib/relocator.c
1741 @@ -1386,8 +1386,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
1742diff --git a/debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch b/debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch
1743index b91f616..0bf8d98 100644
1744--- a/debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch
1745+++ b/debian/patches/0103-linux-loader-avoid-overflow-on-initrd-size-calculati.patch
1746@@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1747 1 file changed, 2 insertions(+), 2 deletions(-)
1748
1749 diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
1750-index 471b214d6..25624ebc1 100644
1751+index 471b214d6c..25624ebc11 100644
1752 --- a/grub-core/loader/linux.c
1753 +++ b/grub-core/loader/linux.c
1754 @@ -151,8 +151,8 @@ grub_initrd_init (int argc, char *argv[],
1755diff --git a/debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch b/debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch
1756index 46521c3..e7c41b2 100644
1757--- a/debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch
1758+++ b/debian/patches/0104-linux-Fix-integer-overflows-in-initrd-size-handling.patch
1759@@ -14,7 +14,7 @@ Reviewed-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
1760 1 file changed, 54 insertions(+), 20 deletions(-)
1761
1762 diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
1763-index 25624ebc1..e9f819ee9 100644
1764+index 25624ebc11..e9f819ee95 100644
1765 --- a/grub-core/loader/linux.c
1766 +++ b/grub-core/loader/linux.c
1767 @@ -4,6 +4,7 @@
1768diff --git a/debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch b/debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
1769index d030dc0..c364981 100644
1770--- a/debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
1771+++ b/debian/patches/0105-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
1772@@ -15,7 +15,7 @@ Signed-off-by: Colin Watson <cjwatson@debian.org>
1773 1 file changed, 7 insertions(+), 2 deletions(-)
1774
1775 diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
1776-index e357bf67c..381459ce0 100644
1777+index e357bf67c6..381459ce08 100644
1778 --- a/grub-core/loader/i386/efi/linux.c
1779 +++ b/grub-core/loader/i386/efi/linux.c
1780 @@ -28,6 +28,7 @@
1781diff --git a/debian/patches/at_keyboard-module-init.patch b/debian/patches/at_keyboard-module-init.patch
1782index 5d51a5b..fe36d6e 100644
1783--- a/debian/patches/at_keyboard-module-init.patch
1784+++ b/debian/patches/at_keyboard-module-init.patch
1785@@ -16,7 +16,7 @@ Patch-Name: at_keyboard-module-init.patch
1786 1 file changed, 9 insertions(+)
1787
1788 diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
1789-index f0a986eb1..d4395c201 100644
1790+index f0a986eb17..d4395c2019 100644
1791 --- a/grub-core/term/at_keyboard.c
1792 +++ b/grub-core/term/at_keyboard.c
1793 @@ -244,6 +244,14 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
1794diff --git a/debian/patches/bash-completion-drop-have-checks.patch b/debian/patches/bash-completion-drop-have-checks.patch
1795index 713b79d..806cf54 100644
1796--- a/debian/patches/bash-completion-drop-have-checks.patch
1797+++ b/debian/patches/bash-completion-drop-have-checks.patch
1798@@ -16,7 +16,7 @@ Patch-Name: bash-completion-drop-have-checks.patch
1799 1 file changed, 13 insertions(+), 26 deletions(-)
1800
1801 diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
1802-index 44bf135b9..d4235e7ef 100644
1803+index 44bf135b9f..d4235e7ef8 100644
1804 --- a/util/bash-completion.d/grub-completion.bash.in
1805 +++ b/util/bash-completion.d/grub-completion.bash.in
1806 @@ -166,13 +166,11 @@ _grub_set_entry () {
1807diff --git a/debian/patches/blacklist-1440x900x32.patch b/debian/patches/blacklist-1440x900x32.patch
1808index e205af0..432726d 100644
1809--- a/debian/patches/blacklist-1440x900x32.patch
1810+++ b/debian/patches/blacklist-1440x900x32.patch
1811@@ -13,7 +13,7 @@ Patch-Name: blacklist-1440x900x32.patch
1812 1 file changed, 9 insertions(+)
1813
1814 diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c
1815-index b7f911926..4b1bd7d5e 100644
1816+index b7f911926d..4b1bd7d5ea 100644
1817 --- a/grub-core/video/i386/pc/vbe.c
1818 +++ b/grub-core/video/i386/pc/vbe.c
1819 @@ -1054,6 +1054,15 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,
1820diff --git a/debian/patches/bootp-new-net_bootp6-command.patch b/debian/patches/bootp-new-net_bootp6-command.patch
1821index d3d95dc..67f690b 100644
1822--- a/debian/patches/bootp-new-net_bootp6-command.patch
1823+++ b/debian/patches/bootp-new-net_bootp6-command.patch
1824@@ -17,7 +17,7 @@ Patch-Name: bootp-new-net_bootp6-command.patch
1825 3 files changed, 1018 insertions(+), 1 deletion(-)
1826
1827 diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
1828-index 04cfbb045..21c1824ef 100644
1829+index 04cfbb0450..21c1824efb 100644
1830 --- a/grub-core/net/bootp.c
1831 +++ b/grub-core/net/bootp.c
1832 @@ -24,6 +24,98 @@
1833@@ -969,7 +969,7 @@ index 04cfbb045..21c1824ef 100644
1834 + grub_unregister_command (cmd_bootp6);
1835 }
1836 diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
1837-index ea5edf8f1..01410798b 100644
1838+index ea5edf8f1f..01410798b3 100644
1839 --- a/grub-core/net/ip.c
1840 +++ b/grub-core/net/ip.c
1841 @@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb,
1842@@ -1019,7 +1019,7 @@ index ea5edf8f1..01410798b 100644
1843 {
1844 const struct grub_net_bootp_packet *bootp;
1845 diff --git a/include/grub/net.h b/include/grub/net.h
1846-index cc114286e..58cff96d2 100644
1847+index cc114286ea..58cff96d2a 100644
1848 --- a/include/grub/net.h
1849 +++ b/include/grub/net.h
1850 @@ -448,6 +448,66 @@ struct grub_net_bootp_packet
1851diff --git a/debian/patches/bootp-process-dhcpack-http-boot.patch b/debian/patches/bootp-process-dhcpack-http-boot.patch
1852index 1033c3d..aabd41a 100644
1853--- a/debian/patches/bootp-process-dhcpack-http-boot.patch
1854+++ b/debian/patches/bootp-process-dhcpack-http-boot.patch
1855@@ -24,7 +24,7 @@ Patch-Name: bootp-process-dhcpack-http-boot.patch
1856 2 files changed, 60 insertions(+), 1 deletion(-)
1857
1858 diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
1859-index 21c1824ef..558d97ba1 100644
1860+index 21c1824efb..558d97ba1e 100644
1861 --- a/grub-core/net/bootp.c
1862 +++ b/grub-core/net/bootp.c
1863 @@ -154,7 +154,7 @@ struct grub_dhcp_request_options
1864@@ -109,7 +109,7 @@ index 21c1824ef..558d97ba1 100644
1865 },
1866 GRUB_NET_BOOTP_END,
1867 diff --git a/include/grub/net.h b/include/grub/net.h
1868-index 58cff96d2..b5f9e617e 100644
1869+index 58cff96d2a..b5f9e617e5 100644
1870 --- a/include/grub/net.h
1871 +++ b/include/grub/net.h
1872 @@ -523,6 +523,7 @@ enum
1873diff --git a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
1874index d30ebba..48619ef 100644
1875--- a/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
1876+++ b/debian/patches/cherrypick-lsefisystab-define-smbios3.patch
1877@@ -16,7 +16,7 @@ Patch-Name: cherrypick-lsefisystab-define-smbios3.patch
1878 2 files changed, 6 insertions(+)
1879
1880 diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
1881-index df1030221..7c039c509 100644
1882+index df10302218..7c039c5097 100644
1883 --- a/grub-core/commands/efi/lsefisystab.c
1884 +++ b/grub-core/commands/efi/lsefisystab.c
1885 @@ -48,6 +48,7 @@ static const struct guid_mapping guid_mappings[] =
1886@@ -28,7 +28,7 @@ index df1030221..7c039c509 100644
1887 { GRUB_EFI_TIANO_CUSTOM_DECOMPRESS_GUID, "TIANO CUSTOM DECOMPRESS"},
1888 { GRUB_EFI_TSC_FREQUENCY_GUID, "TSC FREQUENCY"},
1889 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
1890-index 75befd10e..9824fbcd0 100644
1891+index 75befd10e5..9824fbcd0d 100644
1892 --- a/include/grub/efi/api.h
1893 +++ b/include/grub/efi/api.h
1894 @@ -314,6 +314,11 @@
1895diff --git a/debian/patches/cherrypick-lsefisystab-show-dtb.patch b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
1896index a253105..727628f 100644
1897--- a/debian/patches/cherrypick-lsefisystab-show-dtb.patch
1898+++ b/debian/patches/cherrypick-lsefisystab-show-dtb.patch
1899@@ -27,7 +27,7 @@ Patch-Name: cherrypick-lsefisystab-show-dtb.patch
1900 1 file changed, 1 insertion(+)
1901
1902 diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
1903-index 7c039c509..902788250 100644
1904+index 7c039c5097..902788250e 100644
1905 --- a/grub-core/commands/efi/lsefisystab.c
1906 +++ b/grub-core/commands/efi/lsefisystab.c
1907 @@ -40,6 +40,7 @@ static const struct guid_mapping guid_mappings[] =
1908diff --git a/debian/patches/cherrypick-smbios-module.patch b/debian/patches/cherrypick-smbios-module.patch
1909index 3a64dd0..a0a649e 100644
1910--- a/debian/patches/cherrypick-smbios-module.patch
1911+++ b/debian/patches/cherrypick-smbios-module.patch
1912@@ -33,7 +33,7 @@ Patch-Name: cherrypick-smbios-module.patch
1913 create mode 100644 include/grub/smbios.h
1914
1915 diff --git a/docs/grub.texi b/docs/grub.texi
1916-index 1baa0fa20..d573f32cb 100644
1917+index 1baa0fa20f..d573f32cbb 100644
1918 --- a/docs/grub.texi
1919 +++ b/docs/grub.texi
1920 @@ -3976,6 +3976,7 @@ you forget a command, you can run the command @command{help}
1921@@ -126,7 +126,7 @@ index 1baa0fa20..d573f32cb 100644
1922 @subsection source
1923
1924 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
1925-index 33e75021d..9b20f3335 100644
1926+index 33e75021da..9b20f33355 100644
1927 --- a/grub-core/Makefile.core.def
1928 +++ b/grub-core/Makefile.core.def
1929 @@ -1106,6 +1106,21 @@ module = {
1930@@ -153,7 +153,7 @@ index 33e75021d..9b20f3335 100644
1931 ieee1275 = commands/ieee1275/suspend.c;
1932 diff --git a/grub-core/commands/efi/smbios.c b/grub-core/commands/efi/smbios.c
1933 new file mode 100644
1934-index 000000000..75202d5aa
1935+index 0000000000..75202d5aad
1936 --- /dev/null
1937 +++ b/grub-core/commands/efi/smbios.c
1938 @@ -0,0 +1,61 @@
1939@@ -220,7 +220,7 @@ index 000000000..75202d5aa
1940 +}
1941 diff --git a/grub-core/commands/i386/pc/smbios.c b/grub-core/commands/i386/pc/smbios.c
1942 new file mode 100644
1943-index 000000000..069d66367
1944+index 0000000000..069d663673
1945 --- /dev/null
1946 +++ b/grub-core/commands/i386/pc/smbios.c
1947 @@ -0,0 +1,52 @@
1948@@ -278,7 +278,7 @@ index 000000000..069d66367
1949 +}
1950 diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c
1951 new file mode 100644
1952-index 000000000..7a6a391fc
1953+index 0000000000..7a6a391fc1
1954 --- /dev/null
1955 +++ b/grub-core/commands/smbios.c
1956 @@ -0,0 +1,374 @@
1957@@ -657,7 +657,7 @@ index 000000000..7a6a391fc
1958 + grub_unregister_extcmd (cmd);
1959 +}
1960 diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c
1961-index 492c07c46..e5fffb7d4 100644
1962+index 492c07c468..e5fffb7d4a 100644
1963 --- a/grub-core/efiemu/i386/pc/cfgtables.c
1964 +++ b/grub-core/efiemu/i386/pc/cfgtables.c
1965 @@ -22,11 +22,11 @@
1966@@ -696,7 +696,7 @@ index 492c07c46..e5fffb7d4 100644
1967 }
1968 diff --git a/include/grub/smbios.h b/include/grub/smbios.h
1969 new file mode 100644
1970-index 000000000..15ec260b3
1971+index 0000000000..15ec260b32
1972 --- /dev/null
1973 +++ b/include/grub/smbios.h
1974 @@ -0,0 +1,69 @@
1975diff --git a/debian/patches/core-in-fs.patch b/debian/patches/core-in-fs.patch
1976index 1ba3b4b..b8e13d3 100644
1977--- a/debian/patches/core-in-fs.patch
1978+++ b/debian/patches/core-in-fs.patch
1979@@ -11,7 +11,7 @@ Patch-Name: core-in-fs.patch
1980 1 file changed, 8 insertions(+)
1981
1982 diff --git a/util/setup.c b/util/setup.c
1983-index 6f88f3cc4..fbdf2fcc5 100644
1984+index 6f88f3cc43..fbdf2fcc59 100644
1985 --- a/util/setup.c
1986 +++ b/util/setup.c
1987 @@ -58,6 +58,8 @@
1988diff --git a/debian/patches/default-grub-d.patch b/debian/patches/default-grub-d.patch
1989index c7d8119..cf024d6 100644
1990--- a/debian/patches/default-grub-d.patch
1991+++ b/debian/patches/default-grub-d.patch
1992@@ -14,7 +14,7 @@ Patch-Name: default-grub-d.patch
1993 2 files changed, 98 insertions(+), 21 deletions(-)
1994
1995 diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
1996-index 65effa9f3..5478030fd 100644
1997+index 65effa9f3a..5478030fde 100644
1998 --- a/grub-core/osdep/unix/config.c
1999 +++ b/grub-core/osdep/unix/config.c
2000 @@ -24,6 +24,8 @@
2001@@ -178,7 +178,7 @@ index 65effa9f3..5478030fd 100644
2002 + free (cfgdir);
2003 }
2004 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2005-index b506d63bf..d18bf972f 100644
2006+index b506d63bf9..d18bf972f7 100644
2007 --- a/util/grub-mkconfig.in
2008 +++ b/util/grub-mkconfig.in
2009 @@ -164,6 +164,11 @@ fi
2010diff --git a/debian/patches/disable-floppies.patch b/debian/patches/disable-floppies.patch
2011index 7d4835e..981b9ec 100644
2012--- a/debian/patches/disable-floppies.patch
2013+++ b/debian/patches/disable-floppies.patch
2014@@ -13,7 +13,7 @@ Patch-Name: disable-floppies.patch
2015 1 file changed, 12 insertions(+)
2016
2017 diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
2018-index e9ec680cd..8ac523953 100644
2019+index e9ec680cdb..8ac5239538 100644
2020 --- a/grub-core/kern/emu/hostdisk.c
2021 +++ b/grub-core/kern/emu/hostdisk.c
2022 @@ -532,6 +532,18 @@ read_device_map (const char *dev_map)
2023diff --git a/debian/patches/dpkg-version-comparison.patch b/debian/patches/dpkg-version-comparison.patch
2024index 86e5c7e..929070f 100644
2025--- a/debian/patches/dpkg-version-comparison.patch
2026+++ b/debian/patches/dpkg-version-comparison.patch
2027@@ -12,7 +12,7 @@ Patch-Name: dpkg-version-comparison.patch
2028 1 file changed, 4 insertions(+), 3 deletions(-)
2029
2030 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
2031-index 0f801cab3..b6606c16e 100644
2032+index 0f801cab3e..b6606c16e0 100644
2033 --- a/util/grub-mkconfig_lib.in
2034 +++ b/util/grub-mkconfig_lib.in
2035 @@ -239,8 +239,9 @@ version_test_numeric ()
2036diff --git a/debian/patches/efi-variable-storage-minimise-writes.patch b/debian/patches/efi-variable-storage-minimise-writes.patch
2037index 399e8a2..44ac1ae 100644
2038--- a/debian/patches/efi-variable-storage-minimise-writes.patch
2039+++ b/debian/patches/efi-variable-storage-minimise-writes.patch
2040@@ -60,7 +60,7 @@ Patch-Name: efi-variable-storage-minimise-writes.patch
2041 create mode 100644 grub-core/osdep/unix/efivar.c
2042
2043 diff --git a/INSTALL b/INSTALL
2044-index 8acb40902..342c158e9 100644
2045+index 8acb409023..342c158e91 100644
2046 --- a/INSTALL
2047 +++ b/INSTALL
2048 @@ -41,6 +41,11 @@ configuring the GRUB.
2049@@ -76,7 +76,7 @@ index 8acb40902..342c158e9 100644
2050
2051 * libdevmapper 1.02.34 or later (recommended)
2052 diff --git a/Makefile.util.def b/Makefile.util.def
2053-index ce133e694..504d1c058 100644
2054+index ce133e694e..504d1c0581 100644
2055 --- a/Makefile.util.def
2056 +++ b/Makefile.util.def
2057 @@ -565,6 +565,8 @@ program = {
2058@@ -180,7 +180,7 @@ index ce133e694..504d1c058 100644
2059
2060 script = {
2061 diff --git a/configure.ac b/configure.ac
2062-index e382c7480..883245553 100644
2063+index e382c7480d..883245553d 100644
2064 --- a/configure.ac
2065 +++ b/configure.ac
2066 @@ -443,6 +443,18 @@ AC_CHECK_HEADER([util.h], [
2067@@ -204,7 +204,7 @@ index e382c7480..883245553 100644
2068 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
2069 diff --git a/grub-core/osdep/efivar.c b/grub-core/osdep/efivar.c
2070 new file mode 100644
2071-index 000000000..d2750e252
2072+index 0000000000..d2750e2524
2073 --- /dev/null
2074 +++ b/grub-core/osdep/efivar.c
2075 @@ -0,0 +1,3 @@
2076@@ -213,7 +213,7 @@ index 000000000..d2750e252
2077 +#endif
2078 diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c
2079 new file mode 100644
2080-index 000000000..4a58328b4
2081+index 0000000000..4a58328b42
2082 --- /dev/null
2083 +++ b/grub-core/osdep/unix/efivar.c
2084 @@ -0,0 +1,508 @@
2085@@ -726,7 +726,7 @@ index 000000000..4a58328b4
2086 +
2087 +#endif /* HAVE_EFIVAR */
2088 diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
2089-index 9c439326a..b561174ea 100644
2090+index 9c439326a0..b561174ea9 100644
2091 --- a/grub-core/osdep/unix/platform.c
2092 +++ b/grub-core/osdep/unix/platform.c
2093 @@ -19,15 +19,12 @@
2094@@ -856,7 +856,7 @@ index 9c439326a..b561174ea 100644
2095
2096 void
2097 diff --git a/include/grub/util/install.h b/include/grub/util/install.h
2098-index 8aeb5c4f2..a521f1663 100644
2099+index 8aeb5c4f20..a521f1663f 100644
2100 --- a/include/grub/util/install.h
2101 +++ b/include/grub/util/install.h
2102 @@ -219,6 +219,11 @@ grub_install_get_default_x86_platform (void);
2103@@ -872,7 +872,7 @@ index 8aeb5c4f2..a521f1663 100644
2104 grub_install_register_efi (grub_device_t efidir_grub_dev,
2105 const char *efifile_path,
2106 diff --git a/util/grub-install.c b/util/grub-install.c
2107-index 4bad8de61..63462e4e0 100644
2108+index 4bad8de612..63462e4e09 100644
2109 --- a/util/grub-install.c
2110 +++ b/util/grub-install.c
2111 @@ -2084,7 +2084,7 @@ main (int argc, char *argv[])
2112diff --git a/debian/patches/efinet-set-dns-from-uefi-proto.patch b/debian/patches/efinet-set-dns-from-uefi-proto.patch
2113index c120841..fdf062b 100644
2114--- a/debian/patches/efinet-set-dns-from-uefi-proto.patch
2115+++ b/debian/patches/efinet-set-dns-from-uefi-proto.patch
2116@@ -35,7 +35,7 @@ Patch-Name: efinet-set-dns-from-uefi-proto.patch
2117 2 files changed, 239 insertions(+)
2118
2119 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
2120-index 2d3b00f0e..82a28fb6e 100644
2121+index 2d3b00f0e1..82a28fb6e9 100644
2122 --- a/grub-core/net/drivers/efi/efinet.c
2123 +++ b/grub-core/net/drivers/efi/efinet.c
2124 @@ -30,6 +30,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
2125@@ -244,7 +244,7 @@ index 2d3b00f0e..82a28fb6e 100644
2126 }
2127
2128 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
2129-index 664cea37b..75befd10e 100644
2130+index 664cea37b5..75befd10e5 100644
2131 --- a/include/grub/efi/api.h
2132 +++ b/include/grub/efi/api.h
2133 @@ -334,6 +334,16 @@
2134diff --git a/debian/patches/efinet-set-network-from-uefi-devpath.patch b/debian/patches/efinet-set-network-from-uefi-devpath.patch
2135index a9821ad..d0d2240 100644
2136--- a/debian/patches/efinet-set-network-from-uefi-devpath.patch
2137+++ b/debian/patches/efinet-set-network-from-uefi-devpath.patch
2138@@ -34,7 +34,7 @@ Patch-Name: efinet-set-network-from-uefi-devpath.patch
2139 2 files changed, 270 insertions(+), 9 deletions(-)
2140
2141 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
2142-index fc90415f2..2d3b00f0e 100644
2143+index fc90415f29..2d3b00f0e1 100644
2144 --- a/grub-core/net/drivers/efi/efinet.c
2145 +++ b/grub-core/net/drivers/efi/efinet.c
2146 @@ -23,6 +23,7 @@
2147@@ -358,7 +358,7 @@ index fc90415f2..2d3b00f0e 100644
2148 }
2149 }
2150 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
2151-index ca6cdc159..664cea37b 100644
2152+index ca6cdc1596..664cea37b5 100644
2153 --- a/include/grub/efi/api.h
2154 +++ b/include/grub/efi/api.h
2155 @@ -825,6 +825,8 @@ struct grub_efi_ipv4_device_path
2156diff --git a/debian/patches/efinet-uefi-ipv6-pxe-support.patch b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
2157index 3934638..d1f2c02 100644
2158--- a/debian/patches/efinet-uefi-ipv6-pxe-support.patch
2159+++ b/debian/patches/efinet-uefi-ipv6-pxe-support.patch
2160@@ -17,7 +17,7 @@ Patch-Name: efinet-uefi-ipv6-pxe-support.patch
2161 2 files changed, 73 insertions(+), 6 deletions(-)
2162
2163 diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
2164-index 5388f952b..fc90415f2 100644
2165+index 5388f952ba..fc90415f29 100644
2166 --- a/grub-core/net/drivers/efi/efinet.c
2167 +++ b/grub-core/net/drivers/efi/efinet.c
2168 @@ -378,11 +378,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
2169@@ -52,7 +52,7 @@ index 5388f952b..fc90415f2 100644
2170 }
2171 }
2172 diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
2173-index addcbfa8f..ca6cdc159 100644
2174+index addcbfa8fb..ca6cdc1596 100644
2175 --- a/include/grub/efi/api.h
2176 +++ b/include/grub/efi/api.h
2177 @@ -1452,14 +1452,67 @@ typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output
2178diff --git a/debian/patches/gettext-quiet.patch b/debian/patches/gettext-quiet.patch
2179index 49f25d4..6e5d4c2 100644
2180--- a/debian/patches/gettext-quiet.patch
2181+++ b/debian/patches/gettext-quiet.patch
2182@@ -13,7 +13,7 @@ Patch-Name: gettext-quiet.patch
2183 1 file changed, 5 insertions(+)
2184
2185 diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
2186-index 4d02e62c1..2a19389f2 100644
2187+index 4d02e62c10..2a19389f2a 100644
2188 --- a/grub-core/gettext/gettext.c
2189 +++ b/grub-core/gettext/gettext.c
2190 @@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
2191diff --git a/debian/patches/gfxpayload-dynamic.patch b/debian/patches/gfxpayload-dynamic.patch
2192index 57a0c28..efdaa14 100644
2193--- a/debian/patches/gfxpayload-dynamic.patch
2194+++ b/debian/patches/gfxpayload-dynamic.patch
2195@@ -23,7 +23,7 @@ Patch-Name: gfxpayload-dynamic.patch
2196 create mode 100644 grub-core/commands/i386/pc/hwmatch.c
2197
2198 diff --git a/configure.ac b/configure.ac
2199-index 7dda5bb32..dbc429ce0 100644
2200+index 7dda5bb32b..dbc429ce0a 100644
2201 --- a/configure.ac
2202 +++ b/configure.ac
2203 @@ -1879,6 +1879,17 @@ else
2204@@ -45,7 +45,7 @@ index 7dda5bb32..dbc429ce0 100644
2205
2206 AC_SUBST([FONT_SOURCE])
2207 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
2208-index 474a63e68..aadb4cdff 100644
2209+index 474a63e68c..aadb4cdff8 100644
2210 --- a/grub-core/Makefile.core.def
2211 +++ b/grub-core/Makefile.core.def
2212 @@ -971,6 +971,14 @@ module = {
2213@@ -65,7 +65,7 @@ index 474a63e68..aadb4cdff 100644
2214 common = commands/keystatus.c;
2215 diff --git a/grub-core/commands/i386/pc/hwmatch.c b/grub-core/commands/i386/pc/hwmatch.c
2216 new file mode 100644
2217-index 000000000..6de07cecc
2218+index 0000000000..6de07cecc8
2219 --- /dev/null
2220 +++ b/grub-core/commands/i386/pc/hwmatch.c
2221 @@ -0,0 +1,146 @@
2222@@ -216,7 +216,7 @@ index 000000000..6de07cecc
2223 + grub_unregister_command (cmd);
2224 +}
2225 diff --git a/include/grub/file.h b/include/grub/file.h
2226-index 31567483c..e3c4cae2b 100644
2227+index 31567483cc..e3c4cae2b5 100644
2228 --- a/include/grub/file.h
2229 +++ b/include/grub/file.h
2230 @@ -122,6 +122,7 @@ enum grub_file_type
2231@@ -228,7 +228,7 @@ index 31567483c..e3c4cae2b 100644
2232 GRUB_FILE_TYPE_LOADENV,
2233 GRUB_FILE_TYPE_SAVEENV,
2234 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2235-index 2be66c702..09393c28e 100644
2236+index 2be66c7028..09393c28ee 100644
2237 --- a/util/grub.d/10_linux.in
2238 +++ b/util/grub.d/10_linux.in
2239 @@ -23,6 +23,7 @@ datarootdir="@datarootdir@"
2240@@ -290,7 +290,7 @@ index 2be66c702..09393c28e 100644
2241 # yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
2242 submenu_indentation=""
2243 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2244-index ec4b49d9d..8cd7d1285 100755
2245+index ec4b49d9d7..8cd7d12851 100755
2246 --- a/util/grub.d/10_linux_zfs.in
2247 +++ b/util/grub.d/10_linux_zfs.in
2248 @@ -22,6 +22,7 @@ datarootdir="@datarootdir@"
2249diff --git a/debian/patches/gfxpayload-keep-default.patch b/debian/patches/gfxpayload-keep-default.patch
2250index d160ade..8f48114 100644
2251--- a/debian/patches/gfxpayload-keep-default.patch
2252+++ b/debian/patches/gfxpayload-keep-default.patch
2253@@ -24,7 +24,7 @@ Patch-Name: gfxpayload-keep-default.patch
2254 2 files changed, 8 deletions(-)
2255
2256 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2257-index a75096609..f839b3b55 100644
2258+index a75096609a..f839b3b55f 100644
2259 --- a/util/grub.d/10_linux.in
2260 +++ b/util/grub.d/10_linux.in
2261 @@ -118,10 +118,6 @@ linux_entry ()
2262@@ -39,7 +39,7 @@ index a75096609..f839b3b55 100644
2263 if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
2264 echo " load_video" | sed "s/^/$submenu_indentation/"
2265 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2266-index 5ec65fa94..b24587f0a 100755
2267+index 5ec65fa941..b24587f0a5 100755
2268 --- a/util/grub.d/10_linux_zfs.in
2269 +++ b/util/grub.d/10_linux_zfs.in
2270 @@ -744,10 +744,6 @@ zfs_linux_entry () {
2271diff --git a/debian/patches/grub-install-backup-and-restore.patch b/debian/patches/grub-install-backup-and-restore.patch
2272index 10b4ab0..cc76eac 100644
2273--- a/debian/patches/grub-install-backup-and-restore.patch
2274+++ b/debian/patches/grub-install-backup-and-restore.patch
2275@@ -28,7 +28,7 @@ Patch-Name: grub-install-backup-and-restore.patch
2276 2 files changed, 91 insertions(+), 16 deletions(-)
2277
2278 diff --git a/configure.ac b/configure.ac
2279-index 1819188f9..6a88b9b0c 100644
2280+index 1819188f9f..6a88b9b0c0 100644
2281 --- a/configure.ac
2282 +++ b/configure.ac
2283 @@ -420,7 +420,7 @@ else
2284@@ -41,7 +41,7 @@ index 1819188f9..6a88b9b0c 100644
2285
2286 # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
2287 diff --git a/util/grub-install-common.c b/util/grub-install-common.c
2288-index 447504d3f..61f9075bc 100644
2289+index 447504d3f4..61f9075bcc 100644
2290 --- a/util/grub-install-common.c
2291 +++ b/util/grub-install-common.c
2292 @@ -185,38 +185,113 @@ grub_install_mkdir_p (const char *dst)
2293diff --git a/debian/patches/grub-install-pvxen-paths.patch b/debian/patches/grub-install-pvxen-paths.patch
2294index 30cbc14..b1ca1c4 100644
2295--- a/debian/patches/grub-install-pvxen-paths.patch
2296+++ b/debian/patches/grub-install-pvxen-paths.patch
2297@@ -28,7 +28,7 @@ v2: Respect bootdir, create /boot/xen as needed.
2298 1 file changed, 22 insertions(+), 2 deletions(-)
2299
2300 diff --git a/util/grub-install.c b/util/grub-install.c
2301-index 70d6700de..64c292383 100644
2302+index 70d6700de8..64c292383f 100644
2303 --- a/util/grub-install.c
2304 +++ b/util/grub-install.c
2305 @@ -2058,6 +2058,28 @@ main (int argc, char *argv[])
2306diff --git a/debian/patches/grub-legacy-0-based-partitions.patch b/debian/patches/grub-legacy-0-based-partitions.patch
2307index 2039c3f..09439dc 100644
2308--- a/debian/patches/grub-legacy-0-based-partitions.patch
2309+++ b/debian/patches/grub-legacy-0-based-partitions.patch
2310@@ -13,7 +13,7 @@ Patch-Name: grub-legacy-0-based-partitions.patch
2311 1 file changed, 14 insertions(+)
2312
2313 diff --git a/util/getroot.c b/util/getroot.c
2314-index 847406fba..cdd41153c 100644
2315+index 847406fbab..cdd41153c5 100644
2316 --- a/util/getroot.c
2317 +++ b/util/getroot.c
2318 @@ -245,6 +245,20 @@ find_partition (grub_disk_t dsk __attribute__ ((unused)),
2319diff --git a/debian/patches/grub.cfg-400.patch b/debian/patches/grub.cfg-400.patch
2320index 1fee91a..4731767 100644
2321--- a/debian/patches/grub.cfg-400.patch
2322+++ b/debian/patches/grub.cfg-400.patch
2323@@ -9,7 +9,7 @@ Patch-Name: grub.cfg-400.patch
2324 1 file changed, 4 insertions(+)
2325
2326 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2327-index 9f477ff05..45cd4cc54 100644
2328+index 9f477ff054..45cd4cc541 100644
2329 --- a/util/grub-mkconfig.in
2330 +++ b/util/grub-mkconfig.in
2331 @@ -276,6 +276,10 @@ for i in "${grub_mkconfig_dir}"/* ; do
2332diff --git a/debian/patches/ieee1275-clear-reset.patch b/debian/patches/ieee1275-clear-reset.patch
2333index e6b08af..3d73e0c 100644
2334--- a/debian/patches/ieee1275-clear-reset.patch
2335+++ b/debian/patches/ieee1275-clear-reset.patch
2336@@ -18,7 +18,7 @@ Patch-Name: ieee1275-clear-reset.patch
2337 1 file changed, 1 insertion(+), 1 deletion(-)
2338
2339 diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
2340-index d317efa36..63892ad42 100644
2341+index d317efa368..63892ad427 100644
2342 --- a/grub-core/term/terminfo.c
2343 +++ b/grub-core/term/terminfo.c
2344 @@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
2345diff --git a/debian/patches/ignore-grub_func_test-failures.patch b/debian/patches/ignore-grub_func_test-failures.patch
2346index c8fa4ce..76734f6 100644
2347--- a/debian/patches/ignore-grub_func_test-failures.patch
2348+++ b/debian/patches/ignore-grub_func_test-failures.patch
2349@@ -14,7 +14,7 @@ Patch-Name: ignore-grub_func_test-failures.patch
2350 1 file changed, 3 insertions(+), 1 deletion(-)
2351
2352 diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in
2353-index c67f9e422..728cd6e06 100644
2354+index c67f9e4225..728cd6e066 100644
2355 --- a/tests/grub_func_test.in
2356 +++ b/tests/grub_func_test.in
2357 @@ -16,6 +16,8 @@ out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/b
2358diff --git a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
2359index b531a5c..6570f74 100644
2360--- a/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
2361+++ b/debian/patches/insmod-xzio-and-lzopio-on-xen.patch
2362@@ -21,7 +21,7 @@ Patch-Name: insmod-xzio-and-lzopio-on-xen.patch
2363 2 files changed, 2 insertions(+)
2364
2365 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2366-index 2c418c5ec..85b30084a 100644
2367+index 2c418c5ec8..85b30084ad 100644
2368 --- a/util/grub.d/10_linux.in
2369 +++ b/util/grub.d/10_linux.in
2370 @@ -166,6 +166,7 @@ linux_entry ()
2371@@ -33,7 +33,7 @@ index 2c418c5ec..85b30084a 100644
2372 if [ x$dirname = x/ ]; then
2373 if [ -z "${prepare_root_cache}" ]; then
2374 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2375-index 4477fa606..4c48abef0 100755
2376+index 4477fa6061..4c48abef01 100755
2377 --- a/util/grub.d/10_linux_zfs.in
2378 +++ b/util/grub.d/10_linux_zfs.in
2379 @@ -838,6 +838,7 @@ zfs_linux_entry () {
2380diff --git a/debian/patches/install-efi-fallback.patch b/debian/patches/install-efi-fallback.patch
2381index ff3451b..5a36b4e 100644
2382--- a/debian/patches/install-efi-fallback.patch
2383+++ b/debian/patches/install-efi-fallback.patch
2384@@ -19,7 +19,7 @@ Patch-Name: install-efi-fallback.patch
2385 1 file changed, 35 insertions(+), 5 deletions(-)
2386
2387 diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
2388-index e28a79dab..2e7f72086 100644
2389+index e28a79dab3..2e7f720869 100644
2390 --- a/grub-core/osdep/linux/platform.c
2391 +++ b/grub-core/osdep/linux/platform.c
2392 @@ -19,10 +19,12 @@
2393diff --git a/debian/patches/install-efi-ubuntu-flavours.patch b/debian/patches/install-efi-ubuntu-flavours.patch
2394index 597f3e2..1a6023c 100644
2395--- a/debian/patches/install-efi-ubuntu-flavours.patch
2396+++ b/debian/patches/install-efi-ubuntu-flavours.patch
2397@@ -17,7 +17,7 @@ Patch-Name: install-efi-ubuntu-flavours.patch
2398 1 file changed, 2 insertions(+)
2399
2400 diff --git a/util/grub-install.c b/util/grub-install.c
2401-index e1e40cf2b..f0d59c180 100644
2402+index e1e40cf2b5..f0d59c1809 100644
2403 --- a/util/grub-install.c
2404 +++ b/util/grub-install.c
2405 @@ -1115,6 +1115,8 @@ main (int argc, char *argv[])
2406diff --git a/debian/patches/install-locale-langpack.patch b/debian/patches/install-locale-langpack.patch
2407index 37b1b01..531fb38 100644
2408--- a/debian/patches/install-locale-langpack.patch
2409+++ b/debian/patches/install-locale-langpack.patch
2410@@ -13,7 +13,7 @@ Patch-Name: install-locale-langpack.patch
2411 1 file changed, 30 insertions(+), 7 deletions(-)
2412
2413 diff --git a/util/grub-install-common.c b/util/grub-install-common.c
2414-index ca0ac612a..fdfe2c7ea 100644
2415+index ca0ac612ac..fdfe2c7ead 100644
2416 --- a/util/grub-install-common.c
2417 +++ b/util/grub-install-common.c
2418 @@ -609,17 +609,25 @@ get_localedir (void)
2419diff --git a/debian/patches/install-powerpc-machtypes.patch b/debian/patches/install-powerpc-machtypes.patch
2420index 046b269..0bd6bcc 100644
2421--- a/debian/patches/install-powerpc-machtypes.patch
2422+++ b/debian/patches/install-powerpc-machtypes.patch
2423@@ -25,7 +25,7 @@ Patch-Name: install-powerpc-machtypes.patch
2424 6 files changed, 119 insertions(+), 6 deletions(-)
2425
2426 diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c
2427-index a7dafd85a..6c293ed2d 100644
2428+index a7dafd85a9..6c293ed2d0 100644
2429 --- a/grub-core/osdep/basic/platform.c
2430 +++ b/grub-core/osdep/basic/platform.c
2431 @@ -30,3 +30,8 @@ grub_install_get_default_x86_platform (void)
2432@@ -38,7 +38,7 @@ index a7dafd85a..6c293ed2d 100644
2433 + return "generic";
2434 +}
2435 diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
2436-index 2e7f72086..5b37366d4 100644
2437+index 2e7f720869..5b37366d4d 100644
2438 --- a/grub-core/osdep/linux/platform.c
2439 +++ b/grub-core/osdep/linux/platform.c
2440 @@ -24,6 +24,7 @@
2441@@ -125,7 +125,7 @@ index 2e7f72086..5b37366d4 100644
2442 + return machtype;
2443 +}
2444 diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
2445-index 55b8f4016..9c439326a 100644
2446+index 55b8f40162..9c439326a0 100644
2447 --- a/grub-core/osdep/unix/platform.c
2448 +++ b/grub-core/osdep/unix/platform.c
2449 @@ -218,13 +218,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
2450@@ -165,7 +165,7 @@ index 55b8f4016..9c439326a 100644
2451
2452 free (boot_device);
2453 diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
2454-index 7eb53fe01..e19a3d9a8 100644
2455+index 7eb53fe01b..e19a3d9a8a 100644
2456 --- a/grub-core/osdep/windows/platform.c
2457 +++ b/grub-core/osdep/windows/platform.c
2458 @@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void)
2459@@ -182,7 +182,7 @@ index 7eb53fe01..e19a3d9a8 100644
2460 get_efi_variable (const wchar_t *varname, ssize_t *len)
2461 {
2462 diff --git a/include/grub/util/install.h b/include/grub/util/install.h
2463-index 2631b1074..8aeb5c4f2 100644
2464+index 2631b10745..8aeb5c4f20 100644
2465 --- a/include/grub/util/install.h
2466 +++ b/include/grub/util/install.h
2467 @@ -216,6 +216,9 @@ grub_install_get_default_arm_platform (void);
2468@@ -196,7 +196,7 @@ index 2631b1074..8aeb5c4f2 100644
2469 grub_install_register_efi (grub_device_t efidir_grub_dev,
2470 const char *efifile_path,
2471 diff --git a/util/grub-install.c b/util/grub-install.c
2472-index f0d59c180..70d6700de 100644
2473+index f0d59c1809..70d6700de8 100644
2474 --- a/util/grub-install.c
2475 +++ b/util/grub-install.c
2476 @@ -1177,7 +1177,18 @@ main (int argc, char *argv[])
2477diff --git a/debian/patches/install-stage2-confusion.patch b/debian/patches/install-stage2-confusion.patch
2478index ba2443b..fafe60f 100644
2479--- a/debian/patches/install-stage2-confusion.patch
2480+++ b/debian/patches/install-stage2-confusion.patch
2481@@ -13,7 +13,7 @@ Patch-Name: install-stage2-confusion.patch
2482 1 file changed, 14 insertions(+)
2483
2484 diff --git a/util/grub-install.c b/util/grub-install.c
2485-index 8a55ad4b8..3b4606eef 100644
2486+index 8a55ad4b8d..3b4606eef1 100644
2487 --- a/util/grub-install.c
2488 +++ b/util/grub-install.c
2489 @@ -42,6 +42,7 @@
2490diff --git a/debian/patches/maybe-quiet.patch b/debian/patches/maybe-quiet.patch
2491index 30c02df..da80c4b 100644
2492--- a/debian/patches/maybe-quiet.patch
2493+++ b/debian/patches/maybe-quiet.patch
2494@@ -47,7 +47,7 @@ Patch-Name: maybe-quiet.patch
2495 10 files changed, 118 insertions(+), 8 deletions(-)
2496
2497 diff --git a/config.h.in b/config.h.in
2498-index 9e8f9911b..d2c4ce8e5 100644
2499+index 9e8f9911b1..d2c4ce8e51 100644
2500 --- a/config.h.in
2501 +++ b/config.h.in
2502 @@ -12,6 +12,8 @@
2503@@ -60,7 +60,7 @@ index 9e8f9911b..d2c4ce8e5 100644
2504 /* We don't need those. */
2505 #define MINILZO_CFG_SKIP_LZO_PTR 1
2506 diff --git a/configure.ac b/configure.ac
2507-index 1e5abc67d..ea00ccd69 100644
2508+index 1e5abc67d9..ea00ccd691 100644
2509 --- a/configure.ac
2510 +++ b/configure.ac
2511 @@ -1857,6 +1857,17 @@ else
2512@@ -93,7 +93,7 @@ index 1e5abc67d..ea00ccd69 100644
2513 echo "*******************************************************"
2514 ]
2515 diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
2516-index 2bd0b2d28..b0c0f2225 100644
2517+index 2bd0b2d286..b0c0f2225e 100644
2518 --- a/grub-core/boot/i386/pc/boot.S
2519 +++ b/grub-core/boot/i386/pc/boot.S
2520 @@ -19,6 +19,9 @@
2521@@ -125,7 +125,7 @@ index 2bd0b2d28..b0c0f2225 100644
2522 movw $disk_address_packet, %si
2523
2524 diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
2525-index c1addc0df..9b6d7a7ed 100644
2526+index c1addc0df2..9b6d7a7edc 100644
2527 --- a/grub-core/boot/i386/pc/diskboot.S
2528 +++ b/grub-core/boot/i386/pc/diskboot.S
2529 @@ -18,6 +18,9 @@
2530@@ -205,7 +205,7 @@ index c1addc0df..9b6d7a7ed 100644
2531
2532 notification_step: .asciz "."
2533 diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
2534-index 9cad0c448..714b63d67 100644
2535+index 9cad0c4485..714b63d674 100644
2536 --- a/grub-core/kern/main.c
2537 +++ b/grub-core/kern/main.c
2538 @@ -264,15 +264,25 @@ reclaim_module_space (void)
2539@@ -248,7 +248,7 @@ index 9cad0c448..714b63d67 100644
2540 grub_rescue_run ();
2541 }
2542 diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c
2543-index dcd7d4439..a93524eab 100644
2544+index dcd7d44397..a93524eabb 100644
2545 --- a/grub-core/kern/rescue_reader.c
2546 +++ b/grub-core/kern/rescue_reader.c
2547 @@ -78,7 +78,9 @@ grub_rescue_read_line (char **line, int cont,
2548@@ -262,7 +262,7 @@ index dcd7d4439..a93524eab 100644
2549 while (1)
2550 {
2551 diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
2552-index 1b03dfd57..0aa389fa1 100644
2553+index 1b03dfd57b..0aa389fa16 100644
2554 --- a/grub-core/normal/main.c
2555 +++ b/grub-core/normal/main.c
2556 @@ -389,6 +389,15 @@ static grub_err_t
2557@@ -292,7 +292,7 @@ index 1b03dfd57..0aa389fa1 100644
2558 while (1)
2559 {
2560 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
2561-index 3611ee9ea..ebf5a0f10 100644
2562+index 3611ee9ea7..ebf5a0f109 100644
2563 --- a/grub-core/normal/menu.c
2564 +++ b/grub-core/normal/menu.c
2565 @@ -827,12 +827,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
2566@@ -339,7 +339,7 @@ index 3611ee9ea..ebf5a0f10 100644
2567 if (auto_boot)
2568 grub_menu_execute_with_fallback (menu, e, autobooted,
2569 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2570-index cb1cc200e..479a8bf4e 100644
2571+index cb1cc200e4..479a8bf4e5 100644
2572 --- a/util/grub.d/10_linux.in
2573 +++ b/util/grub.d/10_linux.in
2574 @@ -21,6 +21,7 @@ prefix="@prefix@"
2575@@ -386,7 +386,7 @@ index cb1cc200e..479a8bf4e 100644
2576 EOF
2577 fi
2578 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2579-index bd4f1a212..3a0e6d103 100755
2580+index bd4f1a2123..3a0e6d1035 100755
2581 --- a/util/grub.d/10_linux_zfs.in
2582 +++ b/util/grub.d/10_linux_zfs.in
2583 @@ -20,6 +20,7 @@ set -e
2584diff --git a/debian/patches/mkconfig-loopback.patch b/debian/patches/mkconfig-loopback.patch
2585index 5833697..ce4465d 100644
2586--- a/debian/patches/mkconfig-loopback.patch
2587+++ b/debian/patches/mkconfig-loopback.patch
2588@@ -21,7 +21,7 @@ Patch-Name: mkconfig-loopback.patch
2589 3 files changed, 34 insertions(+)
2590
2591 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
2592-index b6606c16e..b05df554d 100644
2593+index b6606c16e0..b05df554da 100644
2594 --- a/util/grub-mkconfig_lib.in
2595 +++ b/util/grub-mkconfig_lib.in
2596 @@ -133,6 +133,22 @@ prepare_grub_to_access_device ()
2597@@ -63,7 +63,7 @@ index b6606c16e..b05df554d 100644
2598
2599 grub_get_device_id ()
2600 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2601-index f839b3b55..d927b60ae 100644
2602+index f839b3b55f..d927b60ae2 100644
2603 --- a/util/grub.d/10_linux.in
2604 +++ b/util/grub.d/10_linux.in
2605 @@ -40,6 +40,11 @@ fi
2606@@ -79,7 +79,7 @@ index f839b3b55..d927b60ae 100644
2607 esac
2608
2609 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
2610-index 96179ea61..9a8d42fb5 100644
2611+index 96179ea613..9a8d42fb57 100644
2612 --- a/util/grub.d/20_linux_xen.in
2613 +++ b/util/grub.d/20_linux_xen.in
2614 @@ -40,6 +40,11 @@ fi
2615diff --git a/debian/patches/mkconfig-mid-upgrade.patch b/debian/patches/mkconfig-mid-upgrade.patch
2616index ebb7e9b..c033bba 100644
2617--- a/debian/patches/mkconfig-mid-upgrade.patch
2618+++ b/debian/patches/mkconfig-mid-upgrade.patch
2619@@ -20,7 +20,7 @@ Patch-Name: mkconfig-mid-upgrade.patch
2620 1 file changed, 7 insertions(+)
2621
2622 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2623-index 45cd4cc54..b506d63bf 100644
2624+index 45cd4cc541..b506d63bf9 100644
2625 --- a/util/grub-mkconfig.in
2626 +++ b/util/grub-mkconfig.in
2627 @@ -102,6 +102,13 @@ do
2628diff --git a/debian/patches/mkconfig-nonexistent-loopback.patch b/debian/patches/mkconfig-nonexistent-loopback.patch
2629index babde9b..9ff8309 100644
2630--- a/debian/patches/mkconfig-nonexistent-loopback.patch
2631+++ b/debian/patches/mkconfig-nonexistent-loopback.patch
2632@@ -14,7 +14,7 @@ Patch-Name: mkconfig-nonexistent-loopback.patch
2633 2 files changed, 6 insertions(+), 5 deletions(-)
2634
2635 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
2636-index b05df554d..fe6319abe 100644
2637+index b05df554da..fe6319abe0 100644
2638 --- a/util/grub-mkconfig_lib.in
2639 +++ b/util/grub-mkconfig_lib.in
2640 @@ -143,7 +143,7 @@ prepare_grub_to_access_device ()
2641@@ -27,7 +27,7 @@ index b05df554d..fe6319abe 100644
2642 esac
2643 ;;
2644 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
2645-index 775ceb2e0..b7e1147c4 100644
2646+index 775ceb2e04..b7e1147c41 100644
2647 --- a/util/grub.d/30_os-prober.in
2648 +++ b/util/grub.d/30_os-prober.in
2649 @@ -219,6 +219,11 @@ EOF
2650diff --git a/debian/patches/mkconfig-other-inits.patch b/debian/patches/mkconfig-other-inits.patch
2651index f96bc18..4b504fb 100644
2652--- a/debian/patches/mkconfig-other-inits.patch
2653+++ b/debian/patches/mkconfig-other-inits.patch
2654@@ -18,7 +18,7 @@ Patch-Name: mkconfig-other-inits.patch
2655 2 files changed, 21 insertions(+)
2656
2657 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2658-index 85b30084a..dff84edea 100644
2659+index 85b30084ad..dff84edea5 100644
2660 --- a/util/grub.d/10_linux.in
2661 +++ b/util/grub.d/10_linux.in
2662 @@ -32,6 +32,7 @@ export TEXTDOMAIN=@PACKAGE@
2663@@ -53,7 +53,7 @@ index 85b30084a..dff84edea 100644
2664 linux_entry "${OS}" "${version}" recovery \
2665 "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
2666 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
2667-index f2ee0532b..81e5f0d7e 100644
2668+index f2ee0532bd..81e5f0d7e4 100644
2669 --- a/util/grub.d/20_linux_xen.in
2670 +++ b/util/grub.d/20_linux_xen.in
2671 @@ -27,6 +27,7 @@ export TEXTDOMAIN=@PACKAGE@
2672diff --git a/debian/patches/mkconfig-recovery-title.patch b/debian/patches/mkconfig-recovery-title.patch
2673index 7924342..c398318 100644
2674--- a/debian/patches/mkconfig-recovery-title.patch
2675+++ b/debian/patches/mkconfig-recovery-title.patch
2676@@ -22,7 +22,7 @@ Patch-Name: mkconfig-recovery-title.patch
2677 8 files changed, 21 insertions(+), 11 deletions(-)
2678
2679 diff --git a/docs/grub.texi b/docs/grub.texi
2680-index a835d0ae4..3ec35d315 100644
2681+index a835d0ae42..3ec35d315a 100644
2682 --- a/docs/grub.texi
2683 +++ b/docs/grub.texi
2684 @@ -1536,6 +1536,11 @@ a console is restricted or limited.
2685@@ -38,7 +38,7 @@ index a835d0ae4..3ec35d315 100644
2686
2687 The following options are still accepted for compatibility with existing
2688 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
2689-index 307214310..9c1da6477 100644
2690+index 3072143105..9c1da64771 100644
2691 --- a/util/grub-mkconfig.in
2692 +++ b/util/grub-mkconfig.in
2693 @@ -196,6 +196,10 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
2694@@ -63,7 +63,7 @@ index 307214310..9c1da6477 100644
2695 if test "x${grub_cfg}" != "x"; then
2696 rm -f "${grub_cfg}.new"
2697 diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
2698-index 59a9a48a2..7fa3a3fbd 100644
2699+index 59a9a48a2f..7fa3a3fbd8 100644
2700 --- a/util/grub.d/10_hurd.in
2701 +++ b/util/grub.d/10_hurd.in
2702 @@ -88,8 +88,8 @@ hurd_entry () {
2703@@ -78,7 +78,7 @@ index 59a9a48a2..7fa3a3fbd 100644
2704 title="$(gettext_printf "%s, with Hurd %s" "${OS}" "${kernel_base}")"
2705 oldtitle="$OS using $kernel_base"
2706 diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
2707-index 9d8e8fd85..8301d361a 100644
2708+index 9d8e8fd852..8301d361a1 100644
2709 --- a/util/grub.d/10_kfreebsd.in
2710 +++ b/util/grub.d/10_kfreebsd.in
2711 @@ -76,7 +76,7 @@ kfreebsd_entry ()
2712@@ -91,7 +91,7 @@ index 9d8e8fd85..8301d361a 100644
2713 title="$(gettext_printf "%s, with kFreeBSD %s" "${os}" "${version}")"
2714 fi
2715 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2716-index cc2dd855a..2c418c5ec 100644
2717+index cc2dd855ab..2c418c5ec8 100644
2718 --- a/util/grub.d/10_linux.in
2719 +++ b/util/grub.d/10_linux.in
2720 @@ -130,7 +130,7 @@ linux_entry ()
2721@@ -104,7 +104,7 @@ index cc2dd855a..2c418c5ec 100644
2722 title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
2723 esac
2724 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2725-index 48a4e6897..4477fa606 100755
2726+index 48a4e68976..4477fa6061 100755
2727 --- a/util/grub.d/10_linux_zfs.in
2728 +++ b/util/grub.d/10_linux_zfs.in
2729 @@ -957,7 +957,7 @@ generate_grub_menu() {
2730@@ -138,7 +138,7 @@ index 48a4e6897..4477fa606 100755
2731 fi
2732
2733 diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
2734-index 874f59969..bb29cc046 100644
2735+index 874f59969e..bb29cc0468 100644
2736 --- a/util/grub.d/10_netbsd.in
2737 +++ b/util/grub.d/10_netbsd.in
2738 @@ -102,7 +102,7 @@ netbsd_entry ()
2739@@ -151,7 +151,7 @@ index 874f59969..bb29cc046 100644
2740 title="$(gettext_printf "%s, with kernel %s (via %s)" "${OS}" "$(echo ${kernel} | sed -e 's,^.*/,,')" "${loader}")"
2741 fi
2742 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
2743-index 9a8d42fb5..f2ee0532b 100644
2744+index 9a8d42fb57..f2ee0532bd 100644
2745 --- a/util/grub.d/20_linux_xen.in
2746 +++ b/util/grub.d/20_linux_xen.in
2747 @@ -105,7 +105,7 @@ linux_entry ()
2748diff --git a/debian/patches/mkconfig-signed-kernel.patch b/debian/patches/mkconfig-signed-kernel.patch
2749index 8f118a4..79ae0da 100644
2750--- a/debian/patches/mkconfig-signed-kernel.patch
2751+++ b/debian/patches/mkconfig-signed-kernel.patch
2752@@ -13,7 +13,7 @@ Patch-Name: mkconfig-signed-kernel.patch
2753 2 files changed, 36 insertions(+)
2754
2755 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2756-index 19e4df4ad..cb1cc200e 100644
2757+index 19e4df4ad8..cb1cc200e4 100644
2758 --- a/util/grub.d/10_linux.in
2759 +++ b/util/grub.d/10_linux.in
2760 @@ -165,8 +165,16 @@ linux_entry ()
2761@@ -48,7 +48,7 @@ index 19e4df4ad..cb1cc200e 100644
2762 basename=`basename $linux`
2763 dirname=`dirname $linux`
2764 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2765-index 7f88e771e..bd4f1a212 100755
2766+index 7f88e771e0..bd4f1a2123 100755
2767 --- a/util/grub.d/10_linux_zfs.in
2768 +++ b/util/grub.d/10_linux_zfs.in
2769 @@ -339,6 +339,16 @@ try_default_layout_bpool() {
2770diff --git a/debian/patches/mkconfig-ubuntu-distributor.patch b/debian/patches/mkconfig-ubuntu-distributor.patch
2771index 3b21188..d1e2f67 100644
2772--- a/debian/patches/mkconfig-ubuntu-distributor.patch
2773+++ b/debian/patches/mkconfig-ubuntu-distributor.patch
2774@@ -17,7 +17,7 @@ Patch-Name: mkconfig-ubuntu-distributor.patch
2775 2 files changed, 16 insertions(+), 2 deletions(-)
2776
2777 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2778-index fcd303387..19e4df4ad 100644
2779+index fcd3033872..19e4df4ad8 100644
2780 --- a/util/grub.d/10_linux.in
2781 +++ b/util/grub.d/10_linux.in
2782 @@ -32,7 +32,14 @@ CLASS="--class gnu-linux --class gnu --class os"
2783@@ -37,7 +37,7 @@ index fcd303387..19e4df4ad 100644
2784 fi
2785
2786 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2787-index de4d21590..7f88e771e 100755
2788+index de4d215900..7f88e771e0 100755
2789 --- a/util/grub.d/10_linux_zfs.in
2790 +++ b/util/grub.d/10_linux_zfs.in
2791 @@ -790,7 +790,14 @@ generate_grub_menu() {
2792diff --git a/debian/patches/mkconfig-ubuntu-recovery.patch b/debian/patches/mkconfig-ubuntu-recovery.patch
2793index 45a0563..097df91 100644
2794--- a/debian/patches/mkconfig-ubuntu-recovery.patch
2795+++ b/debian/patches/mkconfig-ubuntu-recovery.patch
2796@@ -24,7 +24,7 @@ Patch-Name: mkconfig-ubuntu-recovery.patch
2797 4 files changed, 39 insertions(+), 5 deletions(-)
2798
2799 diff --git a/configure.ac b/configure.ac
2800-index 7656f2434..1e5abc67d 100644
2801+index 7656f2434e..1e5abc67d9 100644
2802 --- a/configure.ac
2803 +++ b/configure.ac
2804 @@ -1846,6 +1846,17 @@ fi
2805@@ -46,7 +46,7 @@ index 7656f2434..1e5abc67d 100644
2806
2807 AC_SUBST([FONT_SOURCE])
2808 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
2809-index d927b60ae..fcd303387 100644
2810+index d927b60ae2..fcd3033872 100644
2811 --- a/util/grub.d/10_linux.in
2812 +++ b/util/grub.d/10_linux.in
2813 @@ -20,6 +20,7 @@ set -e
2814@@ -94,7 +94,7 @@ index d927b60ae..fcd303387 100644
2815
2816 list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
2817 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
2818-index b24587f0a..de4d21590 100755
2819+index b24587f0a5..de4d215900 100755
2820 --- a/util/grub.d/10_linux_zfs.in
2821 +++ b/util/grub.d/10_linux_zfs.in
2822 @@ -19,6 +19,7 @@ set -e
2823@@ -141,7 +141,7 @@ index b24587f0a..de4d21590 100755
2824 # IFS is set to TAB (ASCII 0x09)
2825 echo "${menu_metadata}" |
2826 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
2827-index 515a68c7a..775ceb2e0 100644
2828+index 515a68c7aa..775ceb2e04 100644
2829 --- a/util/grub.d/30_os-prober.in
2830 +++ b/util/grub.d/30_os-prober.in
2831 @@ -220,7 +220,7 @@ EOF
2832diff --git a/debian/patches/mkrescue-efi-modules.patch b/debian/patches/mkrescue-efi-modules.patch
2833index 624c96f..54d15e4 100644
2834--- a/debian/patches/mkrescue-efi-modules.patch
2835+++ b/debian/patches/mkrescue-efi-modules.patch
2836@@ -14,7 +14,7 @@ Patch-Name: mkrescue-efi-modules.patch
2837 1 file changed, 2 insertions(+)
2838
2839 diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
2840-index ce2cbc4f1..45d6140d3 100644
2841+index ce2cbc4f10..45d6140d3e 100644
2842 --- a/util/grub-mkrescue.c
2843 +++ b/util/grub-mkrescue.c
2844 @@ -750,6 +750,7 @@ main (int argc, char *argv[])
2845diff --git a/debian/patches/net-read-bracketed-ipv6-addr.patch b/debian/patches/net-read-bracketed-ipv6-addr.patch
2846index 20a0dd1..76e97c9 100644
2847--- a/debian/patches/net-read-bracketed-ipv6-addr.patch
2848+++ b/debian/patches/net-read-bracketed-ipv6-addr.patch
2849@@ -16,7 +16,7 @@ Patch-Name: net-read-bracketed-ipv6-addr.patch
2850 4 files changed, 110 insertions(+), 11 deletions(-)
2851
2852 diff --git a/grub-core/net/http.c b/grub-core/net/http.c
2853-index 5aa4ad3be..f182d7b87 100644
2854+index 5aa4ad3bef..f182d7b871 100644
2855 --- a/grub-core/net/http.c
2856 +++ b/grub-core/net/http.c
2857 @@ -312,12 +312,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
2858@@ -74,7 +74,7 @@ index 5aa4ad3be..f182d7b87 100644
2859 file);
2860 if (!data->sock)
2861 diff --git a/grub-core/net/net.c b/grub-core/net/net.c
2862-index d5d726a31..b917a75d5 100644
2863+index d5d726a315..b917a75d54 100644
2864 --- a/grub-core/net/net.c
2865 +++ b/grub-core/net/net.c
2866 @@ -437,6 +437,12 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)
2867@@ -211,7 +211,7 @@ index d5d726a31..b917a75d5 100644
2868 }
2869 }
2870 diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
2871-index 7d90bf66e..a0817a075 100644
2872+index 7d90bf66e7..a0817a075d 100644
2873 --- a/grub-core/net/tftp.c
2874 +++ b/grub-core/net/tftp.c
2875 @@ -314,6 +314,7 @@ tftp_open (struct grub_file *file, const char *filename)
2876@@ -241,7 +241,7 @@ index 7d90bf66e..a0817a075 100644
2877 if (!data->sock)
2878 {
2879 diff --git a/include/grub/net.h b/include/grub/net.h
2880-index 4a9069a14..cc114286e 100644
2881+index 4a9069a147..cc114286ea 100644
2882 --- a/include/grub/net.h
2883 +++ b/include/grub/net.h
2884 @@ -270,6 +270,7 @@ typedef struct grub_net
2885diff --git a/debian/patches/no-devicetree-if-secure-boot.patch b/debian/patches/no-devicetree-if-secure-boot.patch
2886index b75f1eb..c56d2e3 100644
2887--- a/debian/patches/no-devicetree-if-secure-boot.patch
2888+++ b/debian/patches/no-devicetree-if-secure-boot.patch
2889@@ -17,7 +17,7 @@ Patch-Name: no-devicetree-if-secure-boot.patch
2890 2 files changed, 20 insertions(+)
2891
2892 diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
2893-index 51684914c..092e8e307 100644
2894+index 51684914cf..092e8e3077 100644
2895 --- a/grub-core/loader/arm/linux.c
2896 +++ b/grub-core/loader/arm/linux.c
2897 @@ -30,6 +30,10 @@
2898@@ -47,7 +47,7 @@ index 51684914c..092e8e307 100644
2899 if (!dtb)
2900 return grub_errno;
2901 diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
2902-index ee9c5592c..f0c2d91be 100644
2903+index ee9c5592c7..f0c2d91be2 100644
2904 --- a/grub-core/loader/efi/fdt.c
2905 +++ b/grub-core/loader/efi/fdt.c
2906 @@ -123,6 +123,14 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
2907diff --git a/debian/patches/no-insmod-on-sb.patch b/debian/patches/no-insmod-on-sb.patch
2908index b2800ef..5ed0187 100644
2909--- a/debian/patches/no-insmod-on-sb.patch
2910+++ b/debian/patches/no-insmod-on-sb.patch
2911@@ -16,7 +16,7 @@ Patch-Name: no-insmod-on-sb.patch
2912 3 files changed, 42 insertions(+)
2913
2914 diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
2915-index 48eb5e7b6..074dfc3c6 100644
2916+index 48eb5e7b62..074dfc3c6f 100644
2917 --- a/grub-core/kern/dl.c
2918 +++ b/grub-core/kern/dl.c
2919 @@ -38,6 +38,10 @@
2920@@ -47,7 +47,7 @@ index 48eb5e7b6..074dfc3c6 100644
2921
2922 file = grub_file_open (filename, GRUB_FILE_TYPE_GRUB_MODULE);
2923 diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
2924-index 6e1ceb905..96204e39b 100644
2925+index 6e1ceb9051..96204e39b9 100644
2926 --- a/grub-core/kern/efi/efi.c
2927 +++ b/grub-core/kern/efi/efi.c
2928 @@ -273,6 +273,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
2929@@ -86,7 +86,7 @@ index 6e1ceb905..96204e39b 100644
2930
2931 /* Search the mods section from the PE32/PE32+ image. This code uses
2932 diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
2933-index e90e00dc4..a237952b3 100644
2934+index e90e00dc43..a237952b37 100644
2935 --- a/include/grub/efi/efi.h
2936 +++ b/include/grub/efi/efi.h
2937 @@ -82,6 +82,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
2938diff --git a/debian/patches/olpc-prefix-hack.patch b/debian/patches/olpc-prefix-hack.patch
2939index b14c333..d40729f 100644
2940--- a/debian/patches/olpc-prefix-hack.patch
2941+++ b/debian/patches/olpc-prefix-hack.patch
2942@@ -11,7 +11,7 @@ Patch-Name: olpc-prefix-hack.patch
2943 1 file changed, 11 insertions(+)
2944
2945 diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
2946-index d483e35ee..8b089b48d 100644
2947+index d483e35eed..8b089b48d0 100644
2948 --- a/grub-core/kern/ieee1275/init.c
2949 +++ b/grub-core/kern/ieee1275/init.c
2950 @@ -76,6 +76,7 @@ grub_exit (void)
2951diff --git a/debian/patches/ppc64el-disable-vsx.patch b/debian/patches/ppc64el-disable-vsx.patch
2952index e2aa833..3aef631 100644
2953--- a/debian/patches/ppc64el-disable-vsx.patch
2954+++ b/debian/patches/ppc64el-disable-vsx.patch
2955@@ -21,7 +21,7 @@ Patch-Name: ppc64el-disable-vsx.patch
2956 1 file changed, 12 insertions(+)
2957
2958 diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
2959-index 21c884b43..de9a9601a 100644
2960+index 21c884b433..de9a9601a9 100644
2961 --- a/grub-core/kern/powerpc/ieee1275/startup.S
2962 +++ b/grub-core/kern/powerpc/ieee1275/startup.S
2963 @@ -20,6 +20,8 @@
2964diff --git a/debian/patches/probe-fusionio.patch b/debian/patches/probe-fusionio.patch
2965index b7932cc..ad7ef51 100644
2966--- a/debian/patches/probe-fusionio.patch
2967+++ b/debian/patches/probe-fusionio.patch
2968@@ -14,7 +14,7 @@ Patch-Name: probe-fusionio.patch
2969 2 files changed, 32 insertions(+)
2970
2971 diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
2972-index 90d92d3ad..7adc0f30e 100644
2973+index 90d92d3ad5..7adc0f30ee 100644
2974 --- a/grub-core/osdep/linux/getroot.c
2975 +++ b/grub-core/osdep/linux/getroot.c
2976 @@ -950,6 +950,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
2977@@ -38,7 +38,7 @@ index 90d92d3ad..7adc0f30e 100644
2978
2979 return path;
2980 diff --git a/util/deviceiter.c b/util/deviceiter.c
2981-index a4971ef42..dddc50da7 100644
2982+index a4971ef429..dddc50da7a 100644
2983 --- a/util/deviceiter.c
2984 +++ b/util/deviceiter.c
2985 @@ -383,6 +383,12 @@ get_nvme_disk_name (char *name, int controller, int namespace)
2986diff --git a/debian/patches/quick-boot-lvm.patch b/debian/patches/quick-boot-lvm.patch
2987index d091af7..e313019 100644
2988--- a/debian/patches/quick-boot-lvm.patch
2989+++ b/debian/patches/quick-boot-lvm.patch
2990@@ -26,7 +26,7 @@ Patch-Name: quick-boot-lvm.patch
2991 1 file changed, 15 insertions(+), 3 deletions(-)
2992
2993 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
2994-index 674a76140..b7135b655 100644
2995+index 674a761402..b7135b655f 100644
2996 --- a/util/grub.d/00_header.in
2997 +++ b/util/grub.d/00_header.in
2998 @@ -115,7 +115,7 @@ EOF
2999diff --git a/debian/patches/quick-boot.patch b/debian/patches/quick-boot.patch
3000index c9c0a98..ad4650d 100644
3001--- a/debian/patches/quick-boot.patch
3002+++ b/debian/patches/quick-boot.patch
3003@@ -34,7 +34,7 @@ Patch-Name: quick-boot.patch
3004 8 files changed, 146 insertions(+), 13 deletions(-)
3005
3006 diff --git a/configure.ac b/configure.ac
3007-index ea00ccd69..7dda5bb32 100644
3008+index ea00ccd691..7dda5bb32b 100644
3009 --- a/configure.ac
3010 +++ b/configure.ac
3011 @@ -1868,6 +1868,17 @@ else
3012@@ -56,7 +56,7 @@ index ea00ccd69..7dda5bb32 100644
3013
3014 AC_SUBST([FONT_SOURCE])
3015 diff --git a/docs/grub.texi b/docs/grub.texi
3016-index 87795075a..a835d0ae4 100644
3017+index 87795075a8..a835d0ae42 100644
3018 --- a/docs/grub.texi
3019 +++ b/docs/grub.texi
3020 @@ -1522,6 +1522,20 @@ This option may be set to a list of GRUB module names separated by spaces.
3021@@ -81,7 +81,7 @@ index 87795075a..a835d0ae4 100644
3022
3023 The following options are still accepted for compatibility with existing
3024 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
3025-index ebf5a0f10..42c82290d 100644
3026+index ebf5a0f109..42c82290de 100644
3027 --- a/grub-core/normal/menu.c
3028 +++ b/grub-core/normal/menu.c
3029 @@ -604,6 +604,30 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
3030@@ -116,7 +116,7 @@ index ebf5a0f10..42c82290d 100644
3031 {
3032 pos = grub_term_save_pos ();
3033 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
3034-index d18bf972f..307214310 100644
3035+index d18bf972f7..3072143105 100644
3036 --- a/util/grub-mkconfig.in
3037 +++ b/util/grub-mkconfig.in
3038 @@ -250,7 +250,8 @@ export GRUB_DEFAULT \
3039@@ -130,7 +130,7 @@ index d18bf972f..307214310 100644
3040 if test "x${grub_cfg}" != "x"; then
3041 rm -f "${grub_cfg}.new"
3042 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
3043-index 93a90233e..674a76140 100644
3044+index 93a90233ea..674a761402 100644
3045 --- a/util/grub.d/00_header.in
3046 +++ b/util/grub.d/00_header.in
3047 @@ -21,6 +21,8 @@ prefix="@prefix@"
3048@@ -259,7 +259,7 @@ index 93a90233e..674a76140 100644
3049 EOF
3050 }
3051 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
3052-index 479a8bf4e..2be66c702 100644
3053+index 479a8bf4e5..2be66c7028 100644
3054 --- a/util/grub.d/10_linux.in
3055 +++ b/util/grub.d/10_linux.in
3056 @@ -22,6 +22,7 @@ exec_prefix="@exec_prefix@"
3057@@ -281,7 +281,7 @@ index 479a8bf4e..2be66c702 100644
3058 save_default_entry | grub_add_tab
3059 fi
3060 diff --git a/util/grub.d/10_linux_zfs.in b/util/grub.d/10_linux_zfs.in
3061-index 3a0e6d103..ec4b49d9d 100755
3062+index 3a0e6d1035..ec4b49d9d7 100755
3063 --- a/util/grub.d/10_linux_zfs.in
3064 +++ b/util/grub.d/10_linux_zfs.in
3065 @@ -21,6 +21,7 @@ prefix="@prefix@"
3066@@ -304,7 +304,7 @@ index 3a0e6d103..ec4b49d9d 100755
3067 GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}
3068 default_entry="$(save_default_entry)"
3069 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
3070-index 271044f59..da5f28876 100644
3071+index 271044f592..da5f28876d 100644
3072 --- a/util/grub.d/30_os-prober.in
3073 +++ b/util/grub.d/30_os-prober.in
3074 @@ -20,12 +20,26 @@ set -e
3075diff --git a/debian/patches/restore-mkdevicemap.patch b/debian/patches/restore-mkdevicemap.patch
3076index 3fbce62..7236a7b 100644
3077--- a/debian/patches/restore-mkdevicemap.patch
3078+++ b/debian/patches/restore-mkdevicemap.patch
3079@@ -28,7 +28,7 @@ Patch-Name: restore-mkdevicemap.patch
3080 create mode 100644 util/grub-mkdevicemap.c
3081
3082 diff --git a/Makefile.util.def b/Makefile.util.def
3083-index bac85e284..eec1924b0 100644
3084+index bac85e2840..eec1924b0e 100644
3085 --- a/Makefile.util.def
3086 +++ b/Makefile.util.def
3087 @@ -324,6 +324,23 @@ program = {
3088@@ -57,7 +57,7 @@ index bac85e284..eec1924b0 100644
3089 installdir = sbin;
3090 diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m
3091 new file mode 100644
3092-index 000000000..96cd6ee72
3093+index 0000000000..96cd6ee723
3094 --- /dev/null
3095 +++ b/docs/man/grub-mkdevicemap.h2m
3096 @@ -0,0 +1,4 @@
3097@@ -67,7 +67,7 @@ index 000000000..96cd6ee72
3098 +.BR grub-probe (8)
3099 diff --git a/include/grub/util/deviceiter.h b/include/grub/util/deviceiter.h
3100 new file mode 100644
3101-index 000000000..85374978c
3102+index 0000000000..85374978c5
3103 --- /dev/null
3104 +++ b/include/grub/util/deviceiter.h
3105 @@ -0,0 +1,14 @@
3106@@ -87,7 +87,7 @@ index 000000000..85374978c
3107 +#endif /* ! GRUB_DEVICEITER_MACHINE_UTIL_HEADER */
3108 diff --git a/util/deviceiter.c b/util/deviceiter.c
3109 new file mode 100644
3110-index 000000000..a4971ef42
3111+index 0000000000..a4971ef429
3112 --- /dev/null
3113 +++ b/util/deviceiter.c
3114 @@ -0,0 +1,1021 @@
3115@@ -1114,7 +1114,7 @@ index 000000000..a4971ef42
3116 +}
3117 diff --git a/util/devicemap.c b/util/devicemap.c
3118 new file mode 100644
3119-index 000000000..c61864420
3120+index 0000000000..c61864420a
3121 --- /dev/null
3122 +++ b/util/devicemap.c
3123 @@ -0,0 +1,13 @@
3124@@ -1133,7 +1133,7 @@ index 000000000..c61864420
3125 +}
3126 diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c
3127 new file mode 100644
3128-index 000000000..c4bbdbf69
3129+index 0000000000..c4bbdbf69c
3130 --- /dev/null
3131 +++ b/util/grub-mkdevicemap.c
3132 @@ -0,0 +1,181 @@
3133diff --git a/debian/patches/rhboot-f34-dont-use-int-for-efi-status.patch b/debian/patches/rhboot-f34-dont-use-int-for-efi-status.patch
3134new file mode 100644
3135index 0000000..ade1154
3136--- /dev/null
3137+++ b/debian/patches/rhboot-f34-dont-use-int-for-efi-status.patch
3138@@ -0,0 +1,24 @@
3139+From 3a80091a585e71363cd4f62f93fd48e5631362d2 Mon Sep 17 00:00:00 2001
3140+From: Peter Jones <pjones@redhat.com>
3141+Date: Mon, 26 Jun 2017 12:44:59 -0400
3142+Subject: don't use int for efi status
3143+
3144+(cherry picked from commit eee6d2db7e3a392b8fe134fa75a7e28c9ae8cda5)
3145+Patch-Name: rhboot-f34-dont-use-int-for-efi-status.patch
3146+---
3147+ grub-core/kern/efi/efi.c | 2 +-
3148+ 1 file changed, 1 insertion(+), 1 deletion(-)
3149+
3150+diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
3151+index d4a4be57cb..7cf003f713 100644
3152+--- a/grub-core/kern/efi/efi.c
3153++++ b/grub-core/kern/efi/efi.c
3154+@@ -167,7 +167,7 @@ grub_reboot (void)
3155+ void
3156+ grub_exit (int retval)
3157+ {
3158+- int rc = GRUB_EFI_LOAD_ERROR;
3159++ grub_efi_status_t rc = GRUB_EFI_LOAD_ERROR;
3160+
3161+ if (retval == 0)
3162+ rc = GRUB_EFI_SUCCESS;
3163diff --git a/debian/patches/rhboot-f34-make-exit-take-a-return-code.patch b/debian/patches/rhboot-f34-make-exit-take-a-return-code.patch
3164new file mode 100644
3165index 0000000..81feddf
3166--- /dev/null
3167+++ b/debian/patches/rhboot-f34-make-exit-take-a-return-code.patch
3168@@ -0,0 +1,269 @@
3169+From f58cd1f3cf1cf8bf3ee5f57ae035a14888840448 Mon Sep 17 00:00:00 2001
3170+From: Peter Jones <pjones@redhat.com>
3171+Date: Wed, 26 Feb 2014 21:49:12 -0500
3172+Subject: Make "exit" take a return code.
3173+
3174+This adds "exit" with a return code. With this patch, any "exit"
3175+command /may/ include a return code, and on platforms that support
3176+returning with an exit status, we will do so. By default we return the
3177+same exit status we did before this patch.
3178+
3179+Signed-off-by: Peter Jones <pjones@redhat.com>
3180+(cherry picked from commit ccce3d69ae3eacc7bdc70217304586bd7e74fe1e)
3181+Patch-Name: rhboot-f34-make-exit-take-a-return-code.patch
3182+---
3183+ grub-core/commands/minicmd.c | 20 ++++++++++++++++----
3184+ grub-core/kern/efi/efi.c | 9 +++++++--
3185+ grub-core/kern/emu/main.c | 2 +-
3186+ grub-core/kern/emu/misc.c | 5 +++--
3187+ grub-core/kern/i386/coreboot/init.c | 2 +-
3188+ grub-core/kern/i386/qemu/init.c | 2 +-
3189+ grub-core/kern/ieee1275/init.c | 2 +-
3190+ grub-core/kern/mips/arc/init.c | 2 +-
3191+ grub-core/kern/mips/loongson/init.c | 2 +-
3192+ grub-core/kern/mips/qemu_mips/init.c | 2 +-
3193+ grub-core/kern/misc.c | 11 ++++++++++-
3194+ grub-core/kern/uboot/init.c | 6 +++---
3195+ grub-core/kern/xen/init.c | 2 +-
3196+ include/grub/misc.h | 2 +-
3197+ 14 files changed, 48 insertions(+), 21 deletions(-)
3198+
3199+diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
3200+index 6bbce3128c..6d66b7c453 100644
3201+--- a/grub-core/commands/minicmd.c
3202++++ b/grub-core/commands/minicmd.c
3203+@@ -179,12 +179,24 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
3204+ }
3205+
3206+ /* exit */
3207+-static grub_err_t __attribute__ ((noreturn))
3208++static grub_err_t
3209+ grub_mini_cmd_exit (struct grub_command *cmd __attribute__ ((unused)),
3210+- int argc __attribute__ ((unused)),
3211+- char *argv[] __attribute__ ((unused)))
3212++ int argc, char *argv[])
3213+ {
3214+- grub_exit ();
3215++ int retval = -1;
3216++ unsigned long n;
3217++
3218++ if (argc < 0 || argc > 1)
3219++ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
3220++
3221++ if (argc == 1)
3222++ {
3223++ n = grub_strtoul (argv[0], 0, 10);
3224++ if (n != ~0UL)
3225++ retval = n;
3226++ }
3227++
3228++ grub_exit (retval);
3229+ /* Not reached. */
3230+ }
3231+
3232+diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
3233+index 88bbd34eac..d4a4be57cb 100644
3234+--- a/grub-core/kern/efi/efi.c
3235++++ b/grub-core/kern/efi/efi.c
3236+@@ -165,11 +165,16 @@ grub_reboot (void)
3237+ }
3238+
3239+ void
3240+-grub_exit (void)
3241++grub_exit (int retval)
3242+ {
3243++ int rc = GRUB_EFI_LOAD_ERROR;
3244++
3245++ if (retval == 0)
3246++ rc = GRUB_EFI_SUCCESS;
3247++
3248+ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
3249+ efi_call_4 (grub_efi_system_table->boot_services->exit,
3250+- grub_efi_image_handle, GRUB_EFI_SUCCESS, 0, 0);
3251++ grub_efi_image_handle, rc, 0, 0);
3252+ for (;;) ;
3253+ }
3254+
3255+diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
3256+index 425bb96034..55ea5a11cc 100644
3257+--- a/grub-core/kern/emu/main.c
3258++++ b/grub-core/kern/emu/main.c
3259+@@ -67,7 +67,7 @@ grub_reboot (void)
3260+ }
3261+
3262+ void
3263+-grub_exit (void)
3264++grub_exit (int retval __attribute__((unused)))
3265+ {
3266+ grub_reboot ();
3267+ }
3268+diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
3269+index dfd8a8ec48..0ff13bcaf8 100644
3270+--- a/grub-core/kern/emu/misc.c
3271++++ b/grub-core/kern/emu/misc.c
3272+@@ -151,9 +151,10 @@ xasprintf (const char *fmt, ...)
3273+
3274+ #if !defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
3275+ void
3276+-grub_exit (void)
3277++__attribute__ ((noreturn))
3278++grub_exit (int rc)
3279+ {
3280+- exit (1);
3281++ exit (rc < 0 ? 1 : rc);
3282+ }
3283+ #endif
3284+
3285+diff --git a/grub-core/kern/i386/coreboot/init.c b/grub-core/kern/i386/coreboot/init.c
3286+index 3314f027fe..36f9134b7b 100644
3287+--- a/grub-core/kern/i386/coreboot/init.c
3288++++ b/grub-core/kern/i386/coreboot/init.c
3289+@@ -41,7 +41,7 @@ extern grub_uint8_t _end[];
3290+ extern grub_uint8_t _edata[];
3291+
3292+ void __attribute__ ((noreturn))
3293+-grub_exit (void)
3294++grub_exit (int rc __attribute__((unused)))
3295+ {
3296+ /* We can't use grub_fatal() in this function. This would create an infinite
3297+ loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
3298+diff --git a/grub-core/kern/i386/qemu/init.c b/grub-core/kern/i386/qemu/init.c
3299+index 271b6fbfab..9fafe98f01 100644
3300+--- a/grub-core/kern/i386/qemu/init.c
3301++++ b/grub-core/kern/i386/qemu/init.c
3302+@@ -42,7 +42,7 @@ extern grub_uint8_t _end[];
3303+ extern grub_uint8_t _edata[];
3304+
3305+ void __attribute__ ((noreturn))
3306+-grub_exit (void)
3307++grub_exit (int rc __attribute__((unused)))
3308+ {
3309+ /* We can't use grub_fatal() in this function. This would create an infinite
3310+ loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
3311+diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
3312+index 8b089b48d0..085a6a33f8 100644
3313+--- a/grub-core/kern/ieee1275/init.c
3314++++ b/grub-core/kern/ieee1275/init.c
3315+@@ -71,7 +71,7 @@ grub_addr_t grub_ieee1275_original_stack;
3316+ #endif
3317+
3318+ void
3319+-grub_exit (void)
3320++grub_exit (int rc __attribute__((unused)))
3321+ {
3322+ grub_ieee1275_exit ();
3323+ }
3324+diff --git a/grub-core/kern/mips/arc/init.c b/grub-core/kern/mips/arc/init.c
3325+index 3834a14909..86b3a25ec4 100644
3326+--- a/grub-core/kern/mips/arc/init.c
3327++++ b/grub-core/kern/mips/arc/init.c
3328+@@ -276,7 +276,7 @@ grub_halt (void)
3329+ }
3330+
3331+ void
3332+-grub_exit (void)
3333++grub_exit (int rc __attribute__((unused)))
3334+ {
3335+ GRUB_ARC_FIRMWARE_VECTOR->exit ();
3336+
3337+diff --git a/grub-core/kern/mips/loongson/init.c b/grub-core/kern/mips/loongson/init.c
3338+index 7b96531b98..dff598ca7b 100644
3339+--- a/grub-core/kern/mips/loongson/init.c
3340++++ b/grub-core/kern/mips/loongson/init.c
3341+@@ -304,7 +304,7 @@ grub_halt (void)
3342+ }
3343+
3344+ void
3345+-grub_exit (void)
3346++grub_exit (int rc __attribute__((unused)))
3347+ {
3348+ grub_halt ();
3349+ }
3350+diff --git a/grub-core/kern/mips/qemu_mips/init.c b/grub-core/kern/mips/qemu_mips/init.c
3351+index be88b77d22..8b6c55ffc0 100644
3352+--- a/grub-core/kern/mips/qemu_mips/init.c
3353++++ b/grub-core/kern/mips/qemu_mips/init.c
3354+@@ -75,7 +75,7 @@ grub_machine_fini (int flags __attribute__ ((unused)))
3355+ }
3356+
3357+ void
3358+-grub_exit (void)
3359++grub_exit (int rc __attribute__((unused)))
3360+ {
3361+ grub_halt ();
3362+ }
3363+diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
3364+index 83c068d61b..e742f56d20 100644
3365+--- a/grub-core/kern/misc.c
3366++++ b/grub-core/kern/misc.c
3367+@@ -1098,9 +1098,18 @@ grub_abort (void)
3368+ grub_getkey ();
3369+ }
3370+
3371+- grub_exit ();
3372++ grub_exit (1);
3373+ }
3374+
3375++#if defined (__clang__) && !defined (GRUB_UTIL)
3376++/* clang emits references to abort(). */
3377++void __attribute__ ((noreturn))
3378++abort (void)
3379++{
3380++ grub_abort ();
3381++}
3382++#endif
3383++
3384+ void
3385+ grub_fatal (const char *fmt, ...)
3386+ {
3387+diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
3388+index 3e338645c5..be2a5be1d0 100644
3389+--- a/grub-core/kern/uboot/init.c
3390++++ b/grub-core/kern/uboot/init.c
3391+@@ -39,9 +39,9 @@ extern grub_size_t grub_total_module_size;
3392+ static unsigned long timer_start;
3393+
3394+ void
3395+-grub_exit (void)
3396++grub_exit (int rc)
3397+ {
3398+- grub_uboot_return (0);
3399++ grub_uboot_return (rc < 0 ? 1 : rc);
3400+ }
3401+
3402+ static grub_uint64_t
3403+@@ -78,7 +78,7 @@ grub_machine_init (void)
3404+ if (!ver)
3405+ {
3406+ /* Don't even have a console to log errors to... */
3407+- grub_exit ();
3408++ grub_exit (-1);
3409+ }
3410+ else if (ver > API_SIG_VERSION)
3411+ {
3412+diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c
3413+index 782ca72952..708b060f32 100644
3414+--- a/grub-core/kern/xen/init.c
3415++++ b/grub-core/kern/xen/init.c
3416+@@ -584,7 +584,7 @@ grub_machine_init (void)
3417+ }
3418+
3419+ void
3420+-grub_exit (void)
3421++grub_exit (int rc __attribute__((unused)))
3422+ {
3423+ struct sched_shutdown arg;
3424+
3425+diff --git a/include/grub/misc.h b/include/grub/misc.h
3426+index ee48eb7a72..f9135b62e3 100644
3427+--- a/include/grub/misc.h
3428++++ b/include/grub/misc.h
3429+@@ -334,7 +334,7 @@ int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt,
3430+ char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...)
3431+ __attribute__ ((format (GNU_PRINTF, 1, 2))) WARN_UNUSED_RESULT;
3432+ char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args) WARN_UNUSED_RESULT;
3433+-void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn));
3434++void EXPORT_FUNC(grub_exit) (int rc) __attribute__ ((noreturn));
3435+ grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
3436+ grub_uint64_t d,
3437+ grub_uint64_t *r);
3438diff --git a/debian/patches/rhboot-f34-make-pmtimer-tsc-calibration-fast.patch b/debian/patches/rhboot-f34-make-pmtimer-tsc-calibration-fast.patch
3439new file mode 100644
3440index 0000000..37eb216
3441--- /dev/null
3442+++ b/debian/patches/rhboot-f34-make-pmtimer-tsc-calibration-fast.patch
3443@@ -0,0 +1,214 @@
3444+From ecea6495041ee81331d245cf25ac53d66f07561c Mon Sep 17 00:00:00 2001
3445+From: Peter Jones <pjones@redhat.com>
3446+Date: Tue, 7 Nov 2017 17:12:17 -0500
3447+Subject: Make pmtimer tsc calibration not take 51 seconds to fail.
3448+
3449+On my laptop running at 2.4GHz, if I run a VM where tsc calibration
3450+using pmtimer will fail presuming a broken pmtimer, it takes ~51 seconds
3451+to do so (as measured with the stopwatch on my phone), with a tsc delta
3452+of 0x1cd1c85300, or around 125 billion cycles.
3453+
3454+If instead of trying to wait for 5-200ms to show up on the pmtimer, we try
3455+to wait for 5-200us, it decides it's broken in ~0x2626aa0 TSCs, aka ~2.4
3456+million cycles, or more or less instantly.
3457+
3458+Additionally, this reading the pmtimer was returning 0xffffffff anyway,
3459+and that's obviously an invalid return. I've added a check for that and
3460+0 so we don't bother waiting for the test if what we're seeing is dead
3461+pins with no response at all.
3462+
3463+If "debug" is includes "pmtimer", you will see one of the following
3464+three outcomes. If pmtimer gives all 0 or all 1 bits, you will see:
3465+
3466+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 1
3467+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 2
3468+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 3
3469+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 4
3470+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 5
3471+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 6
3472+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 7
3473+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 8
3474+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 9
3475+kern/i386/tsc_pmtimer.c:77: pmtimer: 0xffffff bad_reads: 10
3476+kern/i386/tsc_pmtimer.c:78: timer is broken; giving up.
3477+
3478+This outcome was tested using qemu+kvm with UEFI (OVMF) firmware and
3479+these options: -machine pc-q35-2.10 -cpu Broadwell-noTSX
3480+
3481+If pmtimer gives any other bit patterns but is not actually marching
3482+forward fast enough to use for clock calibration, you will see:
3483+
3484+kern/i386/tsc_pmtimer.c:121: pmtimer delta is 0x0 (1904 iterations)
3485+kern/i386/tsc_pmtimer.c:124: tsc delta is implausible: 0x2626aa0
3486+
3487+This outcome was tested using grub compiled with GRUB_PMTIMER_IGNORE_BAD_READS
3488+defined (so as not to trip the bad read test) using qemu+kvm with UEFI
3489+(OVMF) firmware, and these options: -machine pc-q35-2.10 -cpu Broadwell-noTSX
3490+
3491+If pmtimer actually works, you'll see something like:
3492+
3493+kern/i386/tsc_pmtimer.c:121: pmtimer delta is 0x0 (1904 iterations)
3494+kern/i386/tsc_pmtimer.c:124: tsc delta is implausible: 0x2626aa0
3495+
3496+This outcome was tested using qemu+kvm with UEFI (OVMF) firmware, and
3497+these options: -machine pc-i440fx-2.4 -cpu Broadwell-noTSX
3498+
3499+I've also tested this outcome on a real Intel Xeon E3-1275v3 on an Intel
3500+Server Board S1200V3RPS using the SDV.RP.B8 "Release" build here:
3501+https://firmware.intel.com/sites/default/files/UEFIDevKit_S1200RP_vB8.zip
3502+
3503+Signed-off-by: Peter Jones <pjones@redhat.com>
3504+(cherry picked from commit cf0448d61e00acb548f8f22d57ba6e4f3b37f394)
3505+
3506+Patch-Name: rhboot-f34-make-pmtimer-tsc-calibration-fast.patch
3507+---
3508+ grub-core/kern/i386/tsc_pmtimer.c | 109 ++++++++++++++++++++++++------
3509+ 1 file changed, 89 insertions(+), 20 deletions(-)
3510+
3511+diff --git a/grub-core/kern/i386/tsc_pmtimer.c b/grub-core/kern/i386/tsc_pmtimer.c
3512+index c9c3616997..ca15c3aacd 100644
3513+--- a/grub-core/kern/i386/tsc_pmtimer.c
3514++++ b/grub-core/kern/i386/tsc_pmtimer.c
3515+@@ -28,40 +28,101 @@
3516+ #include <grub/acpi.h>
3517+ #include <grub/cpu/io.h>
3518+
3519++/*
3520++ * Define GRUB_PMTIMER_IGNORE_BAD_READS if you're trying to test a timer that's
3521++ * present but doesn't keep time well.
3522++ */
3523++// #define GRUB_PMTIMER_IGNORE_BAD_READS
3524++
3525+ grub_uint64_t
3526+ grub_pmtimer_wait_count_tsc (grub_port_t pmtimer,
3527+ grub_uint16_t num_pm_ticks)
3528+ {
3529+ grub_uint32_t start;
3530+- grub_uint32_t last;
3531+- grub_uint32_t cur, end;
3532++ grub_uint64_t cur, end;
3533+ grub_uint64_t start_tsc;
3534+ grub_uint64_t end_tsc;
3535+- int num_iter = 0;
3536++ unsigned int num_iter = 0;
3537++#ifndef GRUB_PMTIMER_IGNORE_BAD_READS
3538++ int bad_reads = 0;
3539++#endif
3540+
3541+- start = grub_inl (pmtimer) & 0xffffff;
3542+- last = start;
3543++ /*
3544++ * Some timers are 24-bit and some are 32-bit, but it doesn't make much
3545++ * difference to us. Caring which one we have isn't really worth it since
3546++ * the low-order digits will give us enough data to calibrate TSC. So just
3547++ * mask the top-order byte off.
3548++ */
3549++ cur = start = grub_inl (pmtimer) & 0xffffffUL;
3550+ end = start + num_pm_ticks;
3551+ start_tsc = grub_get_tsc ();
3552+ while (1)
3553+ {
3554+- cur = grub_inl (pmtimer) & 0xffffff;
3555+- if (cur < last)
3556+- cur |= 0x1000000;
3557+- num_iter++;
3558++ cur &= 0xffffffffff000000ULL;
3559++ cur |= grub_inl (pmtimer) & 0xffffffUL;
3560++
3561++ end_tsc = grub_get_tsc();
3562++
3563++#ifndef GRUB_PMTIMER_IGNORE_BAD_READS
3564++ /*
3565++ * If we get 10 reads in a row that are obviously dead pins, there's no
3566++ * reason to do this thousands of times.
3567++ */
3568++ if (cur == 0xffffffUL || cur == 0)
3569++ {
3570++ bad_reads++;
3571++ grub_dprintf ("pmtimer",
3572++ "pmtimer: 0x%"PRIxGRUB_UINT64_T" bad_reads: %d\n",
3573++ cur, bad_reads);
3574++ grub_dprintf ("pmtimer", "timer is broken; giving up.\n");
3575++
3576++ if (bad_reads == 10)
3577++ return 0;
3578++ }
3579++#endif
3580++
3581++ if (cur < start)
3582++ cur += 0x1000000;
3583++
3584+ if (cur >= end)
3585+ {
3586+- end_tsc = grub_get_tsc ();
3587++ grub_dprintf ("pmtimer", "pmtimer delta is 0x%"PRIxGRUB_UINT64_T"\n",
3588++ cur - start);
3589++ grub_dprintf ("pmtimer", "tsc delta is 0x%"PRIxGRUB_UINT64_T"\n",
3590++ end_tsc - start_tsc);
3591+ return end_tsc - start_tsc;
3592+ }
3593+- /* Check for broken PM timer.
3594+- 50000000 TSCs is between 5 ms (10GHz) and 200 ms (250 MHz)
3595+- if after this time we still don't have 1 ms on pmtimer, then
3596+- pmtimer is broken.
3597++
3598++ /*
3599++ * Check for broken PM timer. 1ms at 10GHz should be 1E+7 TSCs; at
3600++ * 250MHz it should be 2.5E6. So if after 4E+7 TSCs on a 10GHz machine,
3601++ * we should have seen pmtimer show 4ms of change (i.e. cur =~
3602++ * start+14320); on a 250MHz machine that should be 16ms (start+57280).
3603++ * If after this a time we still don't have 1ms on pmtimer, then pmtimer
3604++ * is broken.
3605++ *
3606++ * Likewise, if our code is perfectly efficient and introduces no delays
3607++ * whatsoever, on a 10GHz system we should see a TSC delta of 3580 in
3608++ * ~3580 iterations. On a 250MHz machine that should be ~900 iterations.
3609++ *
3610++ * With those factors in mind, there are two limits here. There's a hard
3611++ * limit here at 8x our desired pm timer delta, picked as an arbitrarily
3612++ * large value that's still not a lot of time to humans, because if we
3613++ * get that far this is either an implausibly fast machine or the pmtimer
3614++ * is not running. And there's another limit on 4x our 10GHz tsc delta
3615++ * without seeing cur converge on our target value.
3616+ */
3617+- if ((num_iter & 0xffffff) == 0 && grub_get_tsc () - start_tsc > 5000000) {
3618+- return 0;
3619+- }
3620++ if ((++num_iter > (grub_uint32_t)num_pm_ticks << 3UL) ||
3621++ end_tsc - start_tsc > 40000000)
3622++ {
3623++ grub_dprintf ("pmtimer",
3624++ "pmtimer delta is 0x%"PRIxGRUB_UINT64_T" (%u iterations)\n",
3625++ cur - start, num_iter);
3626++ grub_dprintf ("pmtimer",
3627++ "tsc delta is implausible: 0x%"PRIxGRUB_UINT64_T"\n",
3628++ end_tsc - start_tsc);
3629++ return 0;
3630++ }
3631+ }
3632+ }
3633+
3634+@@ -74,12 +135,20 @@ grub_tsc_calibrate_from_pmtimer (void)
3635+
3636+ fadt = grub_acpi_find_fadt ();
3637+ if (!fadt)
3638+- return 0;
3639++ {
3640++ grub_dprintf ("pmtimer", "No FADT found; not using pmtimer.\n");
3641++ return 0;
3642++ }
3643+ pmtimer = fadt->pmtimer;
3644+ if (!pmtimer)
3645+- return 0;
3646++ {
3647++ grub_dprintf ("pmtimer", "FADT does not specify pmtimer; skipping.\n");
3648++ return 0;
3649++ }
3650+
3651+- /* It's 3.579545 MHz clock. Wait 1 ms. */
3652++ /*
3653++ * It's 3.579545 MHz clock. Wait 1 ms.
3654++ */
3655+ tsc_diff = grub_pmtimer_wait_count_tsc (pmtimer, 3580);
3656+ if (tsc_diff == 0)
3657+ return 0;
3658diff --git a/debian/patches/rhboot-f34-support-non-ethernet.patch b/debian/patches/rhboot-f34-support-non-ethernet.patch
3659new file mode 100644
3660index 0000000..377cba5
3661--- /dev/null
3662+++ b/debian/patches/rhboot-f34-support-non-ethernet.patch
3663@@ -0,0 +1,770 @@
3664+From f017d81d8d38a91e5b9bea1597c94d42935702f4 Mon Sep 17 00:00:00 2001
3665+From: Andrzej Kacprowski <andrzej.kacprowski@intel.com>
3666+Date: Wed, 10 Jul 2019 15:22:29 +0200
3667+Subject: Add support for non-Ethernet network cards
3668+
3669+This patch replaces fixed 6-byte link layer address with
3670+up to 32-byte variable sized address.
3671+This allows supporting Infiniband and Omni-Path fabric
3672+which use 20-byte address, but other network card types
3673+can also take advantage of this change.
3674+The network card driver is responsible for replacing L2
3675+header provided by grub2 if needed.
3676+This approach is compatible with UEFI network stack which
3677+also allows up to 32-byte variable size link address.
3678+
3679+The BOOTP/DHCP packet format is limited to 16 byte client
3680+hardware address, if link address is more that 16-bytes
3681+then chaddr field in BOOTP it will be set to 0 as per rfc4390.
3682+
3683+Resolves: rhbz#1370642
3684+
3685+Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@intel.com>
3686+[msalter: Fix max string calculation in grub_net_hwaddr_to_str]
3687+Signed-off-by: Mark Salter <msalter@redhat.com>
3688+(cherry picked from commit 50f3f90fe7ef5a875ede559124280d226d40743b)
3689+
3690+Patch-Name: rhboot-f34-support-non-ethernet.patch
3691+---
3692+ grub-core/net/arp.c | 157 ++++++++++++++++---------
3693+ grub-core/net/bootp.c | 15 +--
3694+ grub-core/net/drivers/efi/efinet.c | 8 +-
3695+ grub-core/net/drivers/emu/emunet.c | 1 +
3696+ grub-core/net/drivers/i386/pc/pxe.c | 13 +-
3697+ grub-core/net/drivers/ieee1275/ofnet.c | 2 +
3698+ grub-core/net/drivers/uboot/ubootnet.c | 1 +
3699+ grub-core/net/ethernet.c | 88 +++++++-------
3700+ grub-core/net/icmp6.c | 15 ++-
3701+ grub-core/net/ip.c | 4 +-
3702+ grub-core/net/net.c | 50 ++++----
3703+ include/grub/net.h | 19 +--
3704+ 12 files changed, 220 insertions(+), 153 deletions(-)
3705+
3706+diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c
3707+index 54306e3b16..67b409a8ac 100644
3708+--- a/grub-core/net/arp.c
3709++++ b/grub-core/net/arp.c
3710+@@ -31,22 +31,12 @@ enum
3711+ ARP_REPLY = 2
3712+ };
3713+
3714+-enum
3715+- {
3716+- /* IANA ARP constant to define hardware type as ethernet. */
3717+- GRUB_NET_ARPHRD_ETHERNET = 1
3718+- };
3719+-
3720+-struct arppkt {
3721++struct arphdr {
3722+ grub_uint16_t hrd;
3723+ grub_uint16_t pro;
3724+ grub_uint8_t hln;
3725+ grub_uint8_t pln;
3726+ grub_uint16_t op;
3727+- grub_uint8_t sender_mac[6];
3728+- grub_uint32_t sender_ip;
3729+- grub_uint8_t recv_mac[6];
3730+- grub_uint32_t recv_ip;
3731+ } GRUB_PACKED;
3732+
3733+ static int have_pending;
3734+@@ -57,12 +47,16 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
3735+ const grub_net_network_level_address_t *proto_addr)
3736+ {
3737+ struct grub_net_buff nb;
3738+- struct arppkt *arp_packet;
3739++ struct arphdr *arp_header;
3740+ grub_net_link_level_address_t target_mac_addr;
3741+ grub_err_t err;
3742+ int i;
3743+ grub_uint8_t *nbd;
3744+ grub_uint8_t arp_data[128];
3745++ grub_uint8_t hln;
3746++ grub_uint8_t pln;
3747++ grub_uint8_t arp_packet_len;
3748++ grub_uint8_t *tmp_ptr;
3749+
3750+ if (proto_addr->type != GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4)
3751+ return grub_error (GRUB_ERR_BUG, "unsupported address family");
3752+@@ -73,23 +67,39 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
3753+ grub_netbuff_clear (&nb);
3754+ grub_netbuff_reserve (&nb, 128);
3755+
3756+- err = grub_netbuff_push (&nb, sizeof (*arp_packet));
3757++ hln = inf->card->default_address.len;
3758++ pln = sizeof (proto_addr->ipv4);
3759++ arp_packet_len = sizeof (*arp_header) + 2 * (hln + pln);
3760++
3761++ err = grub_netbuff_push (&nb, arp_packet_len);
3762+ if (err)
3763+ return err;
3764+
3765+- arp_packet = (struct arppkt *) nb.data;
3766+- arp_packet->hrd = grub_cpu_to_be16_compile_time (GRUB_NET_ARPHRD_ETHERNET);
3767+- arp_packet->hln = 6;
3768+- arp_packet->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP);
3769+- arp_packet->pln = 4;
3770+- arp_packet->op = grub_cpu_to_be16_compile_time (ARP_REQUEST);
3771+- /* Sender hardware address. */
3772+- grub_memcpy (arp_packet->sender_mac, &inf->hwaddress.mac, 6);
3773+- arp_packet->sender_ip = inf->address.ipv4;
3774+- grub_memset (arp_packet->recv_mac, 0, 6);
3775+- arp_packet->recv_ip = proto_addr->ipv4;
3776+- /* Target protocol address */
3777+- grub_memset (&target_mac_addr.mac, 0xff, 6);
3778++ arp_header = (struct arphdr *) nb.data;
3779++ arp_header->hrd = grub_cpu_to_be16 (inf->card->default_address.type);
3780++ arp_header->hln = hln;
3781++ arp_header->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP);
3782++ arp_header->pln = pln;
3783++ arp_header->op = grub_cpu_to_be16_compile_time (ARP_REQUEST);
3784++ tmp_ptr = nb.data + sizeof (*arp_header);
3785++
3786++ /* The source hardware address. */
3787++ grub_memcpy (tmp_ptr, inf->hwaddress.mac, hln);
3788++ tmp_ptr += hln;
3789++
3790++ /* The source protocol address. */
3791++ grub_memcpy (tmp_ptr, &inf->address.ipv4, pln);
3792++ tmp_ptr += pln;
3793++
3794++ /* The target hardware address. */
3795++ grub_memset (tmp_ptr, 0, hln);
3796++ tmp_ptr += hln;
3797++
3798++ /* The target protocol address */
3799++ grub_memcpy (tmp_ptr, &proto_addr->ipv4, pln);
3800++ tmp_ptr += pln;
3801++
3802++ grub_memset (&target_mac_addr.mac, 0xff, hln);
3803+
3804+ nbd = nb.data;
3805+ send_ethernet_packet (inf, &nb, target_mac_addr, GRUB_NET_ETHERTYPE_ARP);
3806+@@ -114,28 +124,53 @@ grub_err_t
3807+ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
3808+ grub_uint16_t *vlantag)
3809+ {
3810+- struct arppkt *arp_packet = (struct arppkt *) nb->data;
3811++ struct arphdr *arp_header = (struct arphdr *) nb->data;
3812+ grub_net_network_level_address_t sender_addr, target_addr;
3813+ grub_net_link_level_address_t sender_mac_addr;
3814+ struct grub_net_network_level_interface *inf;
3815+-
3816+- if (arp_packet->pro != grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP)
3817+- || arp_packet->pln != 4 || arp_packet->hln != 6
3818+- || nb->tail - nb->data < (int) sizeof (*arp_packet))
3819++ grub_uint16_t hw_type;
3820++ grub_uint8_t hln;
3821++ grub_uint8_t pln;
3822++ grub_uint8_t arp_packet_len;
3823++ grub_uint8_t *tmp_ptr;
3824++
3825++ hw_type = card->default_address.type;
3826++ hln = card->default_address.len;
3827++ pln = sizeof(sender_addr.ipv4);
3828++ arp_packet_len = sizeof (*arp_header) + 2 * (pln + hln);
3829++
3830++ if (arp_header->pro != grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP)
3831++ || arp_header->hrd != grub_cpu_to_be16 (hw_type)
3832++ || arp_header->hln != hln || arp_header->pln != pln
3833++ || nb->tail - nb->data < (int) arp_packet_len) {
3834+ return GRUB_ERR_NONE;
3835++ }
3836+
3837++ tmp_ptr = nb->data + sizeof (*arp_header);
3838++
3839++ /* The source hardware address. */
3840++ sender_mac_addr.type = hw_type;
3841++ sender_mac_addr.len = hln;
3842++ grub_memcpy (sender_mac_addr.mac, tmp_ptr, hln);
3843++ tmp_ptr += hln;
3844++
3845++ /* The source protocol address. */
3846+ sender_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
3847+- target_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
3848+- sender_addr.ipv4 = arp_packet->sender_ip;
3849+- target_addr.ipv4 = arp_packet->recv_ip;
3850+- if (arp_packet->sender_ip == pending_req)
3851+- have_pending = 1;
3852++ grub_memcpy(&sender_addr.ipv4, tmp_ptr, pln);
3853++ tmp_ptr += pln;
3854+
3855+- sender_mac_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
3856+- grub_memcpy (sender_mac_addr.mac, arp_packet->sender_mac,
3857+- sizeof (sender_mac_addr.mac));
3858+ grub_net_link_layer_add_address (card, &sender_addr, &sender_mac_addr, 1);
3859+
3860++ /* The target hardware address. */
3861++ tmp_ptr += hln;
3862++
3863++ /* The target protocol address. */
3864++ target_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
3865++ grub_memcpy(&target_addr.ipv4, tmp_ptr, pln);
3866++
3867++ if (sender_addr.ipv4 == pending_req)
3868++ have_pending = 1;
3869++
3870+ FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
3871+ {
3872+ /* Verify vlantag id */
3873+@@ -148,11 +183,11 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
3874+
3875+ /* Am I the protocol address target? */
3876+ if (grub_net_addr_cmp (&inf->address, &target_addr) == 0
3877+- && arp_packet->op == grub_cpu_to_be16_compile_time (ARP_REQUEST))
3878++ && arp_header->op == grub_cpu_to_be16_compile_time (ARP_REQUEST))
3879+ {
3880+ grub_net_link_level_address_t target;
3881+ struct grub_net_buff nb_reply;
3882+- struct arppkt *arp_reply;
3883++ struct arphdr *arp_reply;
3884+ grub_uint8_t arp_data[128];
3885+ grub_err_t err;
3886+
3887+@@ -161,25 +196,39 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
3888+ grub_netbuff_clear (&nb_reply);
3889+ grub_netbuff_reserve (&nb_reply, 128);
3890+
3891+- err = grub_netbuff_push (&nb_reply, sizeof (*arp_packet));
3892++ err = grub_netbuff_push (&nb_reply, arp_packet_len);
3893+ if (err)
3894+ return err;
3895+
3896+- arp_reply = (struct arppkt *) nb_reply.data;
3897++ arp_reply = (struct arphdr *) nb_reply.data;
3898+
3899+- arp_reply->hrd = grub_cpu_to_be16_compile_time (GRUB_NET_ARPHRD_ETHERNET);
3900++ arp_reply->hrd = grub_cpu_to_be16 (hw_type);
3901+ arp_reply->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP);
3902+- arp_reply->pln = 4;
3903+- arp_reply->hln = 6;
3904++ arp_reply->pln = pln;
3905++ arp_reply->hln = hln;
3906+ arp_reply->op = grub_cpu_to_be16_compile_time (ARP_REPLY);
3907+- arp_reply->sender_ip = arp_packet->recv_ip;
3908+- arp_reply->recv_ip = arp_packet->sender_ip;
3909+- arp_reply->hln = 6;
3910+-
3911+- target.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
3912+- grub_memcpy (target.mac, arp_packet->sender_mac, 6);
3913+- grub_memcpy (arp_reply->sender_mac, inf->hwaddress.mac, 6);
3914+- grub_memcpy (arp_reply->recv_mac, arp_packet->sender_mac, 6);
3915++
3916++ tmp_ptr = nb_reply.data + sizeof (*arp_reply);
3917++
3918++ /* The source hardware address. */
3919++ grub_memcpy (tmp_ptr, inf->hwaddress.mac, hln);
3920++ tmp_ptr += hln;
3921++
3922++ /* The source protocol address. */
3923++ grub_memcpy (tmp_ptr, &target_addr.ipv4, pln);
3924++ tmp_ptr += pln;
3925++
3926++ /* The target hardware address. */
3927++ grub_memcpy (tmp_ptr, sender_mac_addr.mac, hln);
3928++ tmp_ptr += hln;
3929++
3930++ /* The target protocol address */
3931++ grub_memcpy (tmp_ptr, &sender_addr.ipv4, pln);
3932++ tmp_ptr += pln;
3933++
3934++ target.type = hw_type;
3935++ target.len = hln;
3936++ grub_memcpy (target.mac, sender_mac_addr.mac, hln);
3937+
3938+ /* Change operation to REPLY and send packet */
3939+ send_ethernet_packet (inf, &nb_reply, target, GRUB_NET_ETHERTYPE_ARP);
3940+diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
3941+index dd0ffcdaea..233af56bcd 100644
3942+--- a/grub-core/net/bootp.c
3943++++ b/grub-core/net/bootp.c
3944+@@ -314,7 +314,6 @@ grub_net_configure_by_dhcp_ack (const char *name,
3945+ int is_def, char **device, char **path)
3946+ {
3947+ grub_net_network_level_address_t addr;
3948+- grub_net_link_level_address_t hwaddr;
3949+ struct grub_net_network_level_interface *inter;
3950+ int mask = -1;
3951+ char server_ip[sizeof ("xxx.xxx.xxx.xxx")];
3952+@@ -331,12 +330,8 @@ grub_net_configure_by_dhcp_ack (const char *name,
3953+ if (path)
3954+ *path = 0;
3955+
3956+- grub_memcpy (hwaddr.mac, bp->mac_addr,
3957+- bp->hw_len < sizeof (hwaddr.mac) ? bp->hw_len
3958+- : sizeof (hwaddr.mac));
3959+- hwaddr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
3960+-
3961+- inter = grub_net_add_addr (name, card, &addr, &hwaddr, flags);
3962++ grub_dprintf("dhcp", "configuring dhcp for %s\n", name);
3963++ inter = grub_net_add_addr (name, card, &addr, &card->default_address, flags);
3964+ if (!inter)
3965+ return 0;
3966+
3967+@@ -673,7 +668,9 @@ send_dhcp_packet (struct grub_net_network_level_interface *iface)
3968+ grub_memset (pack, 0, sizeof (*pack));
3969+ pack->opcode = 1;
3970+ pack->hw_type = 1;
3971+- pack->hw_len = 6;
3972++ pack->hw_len = iface->hwaddress.len > 16 ? 0
3973++ : iface->hwaddress.len;
3974++
3975+ err = grub_get_datetime (&date);
3976+ if (err || !grub_datetime2unixtime (&date, &t))
3977+ {
3978+@@ -686,7 +683,7 @@ send_dhcp_packet (struct grub_net_network_level_interface *iface)
3979+ else
3980+ pack->ident = iface->xid;
3981+
3982+- grub_memcpy (&pack->mac_addr, &iface->hwaddress.mac, 6);
3983++ grub_memcpy (&pack->mac_addr, &iface->hwaddress.mac, pack->hw_len);
3984+
3985+ grub_netbuff_push (nb, sizeof (*udph));
3986+
3987+diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
3988+index 82a28fb6e9..e771364045 100644
3989+--- a/grub-core/net/drivers/efi/efinet.c
3990++++ b/grub-core/net/drivers/efi/efinet.c
3991+@@ -279,6 +279,9 @@ grub_efinet_findcards (void)
3992+ /* This should not happen... Why? */
3993+ continue;
3994+
3995++ if (net->mode->hwaddr_size > GRUB_NET_MAX_LINK_ADDRESS_SIZE)
3996++ continue;
3997++
3998+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
3999+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
4000+ continue;
4001+@@ -315,10 +318,11 @@ grub_efinet_findcards (void)
4002+ card->name = grub_xasprintf ("efinet%d", i++);
4003+ card->driver = &efidriver;
4004+ card->flags = 0;
4005+- card->default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4006++ card->default_address.type = net->mode->if_type;
4007++ card->default_address.len = net->mode->hwaddr_size;
4008+ grub_memcpy (card->default_address.mac,
4009+ net->mode->current_address,
4010+- sizeof (card->default_address.mac));
4011++ net->mode->hwaddr_size);
4012+ card->efi_net = net;
4013+ card->efi_handle = *handle;
4014+
4015+diff --git a/grub-core/net/drivers/emu/emunet.c b/grub-core/net/drivers/emu/emunet.c
4016+index b194920861..5b6c5e16a6 100644
4017+--- a/grub-core/net/drivers/emu/emunet.c
4018++++ b/grub-core/net/drivers/emu/emunet.c
4019+@@ -46,6 +46,7 @@ static struct grub_net_card emucard =
4020+ .mtu = 1500,
4021+ .default_address = {
4022+ .type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET,
4023++ . len = 6,
4024+ {.mac = {0, 1, 2, 3, 4, 5}}
4025+ },
4026+ .flags = 0
4027+diff --git a/grub-core/net/drivers/i386/pc/pxe.c b/grub-core/net/drivers/i386/pc/pxe.c
4028+index 3f4152d036..9f8fb4b6d2 100644
4029+--- a/grub-core/net/drivers/i386/pc/pxe.c
4030++++ b/grub-core/net/drivers/i386/pc/pxe.c
4031+@@ -386,20 +386,21 @@ GRUB_MOD_INIT(pxe)
4032+ grub_memset (ui, 0, sizeof (*ui));
4033+ grub_pxe_call (GRUB_PXENV_UNDI_GET_INFORMATION, ui, pxe_rm_entry);
4034+
4035++ grub_pxe_card.default_address.len = 6;
4036+ grub_memcpy (grub_pxe_card.default_address.mac, ui->current_addr,
4037+- sizeof (grub_pxe_card.default_address.mac));
4038+- for (i = 0; i < sizeof (grub_pxe_card.default_address.mac); i++)
4039++ grub_pxe_card.default_address.len);
4040++ for (i = 0; i < grub_pxe_card.default_address.len; i++)
4041+ if (grub_pxe_card.default_address.mac[i] != 0)
4042+ break;
4043+- if (i != sizeof (grub_pxe_card.default_address.mac))
4044++ if (i != grub_pxe_card.default_address.len)
4045+ {
4046+- for (i = 0; i < sizeof (grub_pxe_card.default_address.mac); i++)
4047++ for (i = 0; i < grub_pxe_card.default_address.len; i++)
4048+ if (grub_pxe_card.default_address.mac[i] != 0xff)
4049+ break;
4050+ }
4051+- if (i == sizeof (grub_pxe_card.default_address.mac))
4052++ if (i == grub_pxe_card.default_address.len)
4053+ grub_memcpy (grub_pxe_card.default_address.mac, ui->permanent_addr,
4054+- sizeof (grub_pxe_card.default_address.mac));
4055++ grub_pxe_card.default_address.len);
4056+ grub_pxe_card.mtu = ui->mtu;
4057+
4058+ grub_pxe_card.default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4059+diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
4060+index ac4e62a95c..057ba85973 100644
4061+--- a/grub-core/net/drivers/ieee1275/ofnet.c
4062++++ b/grub-core/net/drivers/ieee1275/ofnet.c
4063+@@ -160,6 +160,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
4064+ grub_uint16_t vlantag = 0;
4065+
4066+ hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4067++ hw_addr.len = 6;
4068+
4069+ args = bootpath + grub_strlen (devpath) + 1;
4070+ do
4071+@@ -504,6 +505,7 @@ search_net_devices (struct grub_ieee1275_devalias *alias)
4072+ grub_memcpy (&lla.mac, pprop, 6);
4073+
4074+ lla.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4075++ lla.len = 6;
4076+ card->default_address = lla;
4077+
4078+ card->txbufsize = ALIGN_UP (card->mtu, 64) + 256;
4079+diff --git a/grub-core/net/drivers/uboot/ubootnet.c b/grub-core/net/drivers/uboot/ubootnet.c
4080+index 056052e40d..22ebcbf211 100644
4081+--- a/grub-core/net/drivers/uboot/ubootnet.c
4082++++ b/grub-core/net/drivers/uboot/ubootnet.c
4083+@@ -131,6 +131,7 @@ GRUB_MOD_INIT (ubootnet)
4084+
4085+ grub_memcpy (&(card->default_address.mac), &devinfo->di_net.hwaddr, 6);
4086+ card->default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4087++ card->default_address.len = 6;
4088+
4089+ card->txbufsize = ALIGN_UP (card->mtu, 64) + 256;
4090+ card->txbuf = grub_zalloc (card->txbufsize);
4091+diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
4092+index 4d7ceed6f9..9aae83a5eb 100644
4093+--- a/grub-core/net/ethernet.c
4094++++ b/grub-core/net/ethernet.c
4095+@@ -29,13 +29,6 @@
4096+
4097+ #define LLCADDRMASK 0x7f
4098+
4099+-struct etherhdr
4100+-{
4101+- grub_uint8_t dst[6];
4102+- grub_uint8_t src[6];
4103+- grub_uint16_t type;
4104+-} GRUB_PACKED;
4105+-
4106+ struct llchdr
4107+ {
4108+ grub_uint8_t dsap;
4109+@@ -55,13 +48,15 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
4110+ grub_net_link_level_address_t target_addr,
4111+ grub_net_ethertype_t ethertype)
4112+ {
4113+- struct etherhdr *eth;
4114++ grub_uint8_t *eth;
4115+ grub_err_t err;
4116+- grub_uint8_t etherhdr_size;
4117+- grub_uint16_t vlantag_id = VLANTAG_IDENTIFIER;
4118++ grub_uint32_t vlantag = 0;
4119++ grub_uint8_t hw_addr_len = inf->card->default_address.len;
4120++ grub_uint8_t etherhdr_size = 2 * hw_addr_len + 2;
4121+
4122+- etherhdr_size = sizeof (*eth);
4123+- COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE);
4124++ /* Source and destination link addresses + ethertype + vlan tag */
4125++ COMPILE_TIME_ASSERT ((GRUB_NET_MAX_LINK_ADDRESS_SIZE * 2 + 2 + 4) <
4126++ GRUB_NET_MAX_LINK_HEADER_SIZE);
4127+
4128+ /* Increase ethernet header in case of vlantag */
4129+ if (inf->vlantag != 0)
4130+@@ -70,11 +65,22 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
4131+ err = grub_netbuff_push (nb, etherhdr_size);
4132+ if (err)
4133+ return err;
4134+- eth = (struct etherhdr *) nb->data;
4135+- grub_memcpy (eth->dst, target_addr.mac, 6);
4136+- grub_memcpy (eth->src, inf->hwaddress.mac, 6);
4137++ eth = nb->data;
4138++ grub_memcpy (eth, target_addr.mac, hw_addr_len);
4139++ eth += hw_addr_len;
4140++ grub_memcpy (eth, inf->hwaddress.mac, hw_addr_len);
4141++ eth += hw_addr_len;
4142++
4143++ /* Check if a vlan-tag is present. */
4144++ if (vlantag != 0)
4145++ {
4146++ *((grub_uint32_t *)eth) = grub_cpu_to_be32 (vlantag);
4147++ eth += sizeof (vlantag);
4148++ }
4149++
4150++ /* Write ethertype */
4151++ *((grub_uint16_t*) eth) = grub_cpu_to_be16 (ethertype);
4152+
4153+- eth->type = grub_cpu_to_be16 (ethertype);
4154+ if (!inf->card->opened)
4155+ {
4156+ err = GRUB_ERR_NONE;
4157+@@ -85,18 +91,6 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
4158+ inf->card->opened = 1;
4159+ }
4160+
4161+- /* Check and add a vlan-tag if needed. */
4162+- if (inf->vlantag != 0)
4163+- {
4164+- /* Move eth type to the right */
4165+- grub_memcpy ((char *) nb->data + etherhdr_size - 2,
4166+- (char *) nb->data + etherhdr_size - 6, 2);
4167+-
4168+- /* Add the tag in the middle */
4169+- grub_memcpy ((char *) nb->data + etherhdr_size - 6, &vlantag_id, 2);
4170+- grub_memcpy ((char *) nb->data + etherhdr_size - 4, (char *) &(inf->vlantag), 2);
4171+- }
4172+-
4173+ return inf->card->driver->send (inf->card, nb);
4174+ }
4175+
4176+@@ -104,31 +98,40 @@ grub_err_t
4177+ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
4178+ struct grub_net_card *card)
4179+ {
4180+- struct etherhdr *eth;
4181++ grub_uint8_t *eth;
4182+ struct llchdr *llch;
4183+ struct snaphdr *snaph;
4184+ grub_net_ethertype_t type;
4185+ grub_net_link_level_address_t hwaddress;
4186+ grub_net_link_level_address_t src_hwaddress;
4187+ grub_err_t err;
4188+- grub_uint8_t etherhdr_size = sizeof (*eth);
4189++ grub_uint8_t hw_addr_len = card->default_address.len;
4190++ grub_uint8_t etherhdr_size = 2 * hw_addr_len + 2;
4191+ grub_uint16_t vlantag = 0;
4192+
4193++ eth = nb->data;
4194+
4195+- /* Check if a vlan-tag is present. If so, the ethernet header is 4 bytes */
4196+- /* longer than the original one. The vlantag id is extracted and the header */
4197+- /* is reseted to the original size. */
4198+- if (grub_get_unaligned16 (nb->data + etherhdr_size - 2) == VLANTAG_IDENTIFIER)
4199++ hwaddress.type = card->default_address.type;
4200++ hwaddress.len = hw_addr_len;
4201++ grub_memcpy (hwaddress.mac, eth, hw_addr_len);
4202++ eth += hw_addr_len;
4203++
4204++ src_hwaddress.type = card->default_address.type;
4205++ src_hwaddress.len = hw_addr_len;
4206++ grub_memcpy (src_hwaddress.mac, eth, hw_addr_len);
4207++ eth += hw_addr_len;
4208++
4209++ type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4210++ if (type == VLANTAG_IDENTIFIER)
4211+ {
4212+- vlantag = grub_get_unaligned16 (nb->data + etherhdr_size);
4213++ /* Skip vlan tag */
4214++ eth += 2;
4215++ vlantag = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4216+ etherhdr_size += 4;
4217+- /* Move eth type to the original position */
4218+- grub_memcpy((char *) nb->data + etherhdr_size - 6,
4219+- (char *) nb->data + etherhdr_size - 2, 2);
4220++ eth += 2;
4221++ type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4222+ }
4223+
4224+- eth = (struct etherhdr *) nb->data;
4225+- type = grub_be_to_cpu16 (eth->type);
4226+ err = grub_netbuff_pull (nb, etherhdr_size);
4227+ if (err)
4228+ return err;
4229+@@ -148,11 +151,6 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
4230+ }
4231+ }
4232+
4233+- hwaddress.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4234+- grub_memcpy (hwaddress.mac, eth->dst, sizeof (hwaddress.mac));
4235+- src_hwaddress.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4236+- grub_memcpy (src_hwaddress.mac, eth->src, sizeof (src_hwaddress.mac));
4237+-
4238+ switch (type)
4239+ {
4240+ /* ARP packet. */
4241+diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
4242+index 2cbd95dce2..56a3ec5c8e 100644
4243+--- a/grub-core/net/icmp6.c
4244++++ b/grub-core/net/icmp6.c
4245+@@ -231,8 +231,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
4246+ && ohdr->len == 1)
4247+ {
4248+ grub_net_link_level_address_t ll_address;
4249+- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4250+- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac));
4251++ ll_address.type = card->default_address.type;
4252++ ll_address.len = card->default_address.len;
4253++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len);
4254+ grub_net_link_layer_add_address (card, source, &ll_address, 0);
4255+ }
4256+ }
4257+@@ -335,8 +336,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
4258+ && ohdr->len == 1)
4259+ {
4260+ grub_net_link_level_address_t ll_address;
4261+- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4262+- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac));
4263++ ll_address.type = card->default_address.type;
4264++ ll_address.len = card->default_address.len;
4265++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len);
4266+ grub_net_link_layer_add_address (card, source, &ll_address, 0);
4267+ }
4268+ }
4269+@@ -384,8 +386,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
4270+ && ohdr->len == 1)
4271+ {
4272+ grub_net_link_level_address_t ll_address;
4273+- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4274+- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac));
4275++ ll_address.type = card->default_address.type;
4276++ ll_address.len = card->default_address.len;
4277++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len);
4278+ grub_net_link_layer_add_address (card, source, &ll_address, 0);
4279+ }
4280+ if (ohdr->type == OPTION_PREFIX && ohdr->len == 4)
4281+diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
4282+index 01410798b3..ce6bdc75c6 100644
4283+--- a/grub-core/net/ip.c
4284++++ b/grub-core/net/ip.c
4285+@@ -315,8 +315,8 @@ handle_dgram (struct grub_net_buff *nb,
4286+ if (inf->card == card
4287+ && inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV
4288+ && inf->hwaddress.type == GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET
4289+- && grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr,
4290+- sizeof (inf->hwaddress.mac)) == 0)
4291++ && (grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr,
4292++ bootp->hw_len) == 0 || bootp->hw_len == 0))
4293+ {
4294+ grub_net_process_dhcp (nb, inf);
4295+ grub_netbuff_free (nb);
4296+diff --git a/grub-core/net/net.c b/grub-core/net/net.c
4297+index fed7bc57cb..cdae1fe398 100644
4298+--- a/grub-core/net/net.c
4299++++ b/grub-core/net/net.c
4300+@@ -128,8 +128,9 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
4301+ << 48)
4302+ && proto_addr->ipv6[1] == (grub_be_to_cpu64_compile_time (1))))
4303+ {
4304+- hw_addr->type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4305+- grub_memset (hw_addr->mac, -1, 6);
4306++ hw_addr->type = inf->card->default_address.type;
4307++ hw_addr->len = inf->card->default_address.len;
4308++ grub_memset (hw_addr->mac, -1, hw_addr->len);
4309+ return GRUB_ERR_NONE;
4310+ }
4311+
4312+@@ -137,6 +138,7 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
4313+ && ((grub_be_to_cpu64 (proto_addr->ipv6[0]) >> 56) == 0xff))
4314+ {
4315+ hw_addr->type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
4316++ hw_addr->len = inf->card->default_address.len;
4317+ hw_addr->mac[0] = 0x33;
4318+ hw_addr->mac[1] = 0x33;
4319+ hw_addr->mac[2] = ((grub_be_to_cpu64 (proto_addr->ipv6[1]) >> 24) & 0xff);
4320+@@ -766,23 +768,23 @@ grub_net_addr_to_str (const grub_net_network_level_address_t *target, char *buf)
4321+ void
4322+ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str)
4323+ {
4324+- str[0] = 0;
4325+- switch (addr->type)
4326++ char *ptr;
4327++ unsigned i;
4328++ int maxstr;
4329++
4330++ if (addr->len > GRUB_NET_MAX_LINK_ADDRESS_SIZE)
4331+ {
4332+- case GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET:
4333+- {
4334+- char *ptr;
4335+- unsigned i;
4336+- for (ptr = str, i = 0; i < ARRAY_SIZE (addr->mac); i++)
4337+- {
4338+- grub_snprintf (ptr, GRUB_NET_MAX_STR_HWADDR_LEN - (ptr - str),
4339+- "%02x:", addr->mac[i] & 0xff);
4340+- ptr += (sizeof ("XX:") - 1);
4341+- }
4342+- return;
4343+- }
4344++ str[0] = 0;
4345++ grub_printf (_("Unsupported hw address type %d len %d\n"),
4346++ addr->type, addr->len);
4347++ return;
4348++ }
4349++ maxstr = addr->len * grub_strlen ("XX:");
4350++ for (ptr = str, i = 0; i < addr->len; i++)
4351++ {
4352++ ptr += grub_snprintf (ptr, maxstr - (ptr - str),
4353++ "%02x:", addr->mac[i] & 0xff);
4354+ }
4355+- grub_printf (_("Unsupported hw address type %d\n"), addr->type);
4356+ }
4357+
4358+ int
4359+@@ -793,13 +795,17 @@ grub_net_hwaddr_cmp (const grub_net_link_level_address_t *a,
4360+ return -1;
4361+ if (a->type > b->type)
4362+ return +1;
4363+- switch (a->type)
4364++ if (a->len < b->len)
4365++ return -1;
4366++ if (a->len > b->len)
4367++ return +1;
4368++ if (a->len > GRUB_NET_MAX_LINK_ADDRESS_SIZE)
4369+ {
4370+- case GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET:
4371+- return grub_memcmp (a->mac, b->mac, sizeof (a->mac));
4372++ grub_printf (_("Unsupported hw address type %d len %d\n"),
4373++ a->type, a->len);
4374++ return + 1;
4375+ }
4376+- grub_printf (_("Unsupported hw address type %d\n"), a->type);
4377+- return 1;
4378++ return grub_memcmp (a->mac, b->mac, a->len);
4379+ }
4380+
4381+ int
4382+diff --git a/include/grub/net.h b/include/grub/net.h
4383+index b5f9e617e5..66375af068 100644
4384+--- a/include/grub/net.h
4385++++ b/include/grub/net.h
4386+@@ -29,7 +29,8 @@
4387+
4388+ enum
4389+ {
4390+- GRUB_NET_MAX_LINK_HEADER_SIZE = 64,
4391++ GRUB_NET_MAX_LINK_HEADER_SIZE = 96,
4392++ GRUB_NET_MAX_LINK_ADDRESS_SIZE = 32,
4393+ GRUB_NET_UDP_HEADER_SIZE = 8,
4394+ GRUB_NET_TCP_HEADER_SIZE = 20,
4395+ GRUB_NET_OUR_IPV4_HEADER_SIZE = 20,
4396+@@ -42,15 +43,17 @@ enum
4397+
4398+ typedef enum grub_link_level_protocol_id
4399+ {
4400+- GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET
4401++ /* IANA ARP constant to define hardware type. */
4402++ GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET = 1,
4403+ } grub_link_level_protocol_id_t;
4404+
4405+ typedef struct grub_net_link_level_address
4406+ {
4407+ grub_link_level_protocol_id_t type;
4408++ grub_uint8_t len;
4409+ union
4410+ {
4411+- grub_uint8_t mac[6];
4412++ grub_uint8_t mac[GRUB_NET_MAX_LINK_ADDRESS_SIZE];
4413+ };
4414+ } grub_net_link_level_address_t;
4415+
4416+@@ -578,11 +581,13 @@ grub_net_addr_cmp (const grub_net_network_level_address_t *a,
4417+ #define GRUB_NET_MAX_STR_ADDR_LEN sizeof ("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX")
4418+
4419+ /*
4420+- Currently suppoerted adresses:
4421+- ethernet: XX:XX:XX:XX:XX:XX
4422++ Up to 32 byte hardware address supported, see GRUB_NET_MAX_LINK_ADDRESS_SIZE
4423+ */
4424+-
4425+-#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof ("XX:XX:XX:XX:XX:XX"))
4426++#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof (\
4427++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
4428++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
4429++ "XX:XX:XX:XX:XX:XX:XX:XX:"\
4430++ "XX:XX:XX:XX:XX:XX:XX:XX"))
4431+
4432+ void
4433+ grub_net_addr_to_str (const grub_net_network_level_address_t *target,
4434diff --git a/debian/patches/rhboot-f34-tcp-add-window-scaling-support.patch b/debian/patches/rhboot-f34-tcp-add-window-scaling-support.patch
4435new file mode 100644
4436index 0000000..5ae89a9
4437--- /dev/null
4438+++ b/debian/patches/rhboot-f34-tcp-add-window-scaling-support.patch
4439@@ -0,0 +1,90 @@
4440+From e236246964433c2acd448707bdcaf0197d97e69d Mon Sep 17 00:00:00 2001
4441+From: Josef Bacik <jbacik@fb.com>
4442+Date: Wed, 12 Aug 2015 08:57:55 -0700
4443+Subject: tcp: add window scaling support
4444+
4445+Sometimes we have to provision boxes across regions, such as California to
4446+Sweden. The http server has a 10 minute timeout, so if we can't get our 250mb
4447+image transferred fast enough our provisioning fails, which is not ideal. So
4448+add tcp window scaling on open connections and set the window size to 1mb. With
4449+this change we're able to get higher sustained transfers between regions and can
4450+transfer our image in well below 10 minutes. Without this patch we'd time out
4451+every time halfway through the transfer. Thanks,
4452+
4453+Signed-off-by: Josef Bacik <jbacik@fb.com>
4454+(cherry picked from commit 995d66fc218e3ddd852269753be0ebd71b72174f)
4455+
4456+Patch-Name: rhboot-f34-tcp-add-window-scaling-support.patch
4457+---
4458+ grub-core/net/tcp.c | 42 +++++++++++++++++++++++++++++-------------
4459+ 1 file changed, 29 insertions(+), 13 deletions(-)
4460+
4461+diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c
4462+index e8ad34b84d..7d4b822626 100644
4463+--- a/grub-core/net/tcp.c
4464++++ b/grub-core/net/tcp.c
4465+@@ -106,6 +106,18 @@ struct tcphdr
4466+ grub_uint16_t urgent;
4467+ } GRUB_PACKED;
4468+
4469++struct tcp_scale_opt {
4470++ grub_uint8_t kind;
4471++ grub_uint8_t length;
4472++ grub_uint8_t scale;
4473++} GRUB_PACKED;
4474++
4475++struct tcp_synhdr {
4476++ struct tcphdr tcphdr;
4477++ struct tcp_scale_opt scale_opt;
4478++ grub_uint8_t padding;
4479++};
4480++
4481+ struct tcp_pseudohdr
4482+ {
4483+ grub_uint32_t src;
4484+@@ -566,7 +578,7 @@ grub_net_tcp_open (char *server,
4485+ grub_net_tcp_socket_t socket;
4486+ static grub_uint16_t in_port = 21550;
4487+ struct grub_net_buff *nb;
4488+- struct tcphdr *tcph;
4489++ struct tcp_synhdr *tcph;
4490+ int i;
4491+ grub_uint8_t *nbd;
4492+ grub_net_link_level_address_t ll_target_addr;
4493+@@ -635,20 +647,24 @@ grub_net_tcp_open (char *server,
4494+ }
4495+
4496+ tcph = (void *) nb->data;
4497++ grub_memset(tcph, 0, sizeof (*tcph));
4498+ socket->my_start_seq = grub_get_time_ms ();
4499+ socket->my_cur_seq = socket->my_start_seq + 1;
4500+- socket->my_window = 8192;
4501+- tcph->seqnr = grub_cpu_to_be32 (socket->my_start_seq);
4502+- tcph->ack = grub_cpu_to_be32_compile_time (0);
4503+- tcph->flags = grub_cpu_to_be16_compile_time ((5 << 12) | TCP_SYN);
4504+- tcph->window = grub_cpu_to_be16 (socket->my_window);
4505+- tcph->urgent = 0;
4506+- tcph->src = grub_cpu_to_be16 (socket->in_port);
4507+- tcph->dst = grub_cpu_to_be16 (socket->out_port);
4508+- tcph->checksum = 0;
4509+- tcph->checksum = grub_net_ip_transport_checksum (nb, GRUB_NET_IP_TCP,
4510+- &socket->inf->address,
4511+- &socket->out_nla);
4512++ socket->my_window = 32768;
4513++ tcph->tcphdr.seqnr = grub_cpu_to_be32 (socket->my_start_seq);
4514++ tcph->tcphdr.ack = grub_cpu_to_be32_compile_time (0);
4515++ tcph->tcphdr.flags = grub_cpu_to_be16_compile_time ((6 << 12) | TCP_SYN);
4516++ tcph->tcphdr.window = grub_cpu_to_be16 (socket->my_window);
4517++ tcph->tcphdr.urgent = 0;
4518++ tcph->tcphdr.src = grub_cpu_to_be16 (socket->in_port);
4519++ tcph->tcphdr.dst = grub_cpu_to_be16 (socket->out_port);
4520++ tcph->tcphdr.checksum = 0;
4521++ tcph->scale_opt.kind = 3;
4522++ tcph->scale_opt.length = 3;
4523++ tcph->scale_opt.scale = 5;
4524++ tcph->tcphdr.checksum = grub_net_ip_transport_checksum (nb, GRUB_NET_IP_TCP,
4525++ &socket->inf->address,
4526++ &socket->out_nla);
4527+
4528+ tcp_socket_register (socket);
4529+
4530diff --git a/debian/patches/series b/debian/patches/series
4531index fb45477..07193df 100644
4532--- a/debian/patches/series
4533+++ b/debian/patches/series
4534@@ -112,3 +112,11 @@ ubuntu-dejavu-font-path.patch
4535 ubuntu-linuxefi-arm64-set-base-addr.patch
4536 tftp-rollover-block-counter.patch
4537 ubuntu-add-initrd-less-boot-messages.patch
4538+ubuntu-fix-reproducible-squashfs-test.patch
4539+rhboot-f34-make-exit-take-a-return-code.patch
4540+rhboot-f34-dont-use-int-for-efi-status.patch
4541+rhboot-f34-tcp-add-window-scaling-support.patch
4542+rhboot-f34-support-non-ethernet.patch
4543+ubuntu-fixup-rhboot-f34-support-non-ethernet.patch
4544+ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch
4545+rhboot-f34-make-pmtimer-tsc-calibration-fast.patch
4546diff --git a/debian/patches/skip-grub_cmd_set_date.patch b/debian/patches/skip-grub_cmd_set_date.patch
4547index d5ba8ef..6aa97f4 100644
4548--- a/debian/patches/skip-grub_cmd_set_date.patch
4549+++ b/debian/patches/skip-grub_cmd_set_date.patch
4550@@ -12,7 +12,7 @@ Patch-Name: skip-grub_cmd_set_date.patch
4551 1 file changed, 3 insertions(+)
4552
4553 diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
4554-index aac120a6c..1bb5be4ca 100644
4555+index aac120a6c5..1bb5be4ca7 100644
4556 --- a/tests/grub_cmd_set_date.in
4557 +++ b/tests/grub_cmd_set_date.in
4558 @@ -1,6 +1,9 @@
4559diff --git a/debian/patches/sleep-shift.patch b/debian/patches/sleep-shift.patch
4560index bb0f0a3..9d1aae3 100644
4561--- a/debian/patches/sleep-shift.patch
4562+++ b/debian/patches/sleep-shift.patch
4563@@ -17,7 +17,7 @@ Patch-Name: sleep-shift.patch
4564 2 files changed, 45 insertions(+), 1 deletion(-)
4565
4566 diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c
4567-index e77e7900f..3906b1410 100644
4568+index e77e7900fa..3906b14103 100644
4569 --- a/grub-core/commands/sleep.c
4570 +++ b/grub-core/commands/sleep.c
4571 @@ -46,6 +46,31 @@ do_print (int n)
4572@@ -62,7 +62,7 @@ index e77e7900f..3906b1410 100644
4573
4574 return 0;
4575 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
4576-index d5e0c79a7..3611ee9ea 100644
4577+index d5e0c79a70..3611ee9ea7 100644
4578 --- a/grub-core/normal/menu.c
4579 +++ b/grub-core/normal/menu.c
4580 @@ -615,8 +615,27 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
4581diff --git a/debian/patches/tftp-rollover-block-counter.patch b/debian/patches/tftp-rollover-block-counter.patch
4582index d172a63..5aad7b0 100644
4583--- a/debian/patches/tftp-rollover-block-counter.patch
4584+++ b/debian/patches/tftp-rollover-block-counter.patch
4585@@ -49,7 +49,7 @@ Patch-Name: tftp-rollover-block-counter.patch
4586 1 file changed, 14 insertions(+), 3 deletions(-)
4587
4588 diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
4589-index e6566fa17..33c0b8214 100644
4590+index e6566fa176..33c0b8214e 100644
4591 --- a/grub-core/net/tftp.c
4592 +++ b/grub-core/net/tftp.c
4593 @@ -183,11 +183,22 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
4594diff --git a/debian/patches/ubuntu-add-devicetree-command-support.patch b/debian/patches/ubuntu-add-devicetree-command-support.patch
4595index 2b28d0a..aa41aba 100644
4596--- a/debian/patches/ubuntu-add-devicetree-command-support.patch
4597+++ b/debian/patches/ubuntu-add-devicetree-command-support.patch
4598@@ -14,7 +14,7 @@ Patch-Name: ubuntu-add-devicetree-command-support.patch
4599 1 file changed, 19 insertions(+)
4600
4601 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
4602-index af1e096bd..bbf5d73e3 100644
4603+index af1e096bd6..bbf5d73e39 100644
4604 --- a/util/grub.d/10_linux.in
4605 +++ b/util/grub.d/10_linux.in
4606 @@ -254,6 +254,17 @@ EOF
4607diff --git a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
4608index cf6d6bb..e734a87 100644
4609--- a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
4610+++ b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
4611@@ -19,7 +19,7 @@ Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch
4612 create mode 100644 grub-initrd-fallback.service
4613
4614 diff --git a/Makefile.am b/Makefile.am
4615-index 1f4bb9b8c..e6a220711 100644
4616+index 1f4bb9b8c5..e6a220711e 100644
4617 --- a/Makefile.am
4618 +++ b/Makefile.am
4619 @@ -473,6 +473,9 @@ ChangeLog: FORCE
4620@@ -33,7 +33,7 @@ index 1f4bb9b8c..e6a220711 100644
4621
4622 syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg
4623 diff --git a/configure.ac b/configure.ac
4624-index 883245553..1819188f9 100644
4625+index 883245553d..1819188f9f 100644
4626 --- a/configure.ac
4627 +++ b/configure.ac
4628 @@ -305,6 +305,16 @@ AC_SUBST(grubdirname)
4629@@ -55,7 +55,7 @@ index 883245553..1819188f9 100644
4630 #
4631 diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service
4632 new file mode 100644
4633-index 000000000..48778c9f7
4634+index 0000000000..48778c9f76
4635 --- /dev/null
4636 +++ b/grub-initrd-fallback.service
4637 @@ -0,0 +1,12 @@
4638@@ -72,7 +72,7 @@ index 000000000..48778c9f7
4639 +[Install]
4640 +WantedBy=multi-user.target rescue.target emergency.target
4641 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
4642-index b7135b655..2642f66c5 100644
4643+index b7135b655f..2642f66c59 100644
4644 --- a/util/grub.d/00_header.in
4645 +++ b/util/grub.d/00_header.in
4646 @@ -50,6 +50,18 @@ if [ -s \$prefix/grubenv ]; then
4647@@ -117,7 +117,7 @@ index b7135b655..2642f66c5 100644
4648 cat <<EOF
4649 function recordfail {
4650 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
4651-index aa9666e5a..af1e096bd 100644
4652+index aa9666e5ad..af1e096bd6 100644
4653 --- a/util/grub.d/10_linux.in
4654 +++ b/util/grub.d/10_linux.in
4655 @@ -118,6 +118,10 @@ if [ "$vt_handoff" = 1 ]; then
4656diff --git a/debian/patches/ubuntu-add-initrd-less-boot-messages.patch b/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
4657index 22baf95..45406ac 100644
4658--- a/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
4659+++ b/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
4660@@ -13,7 +13,7 @@ Patch-Name: ubuntu-add-initrd-less-boot-messages.patch
4661 1 file changed, 10 insertions(+)
4662
4663 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
4664-index 49e627228..47daf51ee 100644
4665+index 49e627228f..47daf51eed 100644
4666 --- a/util/grub.d/10_linux.in
4667 +++ b/util/grub.d/10_linux.in
4668 @@ -160,6 +160,12 @@ if [ "$vt_handoff" = 1 ]; then
4669diff --git a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
4670index e5ed41f..5e19f72 100644
4671--- a/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
4672+++ b/debian/patches/ubuntu-boot-from-multipath-dependent-symlink.patch
4673@@ -16,7 +16,7 @@ Patch-Name: ubuntu-boot-from-multipath-dependent-symlink.patch
4674 1 file changed, 41 insertions(+)
4675
4676 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
4677-index bbf5d73e3..14a89ba13 100644
4678+index bbf5d73e39..14a89ba13d 100644
4679 --- a/util/grub.d/10_linux.in
4680 +++ b/util/grub.d/10_linux.in
4681 @@ -65,6 +65,47 @@ esac
4682diff --git a/debian/patches/ubuntu-dejavu-font-path.patch b/debian/patches/ubuntu-dejavu-font-path.patch
4683index fdd7949..a6c3582 100644
4684--- a/debian/patches/ubuntu-dejavu-font-path.patch
4685+++ b/debian/patches/ubuntu-dejavu-font-path.patch
4686@@ -11,7 +11,7 @@ Patch-Name: ubuntu-dejavu-font-path.patch
4687 1 file changed, 1 insertion(+), 1 deletion(-)
4688
4689 diff --git a/configure.ac b/configure.ac
4690-index 6a88b9b0c..fae917102 100644
4691+index 6a88b9b0c0..fae9171022 100644
4692 --- a/configure.ac
4693 +++ b/configure.ac
4694 @@ -1671,7 +1671,7 @@ fi
4695diff --git a/debian/patches/ubuntu-dont-verify-loopback-images.patch b/debian/patches/ubuntu-dont-verify-loopback-images.patch
4696index 0e5caf5..d5a2a29 100644
4697--- a/debian/patches/ubuntu-dont-verify-loopback-images.patch
4698+++ b/debian/patches/ubuntu-dont-verify-loopback-images.patch
4699@@ -22,7 +22,7 @@ Patch-Name: ubuntu-dont-verify-loopback-images.patch
4700 1 file changed, 2 insertions(+), 1 deletion(-)
4701
4702 diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
4703-index ccb4b167c..210201d22 100644
4704+index ccb4b167cc..210201d22d 100644
4705 --- a/grub-core/disk/loopback.c
4706 +++ b/grub-core/disk/loopback.c
4707 @@ -86,7 +86,8 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
4708diff --git a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
4709index a562868..ecc94e8 100644
4710--- a/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
4711+++ b/debian/patches/ubuntu-efi-allow-loopmount-chainload.patch
4712@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-allow-loopmount-chainload.patch
4713 create mode 100644 include/grub/loopback.h
4714
4715 diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
4716-index cdf9123fa..ccb4b167c 100644
4717+index cdf9123fa5..ccb4b167cc 100644
4718 --- a/grub-core/disk/loopback.c
4719 +++ b/grub-core/disk/loopback.c
4720 @@ -21,20 +21,13 @@
4721@@ -41,7 +41,7 @@ index cdf9123fa..ccb4b167c 100644
4722 static unsigned long last_id = 0;
4723
4724 diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
4725-index ec80f415b..04e815c05 100644
4726+index ec80f415b8..04e815c052 100644
4727 --- a/grub-core/loader/efi/chainloader.c
4728 +++ b/grub-core/loader/efi/chainloader.c
4729 @@ -24,6 +24,7 @@
4730@@ -91,7 +91,7 @@ index ec80f415b..04e815c05 100644
4731
4732 diff --git a/include/grub/loopback.h b/include/grub/loopback.h
4733 new file mode 100644
4734-index 000000000..3b9a9e32e
4735+index 0000000000..3b9a9e32e8
4736 --- /dev/null
4737 +++ b/include/grub/loopback.h
4738 @@ -0,0 +1,30 @@
4739diff --git a/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch b/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
4740index a8a41c1..7d117b7 100644
4741--- a/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
4742+++ b/debian/patches/ubuntu-efi-console-set-text-mode-as-needed.patch
4743@@ -15,7 +15,7 @@ Patch-Name: ubuntu-efi-console-set-text-mode-as-needed.patch
4744 1 file changed, 45 insertions(+), 23 deletions(-)
4745
4746 diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
4747-index 4840cc59d..b61da7d0d 100644
4748+index 4840cc59d3..b61da7d0d0 100644
4749 --- a/grub-core/term/efi/console.c
4750 +++ b/grub-core/term/efi/console.c
4751 @@ -24,6 +24,11 @@
4752diff --git a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
4753index 6074c3e..66834d3 100644
4754--- a/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
4755+++ b/debian/patches/ubuntu-fix-lzma-decompressor-objcopy.patch
4756@@ -16,7 +16,7 @@ Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
4757 1 file changed, 1 insertion(+), 1 deletion(-)
4758
4759 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
4760-index 1731c53f0..33e75021d 100644
4761+index 1731c53f08..33e75021da 100644
4762 --- a/grub-core/Makefile.core.def
4763 +++ b/grub-core/Makefile.core.def
4764 @@ -547,7 +547,7 @@ image = {
4765diff --git a/debian/patches/ubuntu-fix-reproducible-squashfs-test.patch b/debian/patches/ubuntu-fix-reproducible-squashfs-test.patch
4766new file mode 100644
4767index 0000000..bdff56a
4768--- /dev/null
4769+++ b/debian/patches/ubuntu-fix-reproducible-squashfs-test.patch
4770@@ -0,0 +1,31 @@
4771+From 0be5ee2a020c2db7842352e05392d5223c1b3f17 Mon Sep 17 00:00:00 2001
4772+From: Dimitri John Ledkov <xnox@ubuntu.com>
4773+Date: Wed, 9 Dec 2020 16:07:10 +0000
4774+Subject: grub-fs-tester: Add compatibility with reproducible squashfs-tools
4775+ 4.4
4776+
4777+squashfs-tools 4.4 builds reproducible builds by default, when
4778+SOURCE_DATE_EPOCH is set. This is true during package built time for
4779+many Linux distributions. And causes the squashfs test case to fail.
4780+
4781+Patch-Name: ubuntu-fix-reproducible-squashfs-test.patch
4782+Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
4783+---
4784+ tests/util/grub-fs-tester.in | 4 ++--
4785+ 1 file changed, 2 insertions(+), 2 deletions(-)
4786+
4787+diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
4788+index bc14a05ca3..26989d58c7 100644
4789+--- a/tests/util/grub-fs-tester.in
4790++++ b/tests/util/grub-fs-tester.in
4791+@@ -1048,8 +1048,8 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
4792+ x"romfs")
4793+ genromfs -V "$FSLABEL" -f "${FSIMAGEP}0.img" -d "$MASTER" ;;
4794+ xsquash4_*)
4795+- echo mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE
4796+- mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE ;;
4797++ echo mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE -not-reproducible
4798++ mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE -not-reproducible ;;
4799+ x"bfs")
4800+ sleep 1
4801+ fusermount -u "$MNTPOINTRW"
4802diff --git a/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch b/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch
4803new file mode 100644
4804index 0000000..75252fc
4805--- /dev/null
4806+++ b/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch
4807@@ -0,0 +1,54 @@
4808+From 72cff34035e5ba35d01fc6cbc00f3b9b135ff5a6 Mon Sep 17 00:00:00 2001
4809+From: Dimitri John Ledkov <xnox@ubuntu.com>
4810+Date: Sat, 12 Dec 2020 00:21:15 +0000
4811+Subject: UBUNTU: fixup unaligned access.
4812+
4813+Use unaligned helpers, to get/set values within a
4814+datastructure. Otherwise armhf build of grub-uboot platform fails due
4815+to -Wcast-align errors.
4816+
4817+Fixes: rhboot-f34-support-non-ethernet.patch
4818+
4819+Patch-Name: ubuntu-fixup-rhboot-f34-support-non-ethernet-2.patch
4820+---
4821+ grub-core/net/ethernet.c | 10 +++++-----
4822+ 1 file changed, 5 insertions(+), 5 deletions(-)
4823+
4824+diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
4825+index 9aae83a5eb..01cd21785a 100644
4826+--- a/grub-core/net/ethernet.c
4827++++ b/grub-core/net/ethernet.c
4828+@@ -74,12 +74,12 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
4829+ /* Check if a vlan-tag is present. */
4830+ if (vlantag != 0)
4831+ {
4832+- *((grub_uint32_t *)eth) = grub_cpu_to_be32 (vlantag);
4833++ grub_set_unaligned32 (eth, grub_cpu_to_be32 (vlantag));
4834+ eth += sizeof (vlantag);
4835+ }
4836+
4837+ /* Write ethertype */
4838+- *((grub_uint16_t*) eth) = grub_cpu_to_be16 (ethertype);
4839++ grub_set_unaligned16 (eth, grub_cpu_to_be16 (ethertype));
4840+
4841+ if (!inf->card->opened)
4842+ {
4843+@@ -121,15 +121,15 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
4844+ grub_memcpy (src_hwaddress.mac, eth, hw_addr_len);
4845+ eth += hw_addr_len;
4846+
4847+- type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4848++ type = grub_be_to_cpu16 (grub_get_unaligned16 (eth));
4849+ if (type == VLANTAG_IDENTIFIER)
4850+ {
4851+ /* Skip vlan tag */
4852+ eth += 2;
4853+- vlantag = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4854++ vlantag = grub_be_to_cpu16 (grub_get_unaligned16 (eth));
4855+ etherhdr_size += 4;
4856+ eth += 2;
4857+- type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth));
4858++ type = grub_be_to_cpu16 (grub_get_unaligned16 (eth));
4859+ }
4860+
4861+ err = grub_netbuff_pull (nb, etherhdr_size);
4862diff --git a/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet.patch b/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet.patch
4863new file mode 100644
4864index 0000000..5204d92
4865--- /dev/null
4866+++ b/debian/patches/ubuntu-fixup-rhboot-f34-support-non-ethernet.patch
4867@@ -0,0 +1,25 @@
4868+From a819547bd60ba1c6088977b7bfe288f4f867fad9 Mon Sep 17 00:00:00 2001
4869+From: Dimitri John Ledkov <xnox@ubuntu.com>
4870+Date: Thu, 10 Dec 2020 13:42:13 +0000
4871+Subject: UBUNTU: fixup ofnet initialization.
4872+
4873+Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
4874+
4875+Patch-Name: ubuntu-fixup-rhboot-f34-support-non-ethernet.patch
4876+---
4877+ grub-core/net/drivers/ieee1275/ofnet.c | 2 +-
4878+ 1 file changed, 1 insertion(+), 1 deletion(-)
4879+
4880+diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
4881+index 057ba85973..4621b0a346 100644
4882+--- a/grub-core/net/drivers/ieee1275/ofnet.c
4883++++ b/grub-core/net/drivers/ieee1275/ofnet.c
4884+@@ -154,7 +154,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
4885+ char *equal_char = 0;
4886+ grub_size_t field_counter = 0;
4887+ grub_net_network_level_address_t client_addr = {0, {0}, 0}, gateway_addr = {0, {0}, 0}, subnet_mask = {0, {0}, 0};
4888+- grub_net_link_level_address_t hw_addr = {0, {{0, 0, 0, 0, 0, 0}}};
4889++ grub_net_link_level_address_t hw_addr = {0, 0, {{0, 0, 0, 0, 0, 0}}};
4890+ grub_net_interface_flags_t flags = 0;
4891+ struct grub_net_network_level_interface *inter = NULL;
4892+ grub_uint16_t vlantag = 0;
4893diff --git a/debian/patches/ubuntu-flavour-order.patch b/debian/patches/ubuntu-flavour-order.patch
4894index 4421ecf..30cc2bb 100644
4895--- a/debian/patches/ubuntu-flavour-order.patch
4896+++ b/debian/patches/ubuntu-flavour-order.patch
4897@@ -20,7 +20,7 @@ Patch-Name: ubuntu-flavour-order.patch
4898 2 files changed, 17 insertions(+), 1 deletion(-)
4899
4900 diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
4901-index 72f1e25a0..6c8988fd6 100644
4902+index 72f1e25a03..6c8988fd60 100644
4903 --- a/util/grub-mkconfig.in
4904 +++ b/util/grub-mkconfig.in
4905 @@ -260,7 +260,8 @@ export GRUB_DEFAULT \
4906@@ -34,7 +34,7 @@ index 72f1e25a0..6c8988fd6 100644
4907 if test "x${grub_cfg}" != "x"; then
4908 rm -f "${grub_cfg}.new"
4909 diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
4910-index fe6319abe..7e2d1bc21 100644
4911+index fe6319abe0..7e2d1bc214 100644
4912 --- a/util/grub-mkconfig_lib.in
4913 +++ b/util/grub-mkconfig_lib.in
4914 @@ -270,6 +270,21 @@ version_test_gt ()
4915diff --git a/debian/patches/ubuntu-grub-install-extra-removable.patch b/debian/patches/ubuntu-grub-install-extra-removable.patch
4916index 3e7211b..d01763e 100644
4917--- a/debian/patches/ubuntu-grub-install-extra-removable.patch
4918+++ b/debian/patches/ubuntu-grub-install-extra-removable.patch
4919@@ -23,7 +23,7 @@ Patch-Name: ubuntu-grub-install-extra-removable.patch
4920 1 file changed, 133 insertions(+), 2 deletions(-)
4921
4922 diff --git a/util/grub-install.c b/util/grub-install.c
4923-index 64c292383..030464645 100644
4924+index 64c292383f..0304646453 100644
4925 --- a/util/grub-install.c
4926 +++ b/util/grub-install.c
4927 @@ -56,6 +56,7 @@
4928diff --git a/debian/patches/ubuntu-install-signed.patch b/debian/patches/ubuntu-install-signed.patch
4929index 64e88a0..626fedb 100644
4930--- a/debian/patches/ubuntu-install-signed.patch
4931+++ b/debian/patches/ubuntu-install-signed.patch
4932@@ -19,7 +19,7 @@ Patch-Name: ubuntu-install-signed.patch
4933 1 file changed, 156 insertions(+), 59 deletions(-)
4934
4935 diff --git a/util/grub-install.c b/util/grub-install.c
4936-index 3b4606eef..e1e40cf2b 100644
4937+index 3b4606eef1..e1e40cf2b5 100644
4938 --- a/util/grub-install.c
4939 +++ b/util/grub-install.c
4940 @@ -80,6 +80,7 @@ static char *label_color;
4941diff --git a/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch b/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch
4942index f604a7c..43945f1 100644
4943--- a/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch
4944+++ b/debian/patches/ubuntu-linuxefi-arm64-set-base-addr.patch
4945@@ -34,7 +34,7 @@ Patch-Name: ubuntu-linuxefi-arm64-set-base-addr.patch
4946 1 file changed, 15 insertions(+)
4947
4948 diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
4949-index f6d30bcf7..a09479cd6 100644
4950+index f6d30bcf7c..a09479cd6d 100644
4951 --- a/grub-core/loader/efi/linux.c
4952 +++ b/grub-core/loader/efi/linux.c
4953 @@ -72,6 +72,7 @@ grub_err_t
4954diff --git a/debian/patches/ubuntu-linuxefi-arm64.patch b/debian/patches/ubuntu-linuxefi-arm64.patch
4955index d9d3f1d..ad770de 100644
4956--- a/debian/patches/ubuntu-linuxefi-arm64.patch
4957+++ b/debian/patches/ubuntu-linuxefi-arm64.patch
4958@@ -17,7 +17,7 @@ Patch-Name: ubuntu-linuxefi-arm64.patch
4959 1 file changed, 56 insertions(+), 50 deletions(-)
4960
4961 diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
4962-index 3f5496fc5..130e9c09b 100644
4963+index 3f5496fc55..130e9c09b4 100644
4964 --- a/grub-core/loader/arm64/linux.c
4965 +++ b/grub-core/loader/arm64/linux.c
4966 @@ -43,6 +43,8 @@ static int loaded;
4967diff --git a/debian/patches/ubuntu-linuxefi.patch b/debian/patches/ubuntu-linuxefi.patch
4968index 5d5b012..750cda6 100644
4969--- a/debian/patches/ubuntu-linuxefi.patch
4970+++ b/debian/patches/ubuntu-linuxefi.patch
4971@@ -358,7 +358,7 @@ Last-Update: 2018-12-07
4972 create mode 100644 include/grub/sparc64/linux.h
4973
4974 diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
4975-index 3ea8e7ff4..c6ba5b2d7 100644
4976+index 3ea8e7ff45..c6ba5b2d76 100644
4977 --- a/grub-core/Makefile.am
4978 +++ b/grub-core/Makefile.am
4979 @@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
4980@@ -370,7 +370,7 @@ index 3ea8e7ff4..c6ba5b2d7 100644
4981 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
4982 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
4983 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
4984-index aadb4cdff..1731c53f0 100644
4985+index aadb4cdff8..1731c53f08 100644
4986 --- a/grub-core/Makefile.core.def
4987 +++ b/grub-core/Makefile.core.def
4988 @@ -207,6 +207,7 @@ kernel = {
4989@@ -428,7 +428,7 @@ index aadb4cdff..1731c53f0 100644
4990 enable = i386_coreboot;
4991 enable = efi;
4992 diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
4993-index a0c164e54..41a7f3f04 100644
4994+index a0c164e54f..41a7f3f046 100644
4995 --- a/grub-core/commands/iorw.c
4996 +++ b/grub-core/commands/iorw.c
4997 @@ -23,6 +23,7 @@
4998@@ -460,7 +460,7 @@ index a0c164e54..41a7f3f04 100644
4999 grub_unregister_extcmd (cmd_read_word);
5000 grub_unregister_extcmd (cmd_read_dword);
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches