site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 - --- At Tue, 11 Nov 2008 09:47:29 -0800, Kevin Elliott wrote:
On Nov 10, 2008, at 5:35 PM, Duane Murphy wrote:
Thanks Chris! I would have completely missed the prepare() and complete() methods.
On a follow up question. My user client APIs map to kernel functions that expect to get a buffer that they can write into. IOMemoryDescriptors are setup to use readBytes() and writeBytes() rather than direct memory access (e.g. a pointer).
I really hope your doing something different than what it sounds like your describing. Your UserClient should be exporting an API specific to your needs, not a generic copy of kernel API's. Generic API's make it easier to subvert your UserClient and force it do things contrary to it's intended purpose. If your API is generic, much of your security comes from secretiveness- Security through obscurity at it's worse.
Sorry, I used poor wording. "kernel functions" in this case is the cross- platform kernel library for our product. These are functions specifically designed to work across the user/kernel boundary, but in order to be generic, they simply work with buffers. So, no, I am not exporting generic kernel functions.
Is there a way of getting "buffer" access? Some way of writing directly to the underlying memory by address? Is that what map() and IOMemoryMap is for?
Map gives you pointer level access to the memory described by the descriptor.
Thanks, I'll have to dig into it a little more to work out how to use it. ...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.9.0 (Build 397) Charset: ISO-8859-1 wsBVAwUBSRnPWUrg9acQ4r2CAQhd9ggA03AdbL8/a41vcwN2EOd8C0a9q0Ojqj7f CyOR1kNvSJuRcy7XlAuxbQ7LQSNZ1yM1hhxojc0QWO1ju5kPEXvE1hlXM+OyvIUi CSvjwnpvLyHQdx3NLsNEsTnNTbAMxnhWQaNfnUvCmgaM+NN9oPR3Mcpq/qIaXgwH jCQoF7P7UVoAmuGU+j5mdLb5aNRuet0WyWJOVDD+8fJZvNj2TS99G2CbxKVFMpfa ReTbXLf2nOL2IWKEDMV332Km0XhWYKn0OfhUYiWqFZtlAmILXs+GXG+UGpSvTdh0 QIPikWJHSHXz4Vxf1xuV1ayQnPGxipFqZiLLk0DaEOQX+iT0BBAo6w== =SHZq -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Duane Murphy