* Eugene L. Vorokov <[EMAIL PROTECTED]> [010713 01:33] wrote:
> Forgot to Cc: here:
> 
> > You can't call kernel strlen on a userland address, you must do
> > something like this:
> 
> How so ? It seems to work for me. For instance, I used userland
> address space buffer to simulate __getcwd() syscall on the current
> process (I was hacking open() syscall and log full path of the file
> to the syslog). I simulate mmap() with MAP_ANON and fd == -1 on
> that process, then I do __getcwd() to the buffer allocated, and 
> then I'm very well able to call strlen() on that userland buffer, 
> as well as other str* functions. So generally I think it works.

It may work on i386+freebsd right now, but if kernel address != user
address it will break.

Your code is wrong.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
Ok, who wrote this damn function called '??'?
And why do my programs keep crashing in it?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to