On 18/07/2023 17:43, Tudor Cretu wrote:
On 17-07-2023 06:11, Chaitanya S Prakash wrote:
Syscalls operating on memory mappings manage their address space via owning capabilities. They must adhere to a certain set of rules[1] in order to ensure memory safety. Address space management syscalls are only allowed to manipulate mappings that are within the range of the owning capability and have the appropriate permissions. Tests to vailidate the parameters being passed to the syscall, check its bounds, range as well as permissions have been added. Additionally, a signal handler has been registered to handle invalid memory access. Finally, as certain flags and syscalls conflict with the reservation model or lack implementation, a check to verify appropriate handling of the same has also been added.
Great series! I am very impressed by the comprehensiveness of the tests and the quality of the code is generally very good! Well done!
Agreed, overall the testcases make sense and cover a good chunk of the rules. We will probably need some more for certain corner cases, but the initial goal is not to be comprehensive anyway - having tests at all is already a big improvement!
I have only a few notes/comments. If you see a comment, it might apply to multiple patches.
Likewise - quite a few of my comments apply to similar code across the series.
Kevin