Re: [PATCH v2] vfs: use "none" if mount source is empty string

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

 



On Tue, May 15, 2018 at 01:18:00PM +0800, Yecheng Fu wrote:
> On Thu, Apr 19, 2018 at 04:32:56AM -0700, Matthew Wilcox wrote:
> > On Thu, Apr 19, 2018 at 11:47:21AM +0800, Yecheng Fu wrote:
> > > `libmount` from util-linux and many softwares in userspace (e.g.
> > > kubelet) did not expect empty string as mount source:
> > > 
> > > ```
> > > $ mount -t tmpfs "" /mnt/tmpfs
> > > $ findmnt /mnt/tmpfs
> > > findmnt: /proc/self/mountinfo: parse error at line 51
> > > $ cat /proc/self/mountinfo | grep -P '\/mnt\/tmpfs'
> > > 74 25 0:59 / /mnt/tmpfs rw,relatime shared:38 - tmpfs  rw
> > > $ cat /proc/self/mounts | grep -P '\/mnt\/tmpfs'
> > >  /mnt/tmpfs tmpfs rw,relatime 0 0
> > > ```
> > > 
> > > `source` field in mounts/mountinfo is empty, which breaks a lot of
> > > mounts/mountinfo parsers.
> > > 
> > > This fixes issues in parsing when user uses empty string as mount
> > > source.
> > > 
> > > Cc: Karel Zak <kzak@xxxxxxxxxx>
> > > Signed-off-by: Yecheng Fu <cofyc.jackson@xxxxxxxxx>
> > 
> > Reviewed-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> 
> hi, I'm a newbie here. Will this be merged or is there still something I
> need to do?
> 
> I had submitted a patch to [util-linux](https://github.com/karelzak/util-linux/pull/619). Karel prefer kernel side bugfix than rewrite all the sscanf() stuff and I agree. Kernel side bugfix also fixes all parsers too.
> 
> -- 
> Yecheng Fu

hi, didn't receive any updates for months, sorry to ping again in case
someone missed it. 

Karel patched util-linux to work around this issue now [^1], but I hope this
can be fixed on kernel side too to improve compatibility.

[^1]: https://github.com/karelzak/util-linux/commit/18a52a5094f820b5da013daf5972eb8e65be9680

-- 
Yecheng Fu



[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