]> git.ipfire.org Git - thirdparty/grub.git/commit
luks2: Do not handle disks of size GRUB_DISK_SIZE_UNKNOWN for now
authorGlenn Washburn <development@efficientek.com>
Tue, 15 Dec 2020 23:31:07 +0000 (17:31 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 18 Dec 2020 14:19:40 +0000 (15:19 +0100)
commit278201bc31b45ac001d1a936f9ffca4b691c2759
tree6ab98dc0e3683ca9fde8e4754f481ea46d619e30
parent90fb18632e03158e1cec42cf87013731ad593f17
luks2: Do not handle disks of size GRUB_DISK_SIZE_UNKNOWN for now

Check to make sure that source disk has a known size. If not, print
a message and return error. There are 4 cases where GRUB_DISK_SIZE_UNKNOWN
is set (biosdisk, obdisk, ofdisk, and uboot), and in all those cases
processing continues. So this is probably a bit conservative. However,
3 of the cases seem pathological, and the other, biosdisk, happens when
booting from a CD-ROM. Since I doubt booting from a LUKS2 volume on
a CD-ROM is a big use case, we'll error until someone complains.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/luks2.c