Bug#987008: please review this grub patch to fix LVM rename support
Antoine Beaupré
anarcat at debian.org
Mon Feb 27 17:19:46 GMT 2023
Hi Peter,
I'm writing to you as the author of this patch in grub:
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=879c4a8342eacc0ba4b9dd11dc69d3ec3dbe73af
We've had a report of a release-critical bug (in CC) against grub in
Debian that claims boot failures after renaming a logical volume:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987008
The suggested patch (author in CC) is quite short:
---------------------------------------------------
Index: grub2-2.02+dfsg1/grub-core/disk/lvm.c
===================================================================
--- grub2-2.02+dfsg1.orig/grub-core/disk/lvm.c
+++ grub2-2.02+dfsg1/grub-core/disk/lvm.c
@@ -253,7 +253,7 @@ error_parsing_metadata:
p = q = (char *)ptr;
- if (grub_add ((grub_size_t)metadatabuf, (grub_size_t)mda_size, &ptr))
+ if (grub_add (ptr, (grub_size_t)grub_le_to_cpu64 (rlocn->size), &ptr))
goto error_parsing_metadata;
mda_end = (char *)ptr;
----------------------------------------------------
I have tried to review the patch but quickly got lost in this long
function, so I'm not sure it's the right fix.
Could you expand on the rationale on why the rlocn->offset is checked
first but mda_size instead of rlocn->size in the second case?
Thank you for any input,
a.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20230227/d38878d7/attachment.sig>
More information about the Pkg-grub-devel
mailing list