1 / 26

Creating User-Mode Drivers with a Proxy ( or How to Look Smarter Than You Really Are)

Creating User-Mode Drivers with a Proxy ( or How to Look Smarter Than You Really Are). Galen C. Hunt Microsoft Research and the University of Rochester Department of Computer Science. Problem. NT Drivers Difficulties: Kernel-Mode Environment: Minimal (12K) Stack,

zwi
Download Presentation

Creating User-Mode Drivers with a Proxy ( or How to Look Smarter Than You Really Are)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating User-Mode Drivers with a Proxy(or How to Look Smarter Than You Really Are) Galen C. Hunt Microsoft Research and the University of Rochester Department of Computer Science

  2. Problem • NT Drivers Difficulties: • Kernel-Mode Environment: • Minimal (12K) Stack, • Paged and Non-Paged Memory Pools, • Crashes are Globally Fatal, • Two (2) Machines for Debugging. • Packet-Driven I/O Model: • Fully re-entrant code, • Take extreme care when blocking.

  3. Solution • Write User-Mode Device Drivers. • Use Proxy for a Kernel-Mode Presence.

  4. Outline • Introduction • Outline • NT Driver & Proxy Architecture • Implementation Details • Performance Measurements • Related Work • Conclusions

  5. NT Kernel-Mode I/O Architecture I/O Manager = I/O Request Packet Crypto - Filter Driver NTFS - File-System Driver Stripe (RAID) - Intermediate Driver SCSI - Port Driver Adaptec - Miniport (Adapter) Driver

  6. Kernel-Mode Driver Architecture Application and Win32 Subsystem User Mode APIs NT Executive (I/O Manager) Kernel Mode IRPs Device Entry Device Driver

  7. Proxy Driver Architecture App. & Win32 User-Mode Driver User Mode COM COM Service APIs APIs NT I/O Manager Kernel Mode IRPs IRPs Stub Entry Host Entry Proxy Driver

  8. Proxy Details App. & Win32 User-Mode Driver COM Service 1 NT I/O Manager Stub Entry Host Entry Proxy Driver

  9. Proxy Details App. & Win32 User-Mode Driver COM Service 1 NT I/O Manager 2 Stub Entry Host Entry Proxy Driver

  10. Proxy Details App. & Win32 User-Mode Driver COM Service 1 NT I/O Manager 2 Stub Entry Host Entry Proxy Driver 3

  11. Proxy Details App. & Win32 User-Mode Driver COM Service 4 1 NT I/O Manager 2 Stub Entry Host Entry Proxy Driver 3

  12. Proxy Details App. & Win32 User-Mode Driver COM Service 4 1 NT I/O Manager 5 2 Stub Entry Host Entry Proxy Driver 3

  13. Proxy Details App. & Win32 User-Mode Driver COM Service 4 1 NT I/O Manager 5 2 Stub Entry Host Entry Proxy Driver 6 3

  14. Proxy Details App. & Win32 User-Mode Driver COM Service 4 1 NT I/O Manager 7 5 2 Stub Entry Host Entry Proxy Driver 6 3

  15. Proxy Details App. & Win32 User-Mode Driver 8 COM Service 4 1 NT I/O Manager 7 5 2 Stub Entry Host Entry Proxy Driver 6 3

  16. Proxy Details App. & Win32 User-Mode Driver 9 8 COM Service 4 1 NT I/O Manager 7 5 2 Stub Entry Host Entry Proxy Driver 6 3

  17. Proxy Details App. & Win32 User-Mode Driver 9 8 COM Service 4 1 NT I/O Manager 7 5 2 Stub Entry Host Entry 10 Proxy Driver 6 3

  18. Proxy Details App. & Win32 User-Mode Driver 9 8 COM Service 4 1 11 NT I/O Manager 7 5 2 Stub Entry Host Entry 10 Proxy Driver 6 3

  19. Proxy Details Summary App. & Win32 User-Mode Driver 9 COM Service 8 1 4 NT I/O Manager 11 5 Stub Entry Host Entry 2 7 10 Proxy Driver 6 3

  20. Null (Raw) Device Latency = 14s

  21. Raw Device Throughput

  22. RamDisk Throughput

  23. File-System Write Throughput

  24. Related Work • Watchdogs [Bershad & Pinkerton, 1988] • Semantic File System [Gifford et al, 1991] • HURD Translators [Bushnell, 1994] • Frigate [Kim and Popek, 1997] • Rialto [Draves and Cutshall, 1997]

  25. Conclusion • Drivers Create with Proxy include: • HTTP/FTP File System • Virtual Memory Disk • Further Information: • http://research.microsoft.com/~galenh/proxy

  26. Appendix A: IDeviceFileSink interface IDeviceFileSink : IUnknown { HRESULT Create ([in] IDevIrp *pIrp, [in] IDevSecurityContext *pCtxt,... HRESULT Cleanup ([in] IDevIrp *pIrp); HRESULT Close ([in] IDevIrp *pIrp); HRESULT Shutdown ([in] IDevIrp *pIrp); HRESULT Read ([in] IDevIrp *pIrp, [in] LARGE_INTEGER ByteOffset,... HRESULT Write ([in] IDevIrp *pIrp, [in] LARGE_INTEGER ByteOffset,... HRESULT DeviceControl ([in] IDevIrp *pIrp, [in] ULONG IoControlCode,... HRESULT QueryInformation([in] IDevIrp *pIrp, [in] ULONG Length,... HRESULT SetInformation ([in] IDevIrp *pIrp, [in] ULONG Length,... HRESULT FlushBuffers ([in] IDevIrp *pIrp); };

More Related