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
| ||
|
Date: Fri, 22 Jun 2018 10:25:33 +0200 From: Jan Kara <jack@...e.cz> To: Ross Zwisler <ross.zwisler@...ux.intel.com> Cc: Jan Kara <jack@...e.cz>, Dan Williams <dan.j.williams@...el.com>, Dave Chinner <david@...morbit.com>, Christoph Hellwig <hch@....de>, linux-nvdimm@...ts.01.org, Jeff Moyer <jmoyer@...hat.com>, linux-ext4@...r.kernel.org Subject: Re: [PATCH 2/2] ext4: handle layout changes to pinned DAX mappings On Wed 20-06-18 16:15:03, Ross Zwisler wrote: > diff --git a/fs/ext4/truncate.h b/fs/ext4/truncate.h > index 0cb13badf473..a3b78241e9f6 100644 > --- a/fs/ext4/truncate.h > +++ b/fs/ext4/truncate.h > @@ -12,6 +12,7 @@ > static inline void ext4_truncate_failed_write(struct inode *inode) > { > down_write(&EXT4_I(inode)->i_mmap_sem); > + ext4_break_layouts(inode); > truncate_inode_pages(inode->i_mapping, inode->i_size); > ext4_truncate(inode); > up_write(&EXT4_I(inode)->i_mmap_sem); One comment here: I don't think ext4_break_layouts() is necessary here. ext4_truncate_failed_write() exists to truncate blocks beyond EOF. As such these blocks could never be even mmaped, let alone pinned by GUP. Maybe just add a comment that blocks we are truncating here were never visible to userspace and so we don't need ext4_break_layouts() protection. Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists