Re: [PATCH] Uniquely identifying memory usage

Ralf Baechle (ralf@uni-koblenz.de)
Fri, 30 Jul 1999 07:33:53 +0200


On Thu, Jul 29, 1999 at 10:34:36AM -0500, cd_smith@ou.edu wrote:

> On Fri, 30 Jul 1999, Martijn van Oosterhout wrote:
> > Wouldn't it be a lot easier if the id was simply current->mm?
> > Thus when CLONE_MM is used they get the same number. Guarenteed
> > never to be reused while in use.
>
> Yeah, it would. Is there any good reason not to do this? If this doesn't
> have problems, why isn't the same thing done for other kernel ID's? I
> can't think of a single place in the kernel where kernel space pointers
> get exported to user space as opaque handles, and that makes me nervous
> about being the first person to do it. (OTOH, I can think of several
> places where NT does this... which makes me even more nervous about doing
> it in Linux. <g>)

It's much easier to change the validity of a small integer as an id than
a pointer. Think of file descriptors, for example.

Ralf

-
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/