On Monday 27 February 2006 13:31, John-Mark Gurney wrote: > Tanmay wrote this message on Mon, Feb 27, 2006 at 13:56 +0530: > > How do I access the address space ie text,data and stack of a (user > > level)process whose pid I know from my kld. for eg: Suppose 'vi' is running > > and I want to access its address space through my kld, then how do I do it? > > You look up the process with pfind(9), and then you can use uio(9) to > transfer data into kernel space... Don't forget to PROC_UNLOCK the > struct once you are done referencing it.
You can use the proc_rwmem() function (it takes a uio and a struct proc) to do the actual I/O portion. You can see example use in the ptrace() syscall. -- John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

