overloading system calls
overloading system calls
- Subject: overloading system calls
- From: Andrew Gallatin <email@hidden>
- Date: Wed, 29 May 2002 18:27:51 -0400 (EDT)
Is it possible for a kext to overload system calls (or Mach traps) in
Darwin? Is there any example code for doing this available?
I have another module (an IOKit driver) which wires memory for
OS-bypass communications for unbounded amounts of time. If the
user-level application misbehaves and attempts to free this wired
memory prior to unwiring it, the VM system blocks in vm_deallocate()
waiting for the memory to be unwired. The IOKit driver has no idea
the VM system wants the memory to be unwired. Deadlock ensues.
So I'd like to snoop vm_deallocate() calls & catch those which attempt
free memory that the IOKit driver has wired down so that I can get the
driver to unwire the memory (and do the required cleanup so that no
more DMAs happen to that region, of course).
What would be ideal would be an optional callback in the
vm_map_entry_t that could be called in vm_map_delete(), so that the VM
system can request that the memory be unwired & not simply deadlock.
Thanks,
Drew
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.