Re: IOUserClient size limit?
Re: IOUserClient size limit?
- Subject: Re: IOUserClient size limit?
- From: Duane Murphy <email@hidden>
- Date: Tue, 11 Nov 2008 10:30:41 -0800
-----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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden