Re: Why wrapping PIDs is evil [was 32bit]

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Mon Jan 17 2000 - 22:46:21 EST


In <5l7lh8r66z.fsf@tequila.cs.yale.edu> Stefan Monnier (monnier+lists/linux/kernel/news/@tequila.cs.yale.edu) wrote:
>>>>>> "Stephen" == Stephen Frost <sfrost@mail.snowman.net> writes:
>> Of course, who wants to type in a 20 digit number? :) I suppose if
>> you feel the need for security that badly you could patch the kernel to use
>> a 64bit PID space, and just panic when you run out, based on the assumption
>> that something _very_ bad is happening if you run out. :)

> `no wrap around' is not the only answer.
> You could instead fix the problem at the source:
> allow a potential killer to hold on to a process (preventing its
> entry from being reused) just like the parent already does it (leaving
> the child in zombie state until it is reaped).
> This way you could do

> > ps aux | grep foobar
> 1234 10:23 foobar
> > grab 1234
> > ps aux | grep 1234
> 1234 10:23 foobar
> > kill 1234

Interesting question: will `cd /proc/1234' work as `grab 1234' or not ?
I'm not know kernel internals enough to answer but to me it looks like
logical thing to do.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:17 EST