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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 May 2020 09:58:19 +0200 From: Jan Kara <jack@...e.cz> To: ira.weiny@...el.com Cc: linux-ext4@...r.kernel.org, Andreas Dilger <adilger.kernel@...ger.ca>, "Theodore Y. Ts'o" <tytso@....edu>, Jan Kara <jack@...e.cz>, Eric Biggers <ebiggers@...nel.org>, Al Viro <viro@...iv.linux.org.uk>, Dan Williams <dan.j.williams@...el.com>, Dave Chinner <david@...morbit.com>, Christoph Hellwig <hch@....de>, Jeff Moyer <jmoyer@...hat.com>, "Darrick J. Wong" <darrick.wong@...cle.com>, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH V4 1/8] fs/ext4: Narrow scope of DAX check in setflags On Thu 21-05-20 12:13:06, ira.weiny@...el.com wrote: > From: Ira Weiny <ira.weiny@...el.com> > > When preventing DAX and journaling on an inode. Use the effective DAX > check rather than the mount option. > > This will be required to support per inode DAX flags. > > Reviewed-by: Jan Kara <jack@...e.cz> > Signed-off-by: Ira Weiny <ira.weiny@...el.com> ... > diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c > index bfc1281fc4cb..5813e5e73eab 100644 > --- a/fs/ext4/ioctl.c > +++ b/fs/ext4/ioctl.c > @@ -393,9 +393,9 @@ static int ext4_ioctl_setflags(struct inode *inode, > if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) { > /* > * Changes to the journaling mode can cause unsafe changes to > - * S_DAX if we are using the DAX mount option. > + * S_DAX if the inode is DAX > */ > - if (test_opt(inode->i_sb, DAX)) { > + if (IS_DAX(inode)) { > err = -EBUSY; > goto flags_out; > } Now one problem popped up in my mind: We should also make EXT4_JOURNAL_DATA_FL and EXT4_DAX_FL exclusive so that both cannot be turned on at the same time. And IS_DAX() check isn't enough for that. Sorry for not noticing earlier... it's like peeling an onion... Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists