LWN.net Logo

Solving the process ID allocation problem

Solving the process ID allocation problem

Posted Sep 25, 2002 13:51 UTC (Wed) by oneukum (subscriber, #3970)
In reply to: Solving the process ID allocation problem by cpeterso
Parent article: Solving the process ID allocation problem

The PID is an argument of some system calls. The kernel cannot for reasons of security,
accept a pointer into kernel memory which user spaces feeds it.
PIDs must be in some kind of table, so that they can be verfied.


(Log in to post comments)

Solving the process ID allocation problem

Posted Sep 29, 2002 17:40 UTC (Sun) by GreyWizard (subscriber, #1026) [Link]

The kernel cannot for reasons of security, accept a pointer into kernel memory which user spaces feeds it.

Well, sure. But that's not what was suggested. Just because a valid process identifier is identical to the memory address of a process struct doesn't mean the kernel can't look it up values passed in from user space in a hash table before acting on them. The code that creates processes would cast the pointer and the rest of the system would remain unchanged.

(I agree this makes a PID hard to type, especially on 64 bit systems, but things like job control and terminal cut-and-paste mitigate this somewhat.)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds