Open mikbras opened 3 years ago
This is a critical issue and is causing a number of tests to hang that pass invalid pointers to various syscalls. The hangs are because we are crashing while holding a lock, then another test is starting within the same instance of the kernel and then gets caught on the same lock that previously was not unlocked. All parameter pointers that are passed to syscalls need to be validated and need 2 alternatives:
Reopen the issue. This requires generalizing the new myst_is_badd_addr
check introduced by #683.
Ideally the Mystikos kernel may check for bad addresses passed from user space and raise an
EFAULT
error. Add a newmyst_is_badd_addr
function that checks whether the given address is mapped or not (using themprotect
vector). One problem with this approach is that it does not work forbrk
acquired memory.