|
From: Gerard Harkema Gerard on 18 Apr 2008 04:44 In our driver we use pointers to usermemory in the inputbuffer. In the EvtDeviceIoControl we call the WdfRequestRetrieveInputBuffer function to get the input buffer. How can we lock this memory for read and write using KMDF. Thanks, Gerard
From: Don Burn on 18 Apr 2008 08:05 Using such pointers is one of the worst things you can do. You have a lot of work to do to ensure that these pointers and their buffers are valid, and it is easy to open a security hole with this model. How big an item is it that these things point to, if it is less than a page the cost of copying them to a common buffer is probably less than the cost of setting up the checks and mapping to do this. I am not going to tell you in this posting how to do it, since this is such a bad idea, you really need to justify why you are doing this. I also note in your next post you are dealing with USB which does not typically have the performance to ever justify this type of hack. -- 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 "Gerard Harkema" <Gerard Harkema(a)discussions.microsoft.com> wrote in message news:284B5EB9-62A7-4094-8F66-36EBD80AD44D(a)microsoft.com... > In our driver we use pointers to usermemory in the inputbuffer. In the > EvtDeviceIoControl we call the WdfRequestRetrieveInputBuffer function to > get > the input buffer. How can we lock this memory for read and write using > KMDF. > > Thanks, > > Gerard
|
Pages: 1 Prev: Doubts in WDM driver Next: Synchronization on multiple USB read/writes |