WSL2-Linux-Kernel/block/partitions
Gabriel Krisman Bertazi 9c8747167e block: atari: Return early for unsupported sector size
For 4K LBA or very large disks, atari_partition can easily get tricked
into thinking it has found an Atari partition table.  Depending on the
data in the disk, it ends up creating partitions with awkward lengths.

We saw logs like this while playing with fio.

[5.625867] nvme2n1: AHDI p2
[5.625872] nvme2n1: p2 size 2910030523 extends beyond EOD, truncated

People has had issues with misinterpreted AHDI partition tables for a long
time, see this BSD thread from 1995, for example.

https://mail-index.netbsd.org/port-atari/1995/11/19/0001.html

Since the atari partition, according to the spec, doesn't even support
sector sizes with more than 512, a quick sanity check is reasonable to
just bail out early, before even attempting to read sector 0.

Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-07-13 09:31:44 -07:00
..
Kconfig block: change config option name for cmdline partition parsing 2013-09-30 14:31:02 -07:00
Makefile block: support embedded device command line partition 2013-09-11 15:56:57 -07:00
acorn.c
acorn.h
aix.c partitions: aix.c: off by one bug 2014-08-05 13:13:24 -06:00
aix.h partitions: add aix lvm partition support files 2013-07-09 10:33:28 -07:00
amiga.c block/partitions/amiga.c: replace nolevel printk by pr_err 2014-07-01 10:40:02 -06:00
amiga.h
atari.c block: atari: Return early for unsupported sector size 2016-07-13 09:31:44 -07:00
atari.h block: Use macros from compiler.h instead of __attribute__((...)) 2014-02-18 12:20:01 -08:00
check.c block: Remove annoying "unknown partition table" message 2015-01-22 08:03:52 -07:00
check.h block/partitions: optimize memory allocation in check_partition() 2013-02-27 19:10:21 -08:00
cmdline.c block: change config option name for cmdline partition parsing 2013-09-30 14:31:02 -07:00
cmdline.h block: support embedded device command line partition 2013-09-11 15:56:57 -07:00
efi.c treewide: Fix typos in printk 2016-04-18 11:23:24 +02:00
efi.h block: Use macros from compiler.h instead of __attribute__((...)) 2014-02-18 12:20:01 -08:00
ibm.c s390/partitions: make partition detection independent from DASD ioctls 2012-09-26 15:45:05 +02:00
ibm.h
karma.c block: Use macros from compiler.h instead of __attribute__((...)) 2014-02-18 12:20:01 -08:00
karma.h
ldm.c block/partitions/ldm.c: use generic UUID library 2016-05-20 17:58:30 -07:00
ldm.h
mac.c mac: validate mac_partition is within sector 2015-11-20 08:49:28 -07:00
mac.h
msdos.c block/partitions/msdos.c: code clean-up 2014-07-01 10:40:03 -06:00
msdos.h
osf.c
osf.h
sgi.c
sgi.h
sun.c
sun.h
sysv68.c
sysv68.h
ultrix.c
ultrix.h