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] [thread-next>] [day] [month] [year] [list]
Message-ID: <726de8d70365597715ed62c0d99bf2a7adaa3362.camel@perches.com>
Date:   Sun, 22 Jul 2018 01:29:07 -0700
From:   Joe Perches <joe@...ches.com>
To:     dev-harsh1998 <harshitjain6751@...il.com>, trivial@...nel.org
Cc:     Michael Hennerich <michael.hennerich@...log.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Simon Budig <simon.budig@...nelconcepts.de>,
        Andi Shyti <andi@...zian.org>,
        Luca Ceresoli <luca@...aceresoli.net>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/11] touchscreen: ad7877: Use octal permissions

On Sun, 2018-07-22 at 00:39 +0530, dev-harsh1998 wrote:
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
[]
> diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
[]
> @@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
>  		return v; \
>  	return sprintf(buf, "%u\n", (unsigned) v); \
>  } \
> -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
> +static DEVICE_ATTR(name, 0444, name ## _show, NULL);

I believe this could be

static DEVICE_ATTR_RO(name)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ