Date: Fri, 13 Jul 2001 10:46:25 +0400 (MSD) From: "Eugene L. Vorokov" <vel@bugz.infotecs.ru> To: freebsd-hackers@freebsd.org Subject: Re: Some questions about kernel programming Message-ID: <200107130646.f6D6kPR01837@bugz.infotecs.ru> In-Reply-To: <20010712212809.F6664@sneakerz.org> "from Alfred Perlstein at Jul 12, 2001 09:28:09 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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. Regards, Eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107130646.f6D6kPR01837>