lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkdBfkqlSUzJlNHD@gmail.com>
Date:   Fri, 1 Apr 2022 18:16:30 +0000
From:   Eric Biggers <ebiggers@...nel.org>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     ceph-devel@...r.kernel.org, xiubli@...hat.com, idryomov@...il.com,
        lhenriques@...e.de, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v12 08/54] ceph: add a has_stable_inodes operation for
 ceph

On Fri, Apr 01, 2022 at 06:37:10AM -0400, Jeff Layton wrote:
> On Thu, 2022-03-31 at 20:03 +0000, Eric Biggers wrote:
> > On Thu, Mar 31, 2022 at 11:30:44AM -0400, Jeff Layton wrote:
> > >  static struct fscrypt_operations ceph_fscrypt_ops = {
> > >  	.key_prefix		= "ceph:",
> > >  	.get_context		= ceph_crypt_get_context,
> > >  	.set_context		= ceph_crypt_set_context,
> > >  	.empty_dir		= ceph_crypt_empty_dir,
> > > +	.has_stable_inodes	= ceph_crypt_has_stable_inodes,
> > >  };
> > 
> > What is the use case for implementing this?  Note the comment in the struct
> > definition:
> > 
> >        /*
> >          * Check whether the filesystem's inode numbers and UUID are stable,
> >          * meaning that they will never be changed even by offline operations
> >          * such as filesystem shrinking and therefore can be used in the
> >          * encryption without the possibility of files becoming unreadable.
> >          *
> >          * Filesystems only need to implement this function if they want to
> >          * support the FSCRYPT_POLICY_FLAG_IV_INO_LBLK_{32,64} flags.  These
> >          * flags are designed to work around the limitations of UFS and eMMC
> >          * inline crypto hardware, and they shouldn't be used in scenarios where
> >          * such hardware isn't being used.
> >          *
> >          * Leaving this NULL is equivalent to always returning false.
> >          */
> >         bool (*has_stable_inodes)(struct super_block *sb);
> > 
> > I think you should just leave this NULL for now.
> > 
> 
> Mostly we were just looking for ways to make all of the -g encrypt
> xfstests pass. I'll plan to drop this patch and 07/54. I don't see any
> need to support legacy modes or stuff that involves special storage hw.

Do generic/592 and generic/602 fail without this patch?  If so, that would be a
test bug, since they should be skipped if the filesystem doesn't support
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_{64,32}.  I think that
_require_encryption_policy_support() should be already taking care of that,
though?

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ