mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 08:51:57 +00:00
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.
This commit is contained in:
parent
b4a29113e4
commit
7e6fbef8db
Notes:
sideshowbarker
2024-07-19 04:14:45 +09:00
Author: https://github.com/bgianfo
Commit: 7e6fbef8db
Pull-request: https://github.com/SerenityOS/serenity/pull/2997
Reviewed-by: https://github.com/awesomekling
3 changed files with 24 additions and 18 deletions
|
@ -275,8 +275,8 @@ struct SC_select_params {
|
|||
struct SC_poll_params {
|
||||
struct pollfd* fds;
|
||||
unsigned nfds;
|
||||
const struct timespec* timeout;
|
||||
const u32* sigmask;
|
||||
Userspace<const struct timespec*> timeout;
|
||||
Userspace<const u32*> sigmask;
|
||||
};
|
||||
|
||||
struct SC_clock_nanosleep_params {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue