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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110302150607.GD14636@nb.net.home>
Date:	Wed, 2 Mar 2011 16:06:07 +0100
From:	Karel Zak <kzak@...hat.com>
To:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:	linux-kernel@...r.kernel.org, t.artem@...lcity.com,
	Roman Zippel <zippel@...ux-m68k.org>
Subject: Re: MS_SILENT vs. vfat and hfs

On Wed, Mar 02, 2011 at 03:43:03PM +0100, Karel Zak wrote:
> On Wed, Mar 02, 2011 at 11:14:28PM +0900, OGAWA Hirofumi wrote:
> > Karel Zak <kzak@...hat.com> writes:
> > 
> > >  The mount(8) command uses "quiet" mount option as a synonym to the
> > >  MS_SILENT mount flag (since util-linux 2.7, Aug 1997).
> > >
> > >  It means than on systems where is properly defined the MS_SILENT
> > >  mount flags in headers is the "quiet" mount option always translated
> > >  to the MS_SILENT mount flags and "quiet" string is never send to FS
> > >  drivers.
> > >
> > >    $ strace -e mount mount -o quiet /dev/sdb1 /mnt/test
> > >    mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0
> > >                                                       ^^^^^^^^^
> > >
> > >  Unfortunately, 
> > >  
> > >    $ grep -r \"quiet\" *
> > >
> > >    fat/inode.c:    {Opt_quiet, "quiet"},
> > >    hfs/super.c:    { opt_quiet, "quiet" },
> > >
> > >  vfat and hfs drivers use "quiet" as a mount option. That's bug.
> > >
> > >  There should not be a collision between mount(8) mount options and
> > >  filesystem specific mount options.
> > >
> > >  My suggestion is to fix the fat and hfs code to use something other
> > >  than "quiet" (shutup, noisless, ...). I think you don't have to care
> > >  about backward compatibility, because it's probably broken for years.
> > 
> > No. Actually the _new_ option is MS_SILENT. In history, there was no
> > MS_SILENT (it was called MS_VERBOSE) in kernel, then _added_ newly, and
> > never be enabled MS_SILENT in mount command until that.
> 
>  I know, but I don't care which option is newer. I'd like to found a
>  solution with minimal impact to users.
> 
> > So, my suggestion is use "silent" (or something) as MS_SILENT for
> > backward compatibility. Because the "quiet" is already hardcoded by some
> > userland apps for vfat.
> 
>  Then all people who use "quiet" in their fstab will see problems...

 I'll probably add an exception for vfat and hfs to mount(8), "silent"
 as MS_SILENT and mark "quiet" as deprecated for non-fat filesystems.

    Karel

-- 
 Karel Zak  <kzak@...hat.com>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ