wbenny / hvpp

hvpp is a lightweight Intel x64/VT-x hypervisor written in C++ focused primarily on virtualization of already running operating system
MIT License
1.11k stars 220 forks source link

How to send buffer to driver while the hypervisor is running? #52

Open danyhm opened 1 year ago

danyhm commented 1 year ago

Hello,

I've been struggling with this issue for days and I've looked everywhere I knew would help, however, I'm still having a problem with this

I want to send a small buffer (~1KB) to the driver while the hypervisor is running. I tried creating an IOCTL code specific for this along with the ioctl_enable_io_debugbreak_t::code which is already present. I also tried implementing the on_write() driver function to get the buffer.

no matter the method, the buffer from the user app is always corrupted and the expected data is not present. (the correct size is passed) the buffer is mostly filled with 0xcccccccc along with some other random numbers. I also tried the routine in copy_from_user function where IoAllocateMdl is used then MmProbeAndLockPages. the same kind of garbage is always returned.

any ideas?