All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: ron minnich <rminnich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Ashwin Ganti
	<ashwin.ganti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	rsc-kPPrOchjzlEAvxtiuMwx3w@public.gmane.org,
	ericvh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jt.beard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Andrew Morgan <morgan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	oleg-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org,
	Eric Paris <eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
Subject: Re: [PATCH 3/3] p9auth: add p9auth driver
Date: Sat, 24 Apr 2010 11:01:35 -0700	[thread overview]
Message-ID: <m11ve4wwzk.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <n2s13426df11004240925id540ed94mc2ebafada0099ec4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (ron minnich's message of "Sat\, 24 Apr 2010 09\:25\:08 -0700")

ron minnich <rminnich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> On Fri, Apr 23, 2010 at 8:36 PM, Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
>> An fs actually seems overkill for two write-only files for
>> process-related information.  Would these actually be candidates
>> for new /proc files?
>>
>>        /proc/grantcred - replaces /dev/caphash, for privileged
>>                tasks to tell the kernel about new setuid
>>                capabilities
>>        /proc/self/usecred - replaces /dev/capuse for unprivileged
>>                tasks to make use of a setuid capability
>
> An fs is fine.
>
> To relate this to Plan 9, where it all began, might be useful. There's
> no equivalent in Plan 9 to Linux/Unix devices of the major/minor
> number etc. variety. In-kernel drivers and out-of-kernel servers both
> end up providing the services (i.e. file name spaces) that we see in a
> Linux file system. So the Plan 9 driver for the capability device
> really does match closely in function and interface to a Linux
> kernel-based file system.
>
> Hence, making devcap a file system is entirely appropriate, because it
> best fits the way it works in Plan 9: a kernel driver that provides
> two files.
>
> It's pretty easy to write a Linux VFS anyway, so it makes sense from
> that point of view.
>
> Eric, that was a great suggestion.

A fs provides user space policy control of naming.  I.e. where the two files go.
That can also be a very big deal.  Especially when files are writable.

You have no idea how much I am frustrated by sysfs right now, because
it does not provide userspace policy control and instead mandates a
sometimes inappropriate naming convention.

Eric

WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman)
To: ron minnich <rminnich@gmail.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>, Greg KH <greg@kroah.com>,
	lkml <linux-kernel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Ashwin Ganti <ashwin.ganti@gmail.com>,
	rsc@swtch.com, ericvh@gmail.com,
	linux-security-module@vger.kernel.org, jt.beard@gmail.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Andrew Morgan <morgan@kernel.org>,
	oleg@us.ibm.com, Eric Paris <eparis@redhat.com>,
	linux-api@vger.kernel.org, Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH 3/3] p9auth: add p9auth driver
Date: Sat, 24 Apr 2010 11:01:35 -0700	[thread overview]
Message-ID: <m11ve4wwzk.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <n2s13426df11004240925id540ed94mc2ebafada0099ec4@mail.gmail.com> (ron minnich's message of "Sat\, 24 Apr 2010 09\:25\:08 -0700")

ron minnich <rminnich@gmail.com> writes:

> On Fri, Apr 23, 2010 at 8:36 PM, Serge E. Hallyn <serue@us.ibm.com> wrote:
>
>> An fs actually seems overkill for two write-only files for
>> process-related information.  Would these actually be candidates
>> for new /proc files?
>>
>>        /proc/grantcred - replaces /dev/caphash, for privileged
>>                tasks to tell the kernel about new setuid
>>                capabilities
>>        /proc/self/usecred - replaces /dev/capuse for unprivileged
>>                tasks to make use of a setuid capability
>
> An fs is fine.
>
> To relate this to Plan 9, where it all began, might be useful. There's
> no equivalent in Plan 9 to Linux/Unix devices of the major/minor
> number etc. variety. In-kernel drivers and out-of-kernel servers both
> end up providing the services (i.e. file name spaces) that we see in a
> Linux file system. So the Plan 9 driver for the capability device
> really does match closely in function and interface to a Linux
> kernel-based file system.
>
> Hence, making devcap a file system is entirely appropriate, because it
> best fits the way it works in Plan 9: a kernel driver that provides
> two files.
>
> It's pretty easy to write a Linux VFS anyway, so it makes sense from
> that point of view.
>
> Eric, that was a great suggestion.

A fs provides user space policy control of naming.  I.e. where the two files go.
That can also be a very big deal.  Especially when files are writable.

You have no idea how much I am frustrated by sysfs right now, because
it does not provide userspace policy control and instead mandates a
sometimes inappropriate naming convention.

Eric



  parent reply	other threads:[~2010-04-24 18:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21  1:27 [PATCH 1/3] p9auth: split core function out of some set*{u,g}id functions Serge E. Hallyn
2010-04-21  1:28 ` [PATCH 2/3] p9auth: add CAP_GRANT_ID to authorize use of /dev/caphash Serge E. Hallyn
2010-04-21  2:54   ` Greg KH
     [not found] ` <20100421012749.GA21338-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-21  1:29   ` [PATCH 3/3] p9auth: add p9auth driver Serge E. Hallyn
2010-04-21  1:29     ` Serge E. Hallyn
     [not found]     ` <20100421012908.GB24251-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-21  3:04       ` Greg KH
2010-04-21  3:04         ` Greg KH
     [not found]         ` <20100421030406.GB10258-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2010-04-21  3:45           ` Serge E. Hallyn
2010-04-21  3:45             ` Serge E. Hallyn
2010-04-21  4:18             ` Ashwin Ganti
2010-04-21  4:18               ` Ashwin Ganti
2010-04-21 13:47               ` Serge E. Hallyn
2010-04-21 13:47                 ` Serge E. Hallyn
     [not found]                 ` <20100421134759.GE16326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-21 14:44                   ` Ashwin Ganti
2010-04-21 14:44                     ` Ashwin Ganti
2010-04-21  4:45             ` Eric W. Biederman
     [not found]               ` <m1zl0xo1m9.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-04-21 13:21                 ` Serge E. Hallyn
2010-04-21 13:21                   ` Serge E. Hallyn
2010-04-24  3:36                 ` Serge E. Hallyn
2010-04-24  3:36                   ` Serge E. Hallyn
2010-04-24 16:25                   ` ron minnich
2010-04-24 16:25                     ` ron minnich
     [not found]                     ` <n2s13426df11004240925id540ed94mc2ebafada0099ec4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-24 18:01                       ` Eric W. Biederman [this message]
2010-04-24 18:01                         ` Eric W. Biederman
2010-04-25  3:24                         ` Serge E. Hallyn
2010-04-21  9:27       ` Alan Cox
2010-04-21  9:27         ` Alan Cox
     [not found]         ` <20100421102739.6ad932fb-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-04-21 13:39           ` Serge E. Hallyn
2010-04-21 13:39             ` Serge E. Hallyn
2010-04-21 14:19             ` Alan Cox
     [not found]               ` <20100421151917.5ae20265-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-04-21 15:09                 ` Serge E. Hallyn
2010-04-21 15:09                   ` Serge E. Hallyn
2010-04-21 19:15                   ` Eric W. Biederman
2010-04-21 20:23                     ` Serge E. Hallyn
2010-04-22  4:57                     ` Kyle Moffett
     [not found]                       ` <w2wf73f7ab81004212157o371c5738o10c8b6ff807ba36a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-22 14:36                         ` Serge E. Hallyn
2010-04-22 14:36                           ` Serge E. Hallyn
2010-04-21 13:55           ` Eric Paris
2010-04-21 13:55             ` Eric Paris
2010-04-21 14:30             ` Serge E. Hallyn
2010-04-21 10:49       ` David Howells
2010-04-21 10:49         ` David Howells
2010-04-21 13:40         ` Serge E. Hallyn
2010-04-21 10:46 ` [PATCH 1/3] p9auth: split core function out of some set*{u,g}id functions David Howells
2010-04-21 13:40   ` Serge E. Hallyn

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=m11ve4wwzk.fsf@fess.ebiederm.org \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=ashwin.ganti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ericvh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=jt.beard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=morgan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=oleg-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org \
    --cc=rminnich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=rsc-kPPrOchjzlEAvxtiuMwx3w@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.