[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200721105239.8270-1-mlevitsk@redhat.com>
Date: Tue, 21 Jul 2020 13:52:29 +0300
From: Maxim Levitsky <mlevitsk@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Keith Busch <kbusch@...nel.org>,
Josef Bacik <josef@...icpanda.com>,
linux-block@...r.kernel.org (open list:BLOCK LAYER),
Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...nel.dk>,
linux-nvme@...ts.infradead.org (open list:NVM EXPRESS DRIVER),
linux-scsi@...r.kernel.org (open list:SCSI CDROM DRIVER),
Tejun Heo <tj@...nel.org>,
Bart Van Assche <bvanassche@....org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Damien Le Moal <damien.lemoal@....com>,
Jason Wang <jasowang@...hat.com>,
Maxim Levitsky <maximlevitsky@...il.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Colin Ian King <colin.king@...onical.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Ajay Joshi <ajay.joshi@....com>,
Ming Lei <ming.lei@...hat.com>,
linux-mmc@...r.kernel.org (open list:SONY MEMORYSTICK SUBSYSTEM),
Christoph Hellwig <hch@....de>,
Satya Tangirala <satyat@...gle.com>,
nbd@...er.debian.org (open list:NETWORK BLOCK DEVICE (NBD)),
Hou Tao <houtao1@...wei.com>, Jens Axboe <axboe@...com>,
virtualization@...ts.linux-foundation.org (open list:VIRTIO CORE AND
NET DRIVERS), "James E.J. Bottomley" <jejb@...ux.ibm.com>,
Alex Dubov <oakad@...oo.com>,
Maxim Levitsky <mlevitsk@...hat.com>
Subject: [PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the
block code.
This was inspired by missing check for valid logical block size in
virtio-blk which causes the kernel to crash in a weird way later on
when it is invalid.
I added blk_is_valid_logical_block_size which returns true iff the
block size is one of supported sizes.
I added this check to virtio-blk, and also converted few block drivers
that I am familiar with to use this interface instead of their
own implementation.
Best regards,
Maxim Levitsky
Maxim Levitsky (10):
block: introduce blk_is_valid_logical_block_size
block: virtio-blk: check logical block size
block: loop: use blk_is_valid_logical_block_size
block: nbd: use blk_is_valid_logical_block_size
block: null: use blk_is_valid_logical_block_size
block: ms_block: use blk_is_valid_logical_block_size
block: mspro_blk: use blk_is_valid_logical_block_size
block: nvme: use blk_is_valid_logical_block_size
block: scsi: sd: use blk_is_valid_logical_block_size
block: scsi: sr: use blk_is_valid_logical_block_size
block/blk-settings.c | 18 +++++++++++++++++
drivers/block/loop.c | 23 +++++----------------
drivers/block/nbd.c | 12 ++---------
drivers/block/null_blk_main.c | 6 +++---
drivers/block/virtio_blk.c | 15 ++++++++++++--
drivers/memstick/core/ms_block.c | 2 +-
drivers/memstick/core/mspro_block.c | 6 ++++++
drivers/nvme/host/core.c | 17 ++++++++--------
drivers/scsi/sd.c | 5 +----
drivers/scsi/sr.c | 31 ++++++++++++-----------------
include/linux/blkdev.h | 1 +
11 files changed, 71 insertions(+), 65 deletions(-)
--
2.26.2
Powered by blists - more mailing lists