Subject: Re: Process credentials change
To: Christos Zoulas <christos@astron.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/10/2006 16:36:20
--AGZzQgpsuUlWC1xT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 10, 2006 at 10:57:37PM +0000, Christos Zoulas wrote:
> In article <8C051768-2648-46DC-89A3-22FA600CB5AC@shagadelic.org>,
> Jason Thorpe  <thorpej@shagadelic.org> wrote:
> >
> >On Jul 10, 2006, at 1:39 PM, Bill Studenmund wrote:
> >
> >Unless you consider that an LWP entering the kernel is like a =20
> >"transaction", and that the credential state should remain constant =20
> >from the beginning to the end of the "transaction".  Do you agree?
> >
> >If so, then it makes PERFECT sense to set the LWP's creds upon kernel =
=20
> >entry, and not change those creds unless the LWP is requesting a cred =
=20
> >change.  That way, a cred change by the proc while the LWP sleeps =20
> >(disk I/O?) won't screw up whatever the LWP is (legitimately) trying =20
> >to do with the creds it started out with.
>=20
> Seeing that credential changes happen rather infrequently, doesn't it
> make more sense to update the credential pointers of each lwp when the
> change is happening rather than upon each kernel entry?

No. The idea Jason's going with is that you look at what the credentials=20
are when you start a system call, and you leave them alone during the=20
call. So you only change an LWP's credentials at a very set time.

Take care,

Bill

--AGZzQgpsuUlWC1xT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFEsuR0Wz+3JHUci9cRAsTbAJ9VHWEmwu893wByHTBXmg/D54wqAgCffWUO
cJctXny0by2naMRRkpIr6G0=
=2wrn
-----END PGP SIGNATURE-----

--AGZzQgpsuUlWC1xT--