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: <20170501185228.GA30027@gmail.com>
Date:   Mon, 1 May 2017 11:52:28 -0700
From:   Eric Biggers <ebiggers3@...il.com>
To:     Theodore Ts'o <tytso@....edu>
Cc:     Ext4 Developers List <linux-ext4@...r.kernel.org>,
        Andreas Dilger <adilger@...ger.ca>,
        linux-fscrypt@...r.kernel.org, Jaegeuk Kim <jaegeuk@...nel.org>,
        Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH] ext4: inherit encryption xattr before other xattrs

On Mon, Feb 27, 2017 at 01:36:37PM -0800, Eric Biggers wrote:
> On Mon, Feb 27, 2017 at 01:28:28PM -0700, Andreas Dilger wrote:
> > On Feb 17, 2017, at 4:33 PM, Eric Biggers <ebiggers3@...il.com> wrote:
> > > 
> > > From: Eric Biggers <ebiggers@...gle.com>
> > > 
> > > When using both encryption and SELinux (or another feature that requires
> > > an xattr per file) on a filesystem with 256-byte inodes, each file's
> > > xattrs usually spill into an external xattr block.  Currently, the
> > > xattrs are inherited in the order ACL, security, then encryption.
> > > Therefore, if spillage occurs, the encryption xattr will always end up
> > > in the external block.  This is not ideal because the encryption xattrs
> > > contain a nonce, so they will always be unique and will prevent the
> > > external xattr blocks from being deduplicated.
> > > 
> > > To improve the situation, change the inheritance order to encryption,
> > > ACL, then security.  This gives the encryption xattr a better chance to
> > > be stored in-inode, allowing the other xattr(s) to be deduplicated.
> > > 
> > > Note that it may be better for userspace to format the filesystem with
> > > 512-byte inodes in this case.  However, it's not the default.
> > > 
> > > Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> > 
> > Reviewed-by: Andreas Dilger <adilger@...ger.ca>
> > 
> > Note that we've been using 512-byte xattrs for Lustre metadata servers
> > for ages.  We may want to consider enabling this by default when the
> > filesystem features are set (e.g. crypto, inline data, etc).
> > 
> > Having a general mechanism to bias xattrs to in-inode or external xattr
> > storage would be nice also, but I don't know any way to do this beyond
> > just having a list of xattr names and then prioritizing the ones that
> > go into the in-inode space.
> > 
> 
> I think it's a good idea to have mke2fs default to 512-byte inodes if
> '-O inline_data' is specified.  But with '-O encrypt' it may be more debatable
> because there is no guarantee as to how many files userspace will actually
> choose to encrypt.  It could be almost the whole filesystem, or just a few
> files, or even nothing at all.
> 
> Regardless, I think adjusting the xattr inheritance order (as this patch does)
> has advantages but no real disadvantages, so it might as well be done too.
> 
> Eric

Ted, this patch seems to have gotten missed; are you planning to apply it?  Next
cycle is fine too, but I'd like to get it in sometime.

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ