From owner-freebsd-threads@FreeBSD.ORG Thu Apr 24 21:09:59 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0A4837B404; Thu, 24 Apr 2003 21:09:58 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC32543FD7; Thu, 24 Apr 2003 21:09:57 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h3P49tjC020539; Thu, 24 Apr 2003 21:09:55 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h3P49tXc020538; Thu, 24 Apr 2003 21:09:55 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 24 Apr 2003 21:09:55 -0700 From: David Schultz To: Tim Robbins Message-ID: <20030425040955.GA20513@HAL9000.homeunix.com> Mail-Followup-To: Tim Robbins , freebsd-threads@freebsd.org References: <20030425131656.A93380@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030425131656.A93380@dilbert.robbins.dropbear.id.au> cc: freebsd-threads@FreeBSD.ORG Subject: Re: Threading and credential changes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2003 04:09:59 -0000 On Fri, Apr 25, 2003, Tim Robbins wrote: > I'm trying to understand the way a thread's td_ucred is updated. In ast(), > cred_update_thread() is called to update it when it doesn't match the one > stored in the proc. However, setuid() etc. don't set the TDF_ASTPENDING flag > on any threads, not even the current thread. Am I misunderstanding what ast() > does, does the thread's cred get updated in some other way, or is this a bug? This may not answer your question entirely, but rwatson gave a very nice explanation of how and why ucreds are cached in a post to current@ a while ago: http://www.freebsd.org/cgi/getmsg.cgi?fetch=637312+0+/usr/local/www/db/text/2003/freebsd-current/20030209.freebsd-current