Arjan van de Ven <[email protected]> writes: > On Tue, 2006-01-24 at 21:11 +0000, Alan Cox wrote: >> On Maw, 2006-01-24 at 12:26 -0700, Eric W. Biederman wrote: >> > There is at least NFS lockd that appreciates having a single integer >> > per process unique identifier. So there is a practical basis for >> > wanting such a thing. >> >> Which gets us back to refcounting. >> >> > At least for this first round I think talking about a kpid >> > as a container, pid pair makes a lot of sense for the moment, as >> > the other implementations just confuse things. >> >> As an abstract object a kpid to me means a single identifier which >> uniquely identifies the process and which in its component parts be they >> pointers or not uniquely identifies the process in the container and the >> container in the system, both correctly refcounted against re-use. > > they why not just straight use the task struct pointer for this? It's > guaranteed unique.. ;) Actually I think that is a very sensible solution to this problem. It does double or triple the length of the string passed to lockd and is an information leak about which kernel addresses you are running out of which may be undesirable from a security perspective but I think that will fix the practical problem. Reference counting in this case is not an issue, as these are per process locks and should be freed up when everything goes. I have a weird memory that simply making the string long and using %p (current) didn't work as well as of %d (current->kpid) but that is something very hard to test, as usually even with multiple pid spaces you don't get pid reuse and the errors from NFS are not at all clear that pid reuse is what is causing problems. So I don't have good data on that situation. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Trond Myklebust <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- References:
- RFC [patch 00/34] PID Virtualization Overview
- From: Serge Hallyn <[email protected]>
- RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Serge Hallyn <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Arjan van de Ven <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: "Serge E. Hallyn" <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Alan Cox <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Greg KH <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Hubertus Franke <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Hubertus Franke <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Alan Cox <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Alan Cox <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Alan Cox <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Arjan van de Ven <[email protected]>
- RFC [patch 00/34] PID Virtualization Overview
- Prev by Date: [PATCH]scsi:removal of the variable "ordered_flush"
- Next by Date: Re: [PATCH]scsi:removal of the variable "ordered_flush"
- Previous by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Next by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Index(es):