[PATCH v4 2/2] block: add overflow checks for Amiga partition support

2018-09-29 Thread Michael Schmitz
The Amiga partition parser module uses signed int for partition sector address and count, which will overflow for disks larger than 1 TB. Use u64 as type for sector address and size to allow using disks up to 2 TB without LBD support, and disks larger than 2 TB with LBD. The RBD format allows to

[PATCH v4 1/2] block: fix signed int overflow in Amiga partition support

2018-09-29 Thread Michael Schmitz
The Amiga partition parser module uses signed int for partition sector address and count, which will overflow for disks larger than 1 TB. Use sector_t as type for sector address and size to allow using disks up to 2 TB without LBD support, and disks larger than 2 TB with LBD. This bug was

[PATCH v4 0/2] Amiga RDB partition support fixes

2018-09-29 Thread Michael Schmitz
Jens, as suggested, here's a new version of the Amiga RDB partition table patch. I've split off the part fixing the incorrect use of signed int for partition start address and size as separate patch. This change should be incontroversial (I hope). It does fix the bug that Martin Steigerwald