Subject: Re: curproc removal (NFS, ...)
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 05/26/2004 13:38:35
In message <20040526051954.GA1522@diana.nimenees.com>Eric Haszlakiewicz writes


>	Can't this end up in the so_pcb, get filled in at connect time
>and then be entirely private to unix domain sockets?  [...]

No, I dont think so, for the reasons already sketched out by der Mouse
and Steven Bellovin. What you care about is the process open-file
state of the process performing (or responsible for) the receive operation.

The way I see it we have two choices: (mis)use the uio->uio_procp,
or pass an explicit struct proc * argument.

For the latter, I would document it as used only for Unix-domain
sockets and even then only for SCM_RIGHTSexternalizing fd's being
passed between processes in an SCM_RIGHTS message.  Personall, I could
live with that restriction on the uio->uio_procp.

That just leaves the (ifdef'd out) accounting. I could live with
documenting that per-process receive message accounting just plain
won't be done, when and if you pass soreceive() a NULL uio->uio_procp.