Re: Finding user/kernel pointer bugs [no html]
From: Timothy Miller
Date: Thu Jun 10 2004 - 09:57:19 EST
Linus Torvalds wrote:
What we do NOT want to have is to continue with these "implied rules".
That's what caused the bugs in the first place. I really want the user
pointers to be _explicit_, because not only does that mean that a stupid
tool can figure it out with purely "local" knowledge, but more
importantly, it means that a _programmer_ can figure it out with purely
local knowledge.
Are user pointers actual pointers? That's much too tempting to dereference.
If you really want to force user space accesses to follow certain rules,
make them longs or structs (or at least void *) (depending on
architecture) so that only the proper user-space-access functions can
interpret them.
Now, if this "handle" corresponds directly to a user space pointer,
someone might cast it and dereference it, but that would be easy to
detect, and such patches would be easy to reject.
Bad idea?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/