mbox series

[v3,0/4] btrfs-progs: support for fs-verity fstests

Message ID cover.1658182042.git.boris@bur.io (mailing list archive)
Headers show
Series btrfs-progs: support for fs-verity fstests | expand

Message

Boris Burkov July 18, 2022, 10:13 p.m. UTC
Adding fstests for fs-verity on btrfs needs some light support from
btrfs-progs. Specifically, it needs additional device corruption
features to test corruption detection, and it needs the RO COMPAT flag.

The first patch defines (u64)-1 as "UNSET_U64"
The second patch adds corrupting arbitrary regions of item data with -I.
The third patch adds corrupting holes and prealloc in extent data.
The fourth patch includes BTRFS_FEATURE_RO_COMPAT_VERITY to ctree.h

--
v3: add patch #defining (u64)-1 in btrfs-corrupt-block
    check item bounds in corruption function
    improve usage message for new corruption use case
    add patch with verity ro compat flag
v2: minor cleanups from rebasing after a year  

Boris Burkov (4):
  btrfs-corrupt-block: define (u64)-1 as UNSET_U64
  btrfs-progs: corrupt generic item data with btrfs-corrupt-block
  btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
  btrfs-progs: add VERITY ro compat flag

 btrfs-corrupt-block.c | 128 ++++++++++++++++++++++++++++++++++--------
 kernel-shared/ctree.h |   4 +-
 2 files changed, 109 insertions(+), 23 deletions(-)

Comments

Sweet Tea Dorminy July 19, 2022, 8:34 p.m. UTC | #1
On 7/18/22 18:13, Boris Burkov wrote:
> Adding fstests for fs-verity on btrfs needs some light support from
> btrfs-progs. Specifically, it needs additional device corruption
> features to test corruption detection, and it needs the RO COMPAT flag.
> 
> The first patch defines (u64)-1 as "UNSET_U64"
> The second patch adds corrupting arbitrary regions of item data with -I.
> The third patch adds corrupting holes and prealloc in extent data.
> The fourth patch includes BTRFS_FEATURE_RO_COMPAT_VERITY to ctree.h
> 
> --
> v3: add patch #defining (u64)-1 in btrfs-corrupt-block
>      check item bounds in corruption function
>      improve usage message for new corruption use case
>      add patch with verity ro compat flag
> v2: minor cleanups from rebasing after a year
> 
> Boris Burkov (4):
>    btrfs-corrupt-block: define (u64)-1 as UNSET_U64
>    btrfs-progs: corrupt generic item data with btrfs-corrupt-block
>    btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
>    btrfs-progs: add VERITY ro compat flag
> 
>   btrfs-corrupt-block.c | 128 ++++++++++++++++++++++++++++++++++--------
>   kernel-shared/ctree.h |   4 +-
>   2 files changed, 109 insertions(+), 23 deletions(-)
> 
For the series:
Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Josef Bacik July 19, 2022, 8:43 p.m. UTC | #2
On Mon, Jul 18, 2022 at 03:13:07PM -0700, Boris Burkov wrote:
> Adding fstests for fs-verity on btrfs needs some light support from
> btrfs-progs. Specifically, it needs additional device corruption
> features to test corruption detection, and it needs the RO COMPAT flag.
> 
> The first patch defines (u64)-1 as "UNSET_U64"
> The second patch adds corrupting arbitrary regions of item data with -I.
> The third patch adds corrupting holes and prealloc in extent data.
> The fourth patch includes BTRFS_FEATURE_RO_COMPAT_VERITY to ctree.h
> 

Validated this made the verity tests do the right thing, you can add

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef