Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2001 14:54:23 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Robert Watson <rwatson@FreeBSD.ORG>, freebsd-arch@FreeBSD.ORG
Subject:   Re: cur{thread/proc}, or not.
Message-ID:  <200111122254.fACMsNd06845@apollo.backplane.com>
References:  <Pine.NEB.3.96L.1011111101234.11566A-100000@fledge.watson.org> <3BF05241.74F895EF@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:The point is that if the credentials are granted, then a
:change in credential is not a change of the credential itself,
:but is instead a copy-on-write proposition.  In other words,
:credentials, once granted, are priviledge stable.
:
:If this is the case, then they are written when they are
:instanced, cloned before they are modified (indeed, it seems
:that the clone/modify operation must be made atomic), and
:thus are never written once instanced -- only destroyed on
:the 1->0 reference transition.
:
:If so, then no locking is required, since the LCK CMPXCHG can
:be utilized to do atomic increment and decrement on the
:reference counting, without needing locks.
:...
:
:-- Terry

    Yes, I believe this is how credentials work.  I looked at
    the code about 6 months ago.  We should not have to do any
    locking of the credential stuff, only simple mutexing
    around the ref counter.  That is how it should work
    is how I believe it currently works.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111122254.fACMsNd06845>