Re: [PATCH] procfs: stop using vmtruncate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 21, 2011 at 03:05:26AM +0100, Al Viro wrote:
> On Mon, Jun 20, 2011 at 06:47:27PM -0400, Christoph Hellwig wrote:
> > Procfs doens't have any ->truncate instances, so all vmtruncate calls can
> > be replaced with truncate_setsize, given that we've just done the
> > inode_newsize_ok check as part of inode_change_ok just before.
> 
> What files on procfs allow meaningful truncate anyway?  I agree that
> vmtruncate() there is bogus, but AFAICT we have the following picture:
> 	* there are files with non-zero i_size (/proc/kcore and
> /proc/bus/pci/*/*); for any of those ATTR_SIZE should fail and I don't
> think it should fail silently.
> 	* the rest has size 0 and for those ATTR_SIZE to non-0 length
> should definitely fail with an error.

True.  We probably should simply refuse any ATTR_SIZE calls.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux