Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Nov 2001 10:15:16 -0800
From:      Kirk McKusick <mckusick@mckusick.com>
To:        Robert Watson <rwatson@FreeBSD.ORG>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: cur{thread/proc}, or not. 
Message-ID:  <200111111815.fABIFG336949@beastie.mckusick.com>
In-Reply-To: Your message of "Sun, 11 Nov 2001 10:31:54 EST." <Pine.NEB.3.96L.1011111101234.11566A-100000@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Some many years ago, I tried to get rid of all the references to
curproc in the filesystem code, and quickly came to the realization
that it would require adding a proc pointer to virtually every
subroutine in the filesystem code. For the reasons that you have
noted, this is ugly and adds bloat to the stack space. On the other
hand, there are places where the filesystem code does not want to
use the current process credential. One of the more evident ones
is in the NFS server code which wants to pass down the credential
of the requesting client rather than its own. Solaris uses a very
ugly hack where the server thread replaces its credential with that
of its client, does the VOP call, then puts its own credential back
when it returns. This sort of problem could exist in almost any
instance where the kernel is acting as a server. So, completely
removing process/credential references from the kernel interfaces
is not the right solution either.

	Kirk

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?200111111815.fABIFG336949>