v_insert() in Mem_space class for ARM architecture

Jung Hyun Yoo yjhyun.yoo at gmail.com
Tue Oct 18 03:49:46 CEST 2011


Hi,



During looking into the source code of v_insert() function in
mem_space-arm.cpp file, I found two cases where it returns improper
Mem_space::Status.



Case #1
When the size parameter of v_insert() is 0x100000 (that is, section mapping
is asked), and the entry in the corresponding first-level page table
indicates a coarse second-level page table (that is, it’s already valid) and
only the entry in the second-level table is invalid:
v_insert() function returns Insert_OK status.
But it seems proper to return Insert_err_exists because there is already
valid entry and inserting a new entry fails.



Case #2
When the size parameter of v_insert() is 0x1000 (that is, 4KB small page
mapping is asked), and the memory allocation for creating a coarse
second-level page table fails in Page_table::walk() function:
v_insert() returns Insert_OK status.
But it seems proper to return Insert_err_nomem because due to memory
shortage inserting a new entry fails.

I wonder my understanding is right.

Cheers,

Junghyun Yoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20111018/4bf15c91/attachment.html>


More information about the l4-hackers mailing list