From owner-freebsd-current@FreeBSD.ORG Thu Aug 6 15:10:23 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6501B1065673 for ; Thu, 6 Aug 2009 15:10:23 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outV.internet-mail-service.net (outv.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id 3F8138FC0A for ; Thu, 6 Aug 2009 15:10:23 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 34542B0CFD; Thu, 6 Aug 2009 08:10:23 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id DB18F2D600D; Thu, 6 Aug 2009 08:10:21 -0700 (PDT) Message-ID: <4A7AF25D.40608@elischer.org> Date: Thu, 06 Aug 2009 08:10:21 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Rick Macklem References: <20090804225806.GA54680@hub.freebsd.org> <20090805054115.O93661@maildrop.int.zabbadoz.net> <20090805063417.GA10969@doormat.home> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 07 Aug 2009 16:01:06 +0000 Cc: jeff@FreeBSD.org, "Bjoern A. Zeeb" , lstewart@FreeBSD.org, freebsd-current@FreeBSD.org, kib@FreeBSD.org, Navdeep Parhar , Navdeep Parhar , Larry Rosenman , Robert Watson Subject: Re: reproducible panic in netisr X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 15:10:23 -0000 Rick Macklem wrote: > > > On Thu, 6 Aug 2009, Robert Watson wrote: > >> other places where we have very strong alignment requirements on >> i386/amd64, such as the td_ucred pointer that we check for change on >> system calls/traps to see if we need to refresh the thread's >> credential from the process credential. >> > Does this imply that the nfs/krpc hack of: > oldcred = td->td_ucred; > td->td_ucred = "some other cred ptr" > ... > td->td_ucred = oldcred; > > could be dangerous? > > Maybe it should be converted to code that replaces the contents instead > of replacing the *cred? (Variants of the above live in a bunch of places > in the krpc, nlm and nfs code, due to the fact that the socket functions > use td->td_ucred in various places.) no, creds are read-only .. you never change a cred. You alwasy make a new one ans use it, becasue you may be shareing your cred with hundreds of other sibling threads or processes. (they are refcounted) > > rick > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"