[vbox-dev] How to access Linux guess user space memory address ?

Huihong Luo huisinro at yahoo.com
Thu Aug 27 23:29:03 UTC 2015


Hi Guys,
I have a question regarding to accessing to guess user space memory access,  and I hope I can get some helps here.
This is the scenario:
inside a Linux kernel driver, we lock the pages, and then send the guest address to vbox using a virtual device.

// buffer is passed from user space program
void read_write(struct file *filp, char __user *buffer,  size_t bufflen, int is_write){        // lock each page , then send the guest address to vbox through a virtual device
        get_user_pages(current, current->mm, buffer, 1, !is_write, 0, &page, NULL);  
     
        send_to_vbox(buffer);
}
now inside the vbox, how do I get access to the user space address?
I tried the following vbox apis, but seems I am getting the wrong address:
PDMDevHlpPhysGCPtr2GCPhysPDMDevHlpPhysGCPhys2GCPtr
Any helps are greatly appreciated.

Thanks,
- Huihong

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150827/840d7ae5/attachment.html 


More information about the vbox-dev mailing list