Control: reopen -1 Control: retitle -1 unblock: grub2/2.02+dfsg1-16 On Sat, Mar 23, 2019 at 06:19:00PM +0000, Niels Thykier wrote: > Colin Watson: > > Please review and unblock grub2 2.02+dfsg1-15 (just uploaded, so not > > quite in the archive yet). I still have some more RC-bug-fixing to do, > > but the EFI variable storage changes here are probably going to be the > > most complicated remaining change for buster, so I want to maximise the > > time available for finding bugs in it. > > > > unblock grub2/2.02+dfsg1-15 > > Thanks for fixing this bug. :) > > Unblocked, thanks,
Could you bump this hint to: unblock grub2/2.02+dfsg1-16 ... please? I made a mistake that broke building on armel/armhf, so I had to do a quick follow-up to fix that. Sorry for the inconvenience. Incremental debdiff attached. Thanks, -- Colin Watson [cjwat...@debian.org]
diff -Nru grub2-2.02+dfsg1/debian/.git-dpm grub2-2.02+dfsg1/debian/.git-dpm --- grub2-2.02+dfsg1/debian/.git-dpm 2019-03-23 00:39:00.000000000 +0000 +++ grub2-2.02+dfsg1/debian/.git-dpm 2019-03-23 13:48:41.000000000 +0000 @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -649e5a39cc5ddf42f6853a0bf818685a625f7cab -649e5a39cc5ddf42f6853a0bf818685a625f7cab +3ddfe605a6a472100f529c3d7465bf4eb7fe954d +3ddfe605a6a472100f529c3d7465bf4eb7fe954d 59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe 59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe grub2_2.02+dfsg1.orig.tar.xz diff -Nru grub2-2.02+dfsg1/debian/changelog grub2-2.02+dfsg1/debian/changelog --- grub2-2.02+dfsg1/debian/changelog 2019-03-23 09:56:35.000000000 +0000 +++ grub2-2.02+dfsg1/debian/changelog 2019-03-23 23:28:17.000000000 +0000 @@ -1,3 +1,9 @@ +grub2 (2.02+dfsg1-16) unstable; urgency=medium + + * Fix -Wcast-align diagnostics on ARM. + + -- Colin Watson <cjwat...@debian.org> Sat, 23 Mar 2019 23:28:17 +0000 + grub2 (2.02+dfsg1-15) unstable; urgency=medium * Build-depend on libefiboot-dev and libefivar-dev, for EFI variable diff -Nru grub2-2.02+dfsg1/debian/patches/efi-variable-storage-minimise-writes.patch grub2-2.02+dfsg1/debian/patches/efi-variable-storage-minimise-writes.patch --- grub2-2.02+dfsg1/debian/patches/efi-variable-storage-minimise-writes.patch 2019-03-23 00:39:00.000000000 +0000 +++ grub2-2.02+dfsg1/debian/patches/efi-variable-storage-minimise-writes.patch 2019-03-23 13:48:41.000000000 +0000 @@ -1,4 +1,4 @@ -From 649e5a39cc5ddf42f6853a0bf818685a625f7cab Mon Sep 17 00:00:00 2001 +From 3ddfe605a6a472100f529c3d7465bf4eb7fe954d Mon Sep 17 00:00:00 2001 From: Colin Watson <cjwat...@ubuntu.com> Date: Mon, 11 Mar 2019 11:17:43 +0000 Subject: Minimise writes to EFI variable storage @@ -51,11 +51,11 @@ Makefile.util.def | 20 ++ configure.ac | 12 + grub-core/osdep/efivar.c | 3 + - grub-core/osdep/unix/efivar.c | 503 ++++++++++++++++++++++++++++++++ + grub-core/osdep/unix/efivar.c | 508 ++++++++++++++++++++++++++++++++ grub-core/osdep/unix/platform.c | 100 +------ include/grub/util/install.h | 5 + util/grub-install.c | 4 +- - 8 files changed, 557 insertions(+), 95 deletions(-) + 8 files changed, 562 insertions(+), 95 deletions(-) create mode 100644 grub-core/osdep/efivar.c create mode 100644 grub-core/osdep/unix/efivar.c @@ -213,10 +213,10 @@ +#endif diff --git a/grub-core/osdep/unix/efivar.c b/grub-core/osdep/unix/efivar.c new file mode 100644 -index 000000000..2991c71db +index 000000000..4a58328b4 --- /dev/null +++ b/grub-core/osdep/unix/efivar.c -@@ -0,0 +1,503 @@ +@@ -0,0 +1,508 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2013,2019 Free Software Foundation, Inc. @@ -445,57 +445,62 @@ + else if (newlist) + { + for (i = 0; i < nentries; ++i) -+ free (newlist[i]); ++ free_efi_variable (newlist[i]); + free (newlist); + } + return rc; +} + ++#define GET_ORDER(data, i) \ ++ ((uint16_t) ((data)[(i) * 2]) + ((data)[(i) * 2 + 1] << 8)) ++#define SET_ORDER(data, i, num) \ ++ do { \ ++ (data)[(i) * 2] = (num) & 0xFF; \ ++ (data)[(i) * 2 + 1] = ((num) >> 8) & 0xFF; \ ++ } while (0) ++ +static void +remove_from_boot_order (struct efi_variable *order, uint16_t num) +{ -+ uint16_t *data; + unsigned int old_i, new_i; + + /* We've got an array (in order->data) of the order. Squeeze out any + instance of the entry we're deleting by shifting the remainder down. */ -+ data = (uint16_t *) order->data; -+ + for (old_i = 0, new_i = 0; + old_i < order->data_size / sizeof (uint16_t); + ++old_i) + { -+ if (data[old_i] != num) { -+ if (new_i != old_i) -+ data[new_i] = data[old_i]; -+ new_i++; -+ } ++ uint16_t old_num = GET_ORDER (order->data, old_i); ++ if (old_num != num) ++ { ++ if (new_i != old_i) ++ SET_ORDER (order->data, new_i, old_num); ++ ++new_i; ++ } + } + -+ order->data_size = sizeof (data[0]) * new_i; ++ order->data_size = new_i * sizeof (uint16_t); +} + +static void +add_to_boot_order (struct efi_variable *order, uint16_t num) +{ -+ uint16_t *data; + int i; + size_t new_data_size; -+ uint16_t *new_data; ++ uint8_t *new_data; + + /* Check whether this entry is already in the boot order. If it is, leave + it alone. */ -+ data = (uint16_t *) order->data; + for (i = 0; i < order->data_size / sizeof (uint16_t); ++i) -+ if (data[i] == num) ++ if (GET_ORDER (order->data, i) == num) + return; + + new_data_size = order->data_size + sizeof (uint16_t); + new_data = xmalloc (new_data_size); -+ new_data[0] = num; -+ memcpy (new_data + 1, order->data, order->data_size); ++ SET_ORDER (new_data, 0, num); ++ memcpy (new_data + sizeof (uint16_t), order->data, order->data_size); + free (order->data); -+ order->data = (uint8_t *) new_data; ++ order->data = new_data; + order->data_size = new_data_size; +} +