[Lguest] Guest Addresses.

ron minnich rminnich at gmail.com
Thu May 22 01:11:51 EST 2008


On Wed, May 21, 2008 at 1:08 AM, Sujit Sanjeev <sujit771 at gmail.com> wrote:
> Hi,
>
> Thanks for the reply.
>
> Is there a way to directly access guest user space addresses from the
> hypervisor, without copying it contents
> via the guest kernel? i.e. without taking the guest kernel's help.

I'm not totally sure what you mean, but ...

the lguest starter mmaps the kernel code and data and memory for it
(/dev/zero). So, given a symbol, the lguest starter should be able to
just grab it, after mapping the kernel VA to lguest VA. If it's not
resident, lguest process (in user mode, under host mind you) will page
fault on it -- no big deal.

Simple test: run lguest starter, attach with gdb, print out a variable:

anyway, I tried and failed and am out of time to see why:
 gdb Documentation/lguest/lguest
GNU gdb Red Hat Linux (6.6-16.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) attach 3736
Attaching to program:
/home/rminnich/src/iobeast/ericvh-v9fs/Documentation/lguest/lguest,
process 3736
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2

ah but then I need to get the map from KVA to lguest VA, oops.

Oh well the rest is up to you :-) I gotta go work.


ron



More information about the Lguest mailing list