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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180413201946.GA22641@kroah.com>
Date:   Fri, 13 Apr 2018 22:19:46 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     Christian Brauner <christian.brauner@...ntu.com>,
        viro@...iv.linux.org.uk, tglx@...utronix.de,
        kstewart@...uxfoundation.org, pombredanne@...b.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        serge@...lyn.com
Subject: Re: [PATCH 1/6] fs: use << for MS_* flags

On Fri, Apr 13, 2018 at 09:45:01AM -0700, Randy Dunlap wrote:
> On 04/13/2018 09:11 AM, Christian Brauner wrote:
> > Consistenly use << to define MS_* constants.
> > 
> > Signed-off-by: Christian Brauner <christian.brauner@...ntu.com>
> > ---
> >  include/uapi/linux/fs.h | 33 +++++++++++++++++----------------
> >  1 file changed, 17 insertions(+), 16 deletions(-)
> > 
> > diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
> > index d2a8313fabd7..9662790a657c 100644
> > --- a/include/uapi/linux/fs.h
> > +++ b/include/uapi/linux/fs.h
> > @@ -105,22 +105,23 @@ struct inodes_stat_t {
> >  /*
> >   * These are the fs-independent mount-flags: up to 32 flags are supported
> >   */
> > -#define MS_RDONLY	 1	/* Mount read-only */
> > -#define MS_NOSUID	 2	/* Ignore suid and sgid bits */
> > -#define MS_NODEV	 4	/* Disallow access to device special files */
> > -#define MS_NOEXEC	 8	/* Disallow program execution */
> > -#define MS_SYNCHRONOUS	16	/* Writes are synced at once */
> > -#define MS_REMOUNT	32	/* Alter flags of a mounted FS */
> > -#define MS_MANDLOCK	64	/* Allow mandatory locks on an FS */
> > -#define MS_DIRSYNC	128	/* Directory modifications are synchronous */
> > -#define MS_NOATIME	1024	/* Do not update access times. */
> > -#define MS_NODIRATIME	2048	/* Do not update directory access times */
> > -#define MS_BIND		4096
> > -#define MS_MOVE		8192
> > -#define MS_REC		16384
> > -#define MS_VERBOSE	32768	/* War is peace. Verbosity is silence.
> > -				   MS_VERBOSE is deprecated. */
> > -#define MS_SILENT	32768
> > +#define MS_RDONLY	(1<<0)	/* Mount read-only */
> 
> Why not just use BIT(n) instead?
> 
> #include <linux/bitops.h>
> 
> #define MS_RDONLY	BIT(0)	/* Mount read-only */

BIT() is not exported to uapi files :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ