Montag, 31. Mai 2010

kernel : access to userspace : __user

access to userspace : __user

quoted from Professional Linux Kernel Architecture , page 27 by Wolfgang Mauerer:

1. The kernel uses __user to identify pointers to areas in user address space that may not be de-referenced without further precautions.

2. This is because memory is mapped via page tables into the userspave portion of the virtual address space and not directly mapped by physical memory.

3. Therefore the kernel needs to ensure that the page frame in RAM that backs the destination is actually present.

4. Explicity labeling supports the use of an automatic checker tool ( sparse) to ensure that this requirement is observed in practice.



Keine Kommentare: