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  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]
Date:   Wed, 20 May 2020 16:11:38 +0200
From:   Jan Kara <>
        Andreas Dilger <>,
        "Theodore Y. Ts'o" <>, Jan Kara <>,
        Eric Biggers <>,
        Al Viro <>,
        Dan Williams <>,
        Dave Chinner <>,
        Christoph Hellwig <>, Jeff Moyer <>,
        "Darrick J. Wong" <>,,
Subject: Re: [PATCH V3 7/8] fs/ext4: Introduce DAX inode flag

On Tue 19-05-20 22:57:52, wrote:
> From: Ira Weiny <>
> Add a flag to preserve FS_XFLAG_DAX in the ext4 inode.
> Set the flag to be user visible and changeable.  Set the flag to be
> inherited.  Allow applications to change the flag at any time with the
> exception of if VERITY or ENCRYPT is set.
> Disallow setting VERITY or ENCRYPT if DAX is set.
> Finally, on regular files, flag the inode to not be cached to facilitate
> changing S_DAX on the next creation of the inode.
> Signed-off-by: Ira Weiny <>

The patch looks good to me. You can add:

Reviewed-by: Jan Kara <>

One comment below:

> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 5ba65eb0e2ef..be9713e898eb 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1323,6 +1323,9 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len,
>  	if (WARN_ON_ONCE(IS_DAX(inode) && i_size_read(inode)))
>  		return -EINVAL;

AFAIU this check is here so that fscrypt_inherit_context() is able call us
and we can clear S_DAX flag. So can't we rather move this below the
EXT4_INODE_DAX check and change this to

	IS_DAX(inode) && !(inode->i_flags & I_NEW)

? Because as I'm reading the code now, this should never trigger?

> +	if (ext4_test_inode_flag(inode, EXT4_INODE_DAX))
> +		return -EOPNOTSUPP;
> +

Jan Kara <>

Powered by blists - more mailing lists