Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2005 15:07:06 +0300
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        Aziz Kezzou <french.linuxian@gmail.com>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: FreeBSD Memory Management questions ?
Message-ID:  <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua>
In-Reply-To: <37273927050614012154fdb80b@mail.gmail.com>
References:  <37273927050614012154fdb80b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote:
> 
> 1 - Right now to access the memory address space of a user process
> from kernel mode, I only have to set, on x86 systems, the register CR3
> to the right value.  How can I do that on other architectures ? is
> there an architecture-independant way of doing that ?

Addition to the previous answer.  It is also possible to temporally
map several pages of user memory into the kernel address space.
Check pmap_qenter(9) and see physio -> vmapbuf, for example, how to
use it.  Another method, it is possible to COW a single user page and
then use it in the kernel, but with this method an user process will
not see any modification in this page made by the kernel and vice
versa. Check socow_setup -> vm_page_cowsetup, for example, how to
use it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050614120706.GA539>