zerovm/zerovm — pull request #272 by bobot (2014-05-21 09:39:06+00:00)
Title: [RFC] [Syscalls] add a check in CheckRAMAccess

It seems that `CheckRAMAccess` is not correct when there is a gap between the `MemBlock` of `nap->mem_map`. And it is not clear to me that there is no gap between `MemBlock` by looking at the function `MemoryProtection` which add the `MemBlock` in `nap->mem_map` structure. Is it really an invariant of `nap->mem_map`?

https://github.com/zerovm/zerovm/blob/1.0/src/loader/sel_addrspace.c#L160

I see different solutions:
- `SET_MEM_MAP_ID` check this invariant in `MemoryProtection`
- the proposed patch is applied
- MemoryProtection is written in such a way that it is clear there is no gap.

Did I miss something? Thx