Re: [PATCH] cryptodisk: Incorrect calculation of sector in grub_cryptodisk_read/write.

2020-08-28 Thread Patrick Steinhardt
On Wed, Aug 26, 2020 at 06:50:29PM -0500, Glenn Washburn wrote: > On Wed, 26 Aug 2020 18:44:35 -0500 > Glenn Washburn wrote: > > > Here dev is a grub_cryptodisk_t and dev->offset is offset in sectors > > of size native to the cryptodisk device. The function grub_disk_read > > expects that the giv

Re: [PATCH] cryptodisk: Incorrect calculation of sector in grub_cryptodisk_read/write.

2020-08-26 Thread Glenn Washburn
On Wed, 26 Aug 2020 18:44:35 -0500 Glenn Washburn wrote: > Here dev is a grub_cryptodisk_t and dev->offset is offset in sectors > of size native to the cryptodisk device. The function grub_disk_read > expects that the given start sector is in the native grub sector > size, so dev->offset must be

[PATCH] cryptodisk: Incorrect calculation of sector in grub_cryptodisk_read/write.

2020-08-26 Thread Glenn Washburn
Here dev is a grub_cryptodisk_t and dev->offset is offset in sectors of size native to the cryptodisk device. The function grub_disk_read expects that the given start sector is in the native grub sector size, so dev->offset must be converted as well. Create function grub_disk_from_native_sector to