Re: [xfstests PATCH 1/3] common/verity: fix _fsv_have_hash_algorithm() with required signatures

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Nov 03, 2022 at 11:47:40PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> _fsv_have_hash_algorithm() uses _fsv_enable() without a signature, so it
> always fails when called while fs.verity.require_signatures=1.  This
> happens in generic/577, which tests file signing.  This wasn't noticed
> because it just made part of generic/577 always be skipped.
> 
> Fix this by making _fsv_have_hash_algorithm() temporarily set
> fs.verity.require_signatures to 0.
> 
> Since the previous value needs to be restored afterwards, whether it is
> 0 or 1, also make some changes to the fs.verity.require_signatures
> helper functions to allow the restoration of the previous value, rather
> than the value that existed at the beginning of the test.
> 
> Finally, make a couple related cleanups: make _fsv_have_hash_algorithm()
> always delete the file it works with, and also update the similar code
> in _require_scratch_verity().
> 
> Reported-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>  common/verity | 69 ++++++++++++++++++++++++++++++++++-----------------
>  1 file changed, 46 insertions(+), 23 deletions(-)
> 

Looks good.
Reviewed-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx>

-- 
- Andrey




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux