ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
63 stars 59 forks source link

zipl: fix reading 4k disk's geometry #107

Closed nikita-dubrovskii closed 3 years ago

nikita-dubrovskii commented 3 years ago

Fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1918723

On 4k SCSI disks zipl stores wrong values to 'scsi_mbr.program_table_pointer', which makes system unbootable. This happens in 'zipl/src/disk.c:656':

/* Convert file system block to physical */
*physical = mapped * phy_per_fs + subblock;
/* Add partition start */
*physical += info->geo.start;

So 'hd_geometry.start' should be adjusted before being used.

Signed-off-by: Nikita Dubrovskii nikita@linux.ibm.com

stefan-haberland commented 3 years ago

Thanks for the patch. With the rework I am fine with it.