linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Amiga RDB partition support fixes
@ 2018-10-12  0:26 Michael Schmitz
  2018-10-12  0:26 ` [PATCH v5 1/2] block: fix signed int overflow in Amiga partition support Michael Schmitz
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Michael Schmitz @ 2018-10-12  0:26 UTC (permalink / raw)
  To: linux-block, axboe; +Cc: linux-m68k, geert

yet another 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.
I have incorporated Andreas' feedback on proper use of casts to avoid
integer overflow in this version.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-13  8:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12  0:26 [PATCH v5 0/2] Amiga RDB partition support fixes Michael Schmitz
2018-10-12  0:26 ` [PATCH v5 1/2] block: fix signed int overflow in Amiga partition support Michael Schmitz
2018-10-12  8:59   ` Geert Uytterhoeven
2018-10-13  2:46     ` Michael Schmitz
2018-10-13  7:04       ` Geert Uytterhoeven
2018-10-12  0:26 ` [PATCH v5 2/2] block: add overflow checks for " Michael Schmitz
2018-10-12  8:54   ` Geert Uytterhoeven
2018-10-13  2:23     ` Michael Schmitz
2018-10-13  7:02       ` Geert Uytterhoeven
2018-10-13  8:27         ` Michael Schmitz
2018-10-12  8:17 ` [PATCH v5 0/2] Amiga RDB partition support fixes Martin Steigerwald
2018-10-12  8:41   ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).