Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 00/10] RFC: move logical block size checking to the block core
@ 2020-07-21 10:52 Maxim Levitsky
  2020-07-21 10:52 ` [PATCH 01/10] block: introduce blk_is_valid_logical_block_size Maxim Levitsky
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Maxim Levitsky @ 2020-07-21 10:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Keith Busch, Josef Bacik, open list:BLOCK LAYER, Sagi Grimberg,
	Jens Axboe, open list:NVM EXPRESS DRIVER,
	open list:SCSI CDROM DRIVER, Tejun Heo, Bart Van Assche,
	Martin K. Petersen, Damien Le Moal, Jason Wang, Maxim Levitsky,
	Stefan Hajnoczi, Colin Ian King, Michael S. Tsirkin,
	Paolo Bonzini, Ulf Hansson, Ajay Joshi, Ming Lei,
	open list:SONY MEMORYSTICK SUBSYSTEM, Christoph Hellwig,
	Satya Tangirala, open list:NETWORK BLOCK DEVICE (NBD),
	Hou Tao, Jens Axboe, open list:VIRTIO CORE AND NET DRIVERS,
	James E.J. Bottomley, Alex Dubov, Maxim Levitsky

This patch series aims to move the logical block size checking to the\r
block code.\r
\r
This was inspired by missing check for valid logical block size in\r
virtio-blk which causes the kernel to crash in a weird way later on\r
when it is invalid.\r
\r
I added blk_is_valid_logical_block_size which returns true iff the\r
block size is one of supported sizes.\r
\r
I added this check to virtio-blk, and also converted  few block drivers\r
that I am familiar with to use this interface instead of their\r
own implementation.\r
\r
Best regards,\r
	Maxim Levitsky\r
\r
Maxim Levitsky (10):\r
  block: introduce blk_is_valid_logical_block_size\r
  block: virtio-blk: check logical block size\r
  block: loop: use blk_is_valid_logical_block_size\r
  block: nbd: use blk_is_valid_logical_block_size\r
  block: null: use blk_is_valid_logical_block_size\r
  block: ms_block: use blk_is_valid_logical_block_size\r
  block: mspro_blk: use blk_is_valid_logical_block_size\r
  block: nvme: use blk_is_valid_logical_block_size\r
  block: scsi: sd: use blk_is_valid_logical_block_size\r
  block: scsi: sr: use blk_is_valid_logical_block_size\r
\r
 block/blk-settings.c                | 18 +++++++++++++++++\r
 drivers/block/loop.c                | 23 +++++----------------\r
 drivers/block/nbd.c                 | 12 ++---------\r
 drivers/block/null_blk_main.c       |  6 +++---\r
 drivers/block/virtio_blk.c          | 15 ++++++++++++--\r
 drivers/memstick/core/ms_block.c    |  2 +-\r
 drivers/memstick/core/mspro_block.c |  6 ++++++\r
 drivers/nvme/host/core.c            | 17 ++++++++--------\r
 drivers/scsi/sd.c                   |  5 +----\r
 drivers/scsi/sr.c                   | 31 ++++++++++++-----------------\r
 include/linux/blkdev.h              |  1 +\r
 11 files changed, 71 insertions(+), 65 deletions(-)\r
\r
-- \r
2.26.2\r
\r


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

end of thread, back to index

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 10:52 [PATCH 00/10] RFC: move logical block size checking to the block core Maxim Levitsky
2020-07-21 10:52 ` [PATCH 01/10] block: introduce blk_is_valid_logical_block_size Maxim Levitsky
2020-07-21 11:05   ` Damien Le Moal
2020-07-21 11:09     ` Maxim Levitsky
2020-07-21 11:31       ` Damien Le Moal
2020-07-21 15:13   ` Christoph Hellwig
2020-07-22  8:50     ` Maxim Levitsky
2020-07-21 10:52 ` [PATCH 02/10] block: virtio-blk: check logical block size Maxim Levitsky
2020-07-21 11:07   ` Damien Le Moal
2020-07-21 15:14   ` Christoph Hellwig
2020-07-22  2:55     ` Martin K. Petersen
2020-07-22  9:11       ` Maxim Levitsky
2020-07-28 14:27         ` Maxim Levitsky
2020-07-29  4:32         ` Martin K. Petersen
2020-07-28 15:44   ` Stefan Hajnoczi
2020-07-21 10:52 ` [PATCH 03/10] block: loop: use blk_is_valid_logical_block_size Maxim Levitsky
2020-07-21 11:08   ` Damien Le Moal
2020-07-21 10:52 ` [PATCH 04/10] block: nbd: " Maxim Levitsky
2020-07-21 11:09   ` Damien Le Moal
2020-07-21 10:52 ` [PATCH 05/10] block: null: " Maxim Levitsky
2020-07-21 11:15   ` Damien Le Moal
2020-07-21 12:42     ` Maxim Levitsky
2020-07-21 10:52 ` [PATCH 06/10] block: ms_block: " Maxim Levitsky
2020-07-21 11:17   ` Damien Le Moal
2020-07-21 10:52 ` [PATCH 07/10] block: mspro_blk: " Maxim Levitsky
2020-07-21 11:17   ` Damien Le Moal
2020-07-21 10:52 ` [PATCH 08/10] block: nvme: " Maxim Levitsky
2020-07-21 11:23   ` Damien Le Moal
2020-07-21 10:52 ` [PATCH 09/10] block: scsi: sd: " Maxim Levitsky
2020-07-21 11:25   ` Damien Le Moal
2020-07-21 12:55     ` Maxim Levitsky
2020-07-21 10:52 ` [PATCH 10/10] block: scsi: sr: " Maxim Levitsky
2020-07-21 11:29   ` Damien Le Moal

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git