Subject: Re: kcopy()
To: Andrew Brown <atatat@atatdot.net>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 12/21/2003 09:23:35
Is it just me, or does interface to read arbitrary kernel memory
location using sysctl() sound really broken?

Jaromir

Andrew Brown wrote:
> >> i've got two pointers.
> >> 
> >> one may or may not be a valid kernel pointer.  i can't tell.
> >> 
> >> the other may be a pointer into userspace or a pointer into kernel
> >> space.  i can tell which kind it is, and if it's the latter, i'm
> >> perfectly willing to assume that it's valid.
> >
> >I give up.  How can you tell if a pointer is to userspace or kernel
> >space?
> 
> oh, because i have a third pointer (to a struct lwp) that will be null
> (or not null) if the second pointer is into kernel space (or user
> space).
> 
> -- 
> |-----< "CODE WARRIOR" >-----|
> codewarrior@daemon.org             * "ah!  i see you have the internet
> twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
> werdna@squooshy.com       * "information is power -- share the wealth."
> 

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-