On 31 Dec 2013 13:39, "Pritam Bankar" <[email protected]> wrote:
>>> On Sun, Dec 29, 2013 at 7:04 PM, Miles MH Chen <[email protected]>
wrote:
>>>>
>>>> Hi Pritam,
>>>>
>>>> 1) Yes, all 512RAM will be direct mapped to kernel address space IF
the kernel have a 896MB direct mapping area.
>>>> Actually you can change the range of kernel direct mapping by the
vmalloc=<size> in boot command line.
>>>> In 32-bit and 3:1 split configuration, kernel direct mapping area +
vmalloc area is roughly 1G.
>>>>
>>>> 2) User space and kernel space can have different virtual addresses
mapping to the same physical frame at the same time.
>>>>
>
>             How above scenario of user space and kernel space having
mapping to the same physical frame               is handled. This would be
like sharing kernel data with user which is not allowed.
>

One trivial example would be a driver that meets the userspace application
to mmap a kernel buffer. In that case, there will exist both a kernelspace
and a userspace mapping to the same physical frame(s).

It'll let you share data between the two in a rather efficient way. Of
course, you need to handle any necessary syncing yourself, so that you're
not reading inconsistent data.

Cheers,
Anders
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to