kernel: usercopy functions

This commit is contained in:
Matheus
2024-06-09 19:31:26 -03:00
parent 429f56aced
commit 50b4b45d00
53 changed files with 712 additions and 260 deletions
+7 -3
View File
@@ -18,13 +18,17 @@ syscallret_t syscall_sigprocmask(context_t *, int how, sigset_t *set, sigset_t *
return ret;
}
new = *set;
ret.errno = usercopy_fromuser(&new, set, sizeof(sigset_t));
if (ret.errno)
return ret;
}
signal_changemask(_cpu()->thread, how, set ? &new : NULL, oldset ? &old : NULL);
if (oldset)
*oldset = old;
if (oldset && usercopy_touser(oldset, &old, sizeof(sigset_t))) {
ret.errno = EFAULT;
return ret;
}
ret.ret = 0;
ret.errno = 0;