public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org,
	Christopher Brannon <chris@the-brannons.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [PATCH 6/9] drivers/staging/speakup/: avoid world-writable sysfs files.
Date: Tue, 22 Apr 2014 09:37:36 -0700	[thread overview]
Message-ID: <20140422163736.GA23831@kroah.com> (raw)
In-Reply-To: <1398137612-9714-7-git-send-email-rusty@rustcorp.com.au>

On Tue, Apr 22, 2014 at 01:03:29PM +0930, Rusty Russell wrote:
> In line with practice for module parameters, we're adding a build-time
> check that sysfs files aren't world-writable.

Then why not just use the __ATTR_RO() macro?

> 
> Cc: Christopher Brannon <chris@the-brannons.com>
> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> ---
>  drivers/staging/speakup/kobjects.c       | 60 ++++++++++++++++----------------
>  drivers/staging/speakup/speakup_acntpc.c | 14 ++++----
>  drivers/staging/speakup/speakup_acntsa.c | 14 ++++----
>  drivers/staging/speakup/speakup_apollo.c | 16 ++++-----
>  drivers/staging/speakup/speakup_audptr.c | 16 ++++-----
>  drivers/staging/speakup/speakup_bns.c    | 14 ++++----
>  drivers/staging/speakup/speakup_decext.c | 16 ++++-----
>  drivers/staging/speakup/speakup_decpc.c  | 16 ++++-----
>  drivers/staging/speakup/speakup_dectlk.c | 16 ++++-----
>  drivers/staging/speakup/speakup_dtlk.c   | 20 +++++------
>  drivers/staging/speakup/speakup_dummy.c  | 14 ++++----
>  drivers/staging/speakup/speakup_keypc.c  | 10 +++---
>  drivers/staging/speakup/speakup_ltlk.c   | 20 +++++------
>  drivers/staging/speakup/speakup_soft.c   | 22 ++++++------
>  drivers/staging/speakup/speakup_spkout.c | 16 ++++-----
>  drivers/staging/speakup/speakup_txprt.c  | 14 ++++----
>  16 files changed, 149 insertions(+), 149 deletions(-)
> 
> diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
> index 1ca91f7092b1..c4aa13fc2d13 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -853,73 +853,73 @@ static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr,
>  static struct kobj_attribute keymap_attribute =
>  	__ATTR(keymap, S_IWUSR|S_IRUGO, keymap_show, keymap_store);
>  static struct kobj_attribute silent_attribute =
> -	__ATTR(silent, S_IWUGO, NULL, silent_store);
> +	__ATTR(silent, S_IWUSR|S_IWGRP, NULL, silent_store);

__ATTR_WO()?

I'd prefer some "standard" permissions for all of these sysfs files,
it's quite confusing otherwise, don't you agree?

thanks

greg k-h

  reply	other threads:[~2014-04-22 19:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  3:33 [PATCH 0/9] Avoid world-writable sysfs files Rusty Russell
2014-04-22  3:33 ` [PATCH 1/9] drivers/mtd/devices/docg3.c: avoid " Rusty Russell
2014-04-22  3:33 ` [PATCH 2/9] drivers/video/fbdev/sm501fb.c: " Rusty Russell
2014-04-22  3:33 ` [PATCH 3/9] drivers/hid/hid-lg4ff.c: " Rusty Russell
2014-04-22 16:30   ` simon
2014-04-23  5:34     ` Rusty Russell
2014-04-23 15:06       ` simon
2014-04-24  3:25         ` Rusty Russell
     [not found]           ` <gz6xrj.n4iwpm.2st9zt-qmf@smtp.devoid-pointer.net>
2014-04-24  7:14             ` Rusty Russell
2014-04-22  3:33 ` [PATCH 4/9] drivers/scsi/pm8001/pm8001_ctl.c: " Rusty Russell
2014-04-22  3:33 ` [PATCH 5/9] drivers/regulator/virtual: " Rusty Russell
2014-04-22  3:33 ` [PATCH 6/9] drivers/staging/speakup/: " Rusty Russell
2014-04-22 16:37   ` Greg Kroah-Hartman [this message]
2014-04-24  4:27     ` Rusty Russell
2014-04-24 19:29       ` Greg Kroah-Hartman
2014-04-22  3:33 ` [PATCH 7/9] drivers/hid/hid-picolcd_fb: " Rusty Russell
2014-05-02 19:43   ` Bruno Prémont
2014-05-05  1:57     ` Rusty Russell
2014-05-05  9:02       ` Jiri Kosina
2014-04-22  3:33 ` [PATCH 8/9] samples/kobject/: " Rusty Russell
2014-04-22 16:38   ` Greg Kroah-Hartman
2014-04-22  3:33 ` [PATCH 9/9] sysfs: disallow world-writable files Rusty Russell
2015-04-29 12:24   ` Gobinda Charan Maji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140422163736.GA23831@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chris@the-brannons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=samuel.thibault@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox