Re: mapping user-space memory into kernel, reading, crashing
Re: mapping user-space memory into kernel, reading, crashing
- Subject: Re: mapping user-space memory into kernel, reading, crashing
- From: Andrew Gallatin <email@hidden>
- Date: Fri, 4 Apr 2003 14:22:19 -0500 (EST)
Paul R.Potts writes:
>
userland_mem_desc = IOMemoryDescriptor::withAddress (
>
user_space_pointer,
>
(unsigned long) user_space_size,
>
kIODirectionIn);
<..>
>
>
However, it appears that an arbitrary point, somewhere between 700
>
words and 1000 words, the kernel will always crash. (I have not used
>
trial-and-error to narrow it down to the exact count; reading up to 700
>
or 2800 bytes into the block succeeds; reading 1000 words fails).
Mac's have 4096 byte pages, so it sounds like you're crashing when
you cross a page boundary.
What is "user_space_size" for your experiments? Have you verified
that the kernel is not attempting to access data "user_space_size"
bytes past the beginning of the segment?
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.