linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: linux-kernel@vger.kernel.org, Kees Cook <kees.cook@canonical.com>,
	Eugene Teo <eugeneteo@gmail.com>
Subject: Re: [RFC] add mount options to sysfs
Date: Wed, 18 May 2011 09:39:51 -0700	[thread overview]
Message-ID: <20110518163951.GA24143@suse.de> (raw)
In-Reply-To: <20110518163142.GA3367@albatros>

On Wed, May 18, 2011 at 08:31:44PM +0400, Vasiliy Kulikov wrote:
> Currently there is no good way to effectively globally restrict an
> access to sysfs files.  It's possible only to chmod the sysfs'
> root/directories to fully deny access to sysfs (sub-)tree to some users
> or chmod files after they are created.  The latter approach is racy,
> however.

Why do you want to do this?  What is in sysfs files that is not
gloabally ok to access?  That should be fixed first, if at all, instead
of wanting to modify the whole sysfs tree, right?

> The patch introduces sysfs mount options parsing and adds 4 new options:
> uid, gid, mode and umask.  uid, gid, and umask are classical options,
> mode is a global restricting mode mask that defined the most relaxed
> possible file mode.  E.g. if mode=0750 then "chmod 0664" changes file's
> permissions to 0640.

What is going to break if you do this?  Have you tested it?  I'd be very
worried about this.

Again, what's the root problem you are trying to solve here?

thanks,

greg k-h

  reply	other threads:[~2011-05-18 16:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 16:31 [RFC] add mount options to sysfs Vasiliy Kulikov
2011-05-18 16:39 ` Greg KH [this message]
2011-05-18 17:05   ` Vasiliy Kulikov
2011-05-18 19:17     ` Greg KH
2011-05-19  6:26       ` Vasiliy Kulikov
2011-05-19 17:12         ` Greg KH
2011-05-20  9:59           ` Vasiliy Kulikov
2011-05-20 13:30             ` Greg KH
2011-05-20 13:34               ` Vasiliy Kulikov
2011-05-20 13:36                 ` Vasiliy Kulikov
2011-05-20 13:54                   ` Greg KH
2011-05-20 15:17                     ` Kees Cook

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=20110518163951.GA24143@suse.de \
    --to=gregkh@suse.de \
    --cc=eugeneteo@gmail.com \
    --cc=kees.cook@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=segooon@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).