Linux filesystem development
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Linux FSdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Dave McCracken <dmccr@us.ibm.com>
Subject: Re: [PATCH] Introduce BSD-style user credential [3/3]
Date: Sat, 31 Aug 2002 03:29:19 +0200	[thread overview]
Message-ID: <15728.7151.27079.551845@charged.uio.no> (raw)
In-Reply-To: <Pine.LNX.4.44.0208301741430.5561-100000@home.transmeta.com>

>>>>> " " == Linus Torvalds <torvalds@transmeta.com> writes:

     > On Sat, 31 Aug 2002, Trond Myklebust wrote:
    >>
    >> task-> ucred is not the unit for implementing shared creds
    >> between threads.

     > Fair enough, but some solution to this has to be found. I do
     > not want to apply something that simply cannot work sanely, and
     > I want to have at least a _plan_ on the table.

The plan is pretty rough at the moment, and not all of the code has
been written yet. Basically, it boils down to:

  Add the COW structure 'vfs_cred'

  Make VFS changes to replace all instances of
  current->fsuid/fsgid/ngroups/groups with a single 'vfs_cred' that
  never can be changed by CLONE_CRED after we call down into the VFS.
  This means that we have to actually invent mechanisms for passing
  those creds down to address_space_operations, inode_operations.

  Add the more volatile 'pcred' a.k.a. 'task_cred' (see below), which
  forms the necessary basis for CLONE_CRED tasks.

  Audit 'task_cred' to ensure that CLONE_CRED won't introduce new
  security holes. Things like capabilities, which can sometimes
  override 'standard credentials', will for instance need to be looked
  into.

  .... end of process -> add CLONE_CRED flag to 'clone()'

     > This really ties in with the patches Dave has done (which are
     > equivalent to your "pcred"), and I'd like to see them work
     > together in practice.

Dave and I have already been discussing this on l-k, and we appear now
to be in agreement on general procedure. Dave has said that he'd like
to contribute once we get vfs_cred well established. I'm hoping he'll
help out on the latter too ;-)

     > (I would suggest calling the FS credentials "struct vfs_cred",
     > while the regular user credentials might just be "struct cred".
     > Other suggestions?)

I'm fine about 'vfs'cred', but how about 'struct task_cred' instead
for the second? That ties them directly in to the task_struct, and
avoids people mistaking for 'ucred'. Since the distinction between COW
and non-COW is pretty profound, it might be useful in order to help
emphasize to which category they belong...

Cheers,
   Trond

  parent reply	other threads:[~2002-08-31  1:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <15727.64653.78081.277222@charged.uio.no>
2002-08-30 23:40 ` [PATCH] Introduce BSD-style user credential [3/3] Linus Torvalds
2002-08-31  0:24   ` Trond Myklebust
2002-08-31  0:49     ` Linus Torvalds
     [not found]     ` <Pine.LNX.4.44.0208301741430.5561-100000@home.transmeta.com>
2002-08-31  0:51       ` Alan Cox
2002-08-31  0:56         ` Trond Myklebust
2002-08-31  1:01         ` Chris Wright
2002-08-31  1:04         ` Linus Torvalds
2002-08-31 16:13         ` Daniel Phillips
2002-08-31 16:43           ` Alan Cox
2002-08-31  1:29       ` Trond Myklebust [this message]
2002-08-31  4:18         ` Linus Torvalds
2002-08-31 12:02           ` Kai Henningsen
2002-08-31 16:30           ` Trond Myklebust
2002-09-01 15:23             ` Daniel Phillips
2002-08-30 23:15 Trond Myklebust

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=15728.7151.27079.551845@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=dmccr@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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