I'm writing a kernel mode driver in Windows 10 (64-bit), whose main purpose is to read from a DMA, and I was wondering if instead of copying blocks of memory from the kernel space to buffers allocated in the user space, I could somehow expose an address to the user space (of course not the physical address), and save on the memory copy operation.
Perhaps something like this:
Allocating a block of continuous physical memory (and mapping the physical address to a virtual address in the kernel space).
Mapping the virtual address in the kernel space to a virtual address in the user space.
By the way, since there's only one kernel space, and as many user spaces as there are processes running in the system (is that correct?), I would have to use some kind of a handle to the calling process, in order to get the virtual address in the appropriate process...
Thanks for your time!