Re: [PATCH 8/9] fs: don't allow kernel reads and writes without iter ops

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

 



On Fri, Jun 26, 2020 at 12:27:52PM +0000, Luis Chamberlain wrote:
> On Fri, Jun 26, 2020 at 09:58:35AM +0200, Christoph Hellwig wrote:
> > diff --git a/fs/read_write.c b/fs/read_write.c
> > index e765c95ff3440d..ae463bcadb6906 100644
> > --- a/fs/read_write.c
> > +++ b/fs/read_write.c
> > @@ -420,6 +420,18 @@ ssize_t iter_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos,
> >  	return ret;
> >  }
> >  
> > +static void warn_unsupported(struct file *file, const char *op)
> > +{
> > +	char pathname[128], *path;
> 
> Why 128? How about kstrdup_quotable_file()?

This is in the read/write path for the case where we did not end up
calling in the driver.  This is far less stack usage than any read/write
method would have used eventually.



[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