diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-08-04 23:15:42 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-06 10:22:44 +0200 |
commit | 7e6fbef8dbccc3649d2253eee7e50f42419414ef (patch) | |
tree | d7141d63f57a56f1d52424b9c13371260f6e7e61 /Kernel/Process.h | |
parent | b4a29113e4eae36685f871f7cb0bb476e065760d (diff) | |
download | serenity-7e6fbef8dbccc3649d2253eee7e50f42419414ef.zip |
Kernel: Partial usage of Userspace<T> for the poll syscall
This change mostly converts poll to Userspace<T> with the caveat
of the fds member of SC_poll_params. It's current usage is a bit
too gnarly for me to take on right now, this appears to need a lot
more love.
In addition to enlightening the syscall to use Userspace<T>, I've
also re-worked most of the handling to use validate_read_and_copy
instead of just directly de-referencing the user pointer. We also
appeared to be missing a re-evaluation of the fds array after the
thread block is awoken.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r-- | Kernel/Process.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h index 58e81487c6..abf213aa06 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -231,7 +231,7 @@ public: int sys$minherit(void*, size_t, int inherit); int sys$purge(int mode); int sys$select(const Syscall::SC_select_params*); - int sys$poll(const Syscall::SC_poll_params*); + int sys$poll(Userspace<const Syscall::SC_poll_params*>); ssize_t sys$get_dir_entries(int fd, void*, ssize_t); int sys$getcwd(Userspace<char*>, ssize_t); int sys$chdir(Userspace<const char*>, size_t); |