ACK: [X/B/D/E/F][PATCH 0/1] bcache: fix oops for block size > page size

Andrea Righi andrea.righi at canonical.com
Wed Jul 8 07:11:52 UTC 2020


On Tue, Jul 07, 2020 at 12:32:49PM -0300, Mauricio Faria de Oliveira wrote:
> BugLink: https://bugs.launchpad.net/bugs/1867916
> 
> 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.
> 
> [Impact]
> 
>  * 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.
> 
> [Fix]
> 
>  * 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.
> 
> [Test Case]
> 
>  * 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.
> 
> [Regression Potential]
> 
>  * 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.
> 
> [Other Info]
> 
>  * Unstable has the patch on both master and master-5.7.
>  * Groovy should get it on rebase.

Upstream fix that solves a potential kernel BUG, reviewed by bcache
maintainer, also tested with positive result, all good to me.

Thanks!

Acked-by: Andrea Righi <andrea.righi at canonical.com>



More information about the kernel-team mailing list