mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] (resend) credentials for 2.5.23
Date: 19 Jun 2002 19:30:35 -0700	[thread overview]
Message-ID: <1024540235.917.127.camel@sinai> (raw)
In-Reply-To: <20020619212909.A3468@redhat.com>

On Wed, 2002-06-19 at 18:29, Benjamin LaHaise wrote:

> This message didn't seem to get through the first time, so here it is 
> again.  The patch is available for review at:
> 
> 	http://www.kvack.org/~blah/v2.5.23-cred.diff

Yow, big patch... that is why it did not make it through.  Vger
(silently) rejects email over ~20KB.

> Several parts of the kernel need to obtain a reference to the 
> credentials of a process: aio, nfs, dirty mmap writebacks to 
> name a few.  Additionally, POSIX threads need to be able to share 
> credentials between clones.  The patch below moves the credentials 
> out of task_struct and into struct cred, which is reference 
> counted.  It also adds support for CLONE_CRED which shares the 
> credentials between threads.  Comments?

Looks good.  I am running it now in my 2.5 tree with no apparent issues
and I looked over the patch and it looked snazzy.

Question: what semantics would be broken if CLONE_CRED was implied by
CLONE_THREAD?  Regardless of code that needs this, it would be nice to
just save the memory when using threads.  Hell,  as far as I am
concerned as long as the tasks still share a VM they could share
credentials - but I am sure that breaks something.

Next, now that all this data no longer belongs solely to current... you
need to be explicit about locking rules.  There is a capability_lock
spinlock but the long semantics are not 100% respected.  I tried to firm
them up in my capability.c cleanup one or two kernels ago... it should
be good enough and not be highly contended.

I guess the only downside would be the extra overhead in our
preciously-fast do_fork... another slab allocation etc. but that is
countered if enough stuff starts using CLONE_CRED.

Oh, and what is with the #if 0 over the set and getaffinity syscalls???
That needs to go!

	Robert Love


  reply	other threads:[~2002-06-20  2:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-20  1:29 Benjamin LaHaise
2002-06-20  2:30 ` Robert Love [this message]
2002-06-20 16:28   ` Benjamin LaHaise
2002-06-20 17:11     ` Robert Love
2002-06-21 11:12       ` Trond Myklebust
2002-06-21 18:52         ` Benjamin LaHaise
2002-06-21 19:17           ` 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=1024540235.917.127.camel@sinai \
    --to=rml@tech9.net \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®