syscalls: fix for os-test

This commit is contained in:
Matheus
2025-12-08 22:48:49 -03:00
parent 227fcb5386
commit 57e4a39f53
13 changed files with 73 additions and 19 deletions
+4 -1
View File
@@ -16,7 +16,10 @@ syscallret_t syscall_mprotect(context_t *context, void *address, size_t len, int
.ret = -1
};
__assert((~KNOWN_PROT & prot) == 0);
if (prot & ~KNOWN_PROT) {
ret.errno = EINVAL;
return ret;
}
// check alignment
if (len == 0 || (uintptr_t)address % PAGE_SIZE || address > USERSPACE_END) {