VirtualAlloc + AllocateCommonBuffer

Can i map the allocated buffer returned from AllocateCommonBuffer to
user space with VirtualAlloc?
I want to do that in order to eliminate buffer copy and flush the data
directly to HardDisk when an interrupt occurs
informing the existance of valid data in the buffer.

Thanks

Since the buffer allocated with AllocateCommonBuffer would contain
datastructures which control the device. Exposing such buffers to
userspace is a security threat.

You can setup private IOCTL with the device driver and use MDL’s to
transfer data to kernel space. (This should avoid copies).

There is a MapMem example in the NT4 DDK which contains a example of
how to map kernel memory ot userspace via section objects, not sure if
it works on 2000 and above though.

snapper.

On 8/5/05, Nikolas Stylianides wrote:
> Can i map the allocated buffer returned from AllocateCommonBuffer to
> user space with VirtualAlloc?
> I want to do that in order to eliminate buffer copy and flush the data
> directly to HardDisk when an interrupt occurs
> informing the existance of valid data in the buffer.
>
> Thanks
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>