From owner-freebsd-arch Mon Nov 12 15:20:22 2001 Delivered-To: freebsd-arch@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 09D5937B416; Mon, 12 Nov 2001 15:20:15 -0800 (PST) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA95324; Mon, 12 Nov 2001 15:04:27 -0800 (PST) Date: Mon, 12 Nov 2001 15:04:27 -0800 (PST) From: Julian Elischer To: Matthew Dillon Cc: Terry Lambert , Robert Watson , freebsd-arch@FreeBSD.ORG Subject: Re: cur{thread/proc}, or not. In-Reply-To: <200111122254.fACMsNd06845@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 12 Nov 2001, Matthew Dillon wrote: > :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. This is not how they work, but rather how they WILL work given that the commit happens soon (maybe it was already done last week and I missed it...) > > -Matt > Matthew Dillon > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message