[X/B/D/E/F][PATCH 0/1] bcache: fix oops for block size > page size
Mauricio Faria de Oliveira
mfo at canonical.com
Tue Jul 7 15:32:49 UTC 2020
This is not high priority, as the regression surface
is limited by user-specific configuration; they will
be provided w/ test kernel builds for the time being.
Please review/fix when convenient.
* Users of bcache who manually specified a block size
greater than the page size when creating the device
with 'make-bcache' started to hit a kernel BUG/oops
after kernel upgrades. (This is not widely used.)
* The issue has been exposed with commit ad6bf88a6c19
("block: fix an integer overflow in logical block size")
because it increased the range of values accepted as
logical block size, which used to overflow to zero,
and thus receive a default of 512 via block layer.
* The issue existed previously, but with fewer values
exposed (e.g. 8k, 16k, 32k); the regression reports
happened with larger values (512k) for RAID stripes.
* The upstream commit dcacbc1242c7 ("bcache: check and
adjust logical block size for backing devices") checks
the block size and adjusts it if needed, to the value
of the underlying device's logical block size.
* It is merged as of v5.8-rcN, and sent to v5.7 stable.
* Run make-bcache with block size greater than page size.
$ sudo make-bcache --bdev $DEV --block 8k
* Expected results: bcache device registered; no BUG/oops.
* Detailed steps on LP bug comment.
* Restricted to users who specify a bcache block size
greater than page size.
* Regressions could theoretically manifest on bcache
device probe/register, if the underlying device's
logical block size for whatever triggers issues not
seen previously with the overflow/default 512 bytes.
* Unstable has the patch on both master and master-5.7.
* Groovy should get it on rebase.
Mauricio Faria de Oliveira (1):
bcache: check and adjust logical block size for backing devices
drivers/md/bcache/super.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
More information about the kernel-team