Re: sharing memory with user and kernel



Using shared memory between user and kernel is a horrible approach period.
First it opens a ton of security holes, second it can be quite hard to
handle the problems of the user mode application going away or the driver
wanting to unload. Finally, you have the synchronization problems between
the user and kernel mode, if nothing else sync can eat up as much time as
just passing the data directly. This is really a very bad idea.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply




"Maverick 1288" <Maverick 1288@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:639B2503-149A-4889-B4A1-5A52F1D96A2F@xxxxxxxxxxxxxxxx
Hello,

I developed an application in user mode that capture audio data and stores
the data in shared memory using CreateFileMapping and MapViewOfFile. This
memory is accessible via an API i've developed (standard DLL stuff). I'm
now
working on a virtual mic driver (MSVAD pcemx example drom DDK) and my
intentions is to ovverride the CopyTo function and pump the data from my
shared memory into the mic buffer. Is this a good approach ? and does any
body have an example on how to map the shared memory into the kernel space
?

- henrik


.



Relevant Pages

  • Re: sharing memory with user and kernel
    ... There is no need in going to kernel mode for virtual microphone driver, ... Maxim Shatskih, Windows DDK MVP ... I developed an application in user mode that capture audio data and stores ... the data in shared memory using CreateFileMapping and MapViewOfFile. ...
    (microsoft.public.development.device.drivers)
  • Re: sharing memory with user and kernel
    ... handle the problems of the user mode application going away or the driver ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... the data in shared memory using CreateFileMapping and MapViewOfFile. ... working on a virtual mic driver and my ...
    (microsoft.public.development.device.drivers)
  • Re: sharing memory with user and kernel
    ... handle the problems of the user mode application going away or the driver ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... the data in shared memory using CreateFileMapping and MapViewOfFile. ... working on a virtual mic driver and my ...
    (microsoft.public.development.device.drivers)
  • Re: ZwCreateSection
    ... How are you going to synchronize writes between kernel and user space? ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... when I tried to open the shared memory ...
    (microsoft.public.development.device.drivers)
  • device driver 2.4.20 vs. 2.6.9 virtual memory
    ... We share some memory between user space and the driver by allocating it ... In the kernel driver: ... gives us access to this "common or shared memory". ...
    (RedHat)