mbox series

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

Message ID 1538265378-20544-1-git-send-email-schmitzmic@gmail.com (mailing list archive)
Headers show
Series Amiga RDB partition support fixes | expand

Message

Michael Schmitz Sept. 29, 2018, 11:56 p.m. UTC
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 reported six years ago for a 2 TB disk. I have tested this
patch with the identical RDB partition data that Martin saw the bug with.

The simple fix still leaves ample room for overflows in calculating start
address and size of a RDB partition, though such overflows should only be
seen in rather unusual cases. To address these potential overflows, checks
are added in the second patch of this series.

The use of u64 instead of sector_t in the second patch is required to catch
overflows even in cases where sector_t is 32 bit wide (i.e. no LBD support).

Cheers,

	Michael