lkml.org 
[lkml]   [2008]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/59] Introduce credentials
On Thu, Aug 28, 2008 at 10:45:03AM +0100, Alan Cox wrote:
> On Thu, 28 Aug 2008 10:19:44 +0100
> David Howells <dhowells@redhat.com> wrote:
>
> > Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >
> > > > We get a number of things:
> > > >
> > > > (1) Multiple credential changes all happen simultaneously (setresuid() for
> > > > example). The new set of credentials is committed with a single RCU
> > > > assignment.
> > >
> > > Makes sense - except for the question of bounding memory utilisation.
> >
> > Would it make sense to call synchronise_rcu() from commit_creds() or from
> > setuid()/setresuid()/setgroups()/etc. to make sure that some user process
> > doing:
> >
> > while (1)
> > alter_credentials();
> >
> > doesn't run the system out of memory by having loads of frees waiting in RCU's
> > queues because put_cred() uses call_rcu() to defer the destruction.
>
> I suspect you to - or every "nth" event - building up a small queue as
> would occur in normal usage probably isn't a problem.

Makes sense to me, given that we should not expect real-time determinism
out of alter_credentials(). ;-)

Thanx, Paul


\
 
 \ /
  Last update: 2008-08-28 22:31    [W:0.066 / U:87.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site