Re: [PATCH 2/2] SELinux: display SELinux mount options in /proc/mounts

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

 



> > I'm ignoring seq_* failures.  Which kinda scares me since it means i
> > could get half of one option and half of another and the user would not
> > realize it.  Maybe I should build a single string for each selinux
> > option and do a single seq_puts() so seq_* failure only means missing
> > options, not possibly corrupted options...
> 
> And is it even adequate to return an incomplete set of options with no
> indication of truncation to userspace?  How do we expect userland to use
> the /proc/mounts output?

seq_file deals with all that: retries with bigger buffer, or if
allocation fails return ENOMEM.  So userspace will never see a
truncated output and callers only need to bother with their own
errors.

It's quite clever, really :)

Miklos
--
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