[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] osdep/linux: convert partition start to disk sector lengt
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2] osdep/linux: convert partition start to disk sector length. |
Date: |
Thu, 6 Sep 2018 16:53:38 +0200 |
User-agent: |
Mutt/1.3.28i |
On Thu, Sep 06, 2018 at 04:16:39PM +0200, Mihai Moldovan wrote:
> When reading data off a disk, sector values are based on the disk sector
> length.
>
> Within grub_util_fd_open_device(), the start of the partition was taken
> directly from grub's partition information structure, which uses the
> internal sector length (currently 512b), but never transformed to the
> disk's sector length.
>
> Subsequent calculations were all wrong for devices that have a diverging
> sector length and the functions eventually skipped to the wrong stream
> location, reading invalid data.
>
> Signed-off-by: Mihai Moldovan <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>
Daniel