1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Kernel: Use Userspace<T> for the futex syscall

Utilizie Userspace<T> for the syscall argument itself, as well
as internally in the SC_futex_params struct.

We were double validating the SC_futex_params.timeout validation,
that was removed as well.
This commit is contained in:
Brian Gianforcaro 2020-08-04 23:53:23 -07:00 committed by Andreas Kling
parent a7a7e6245f
commit fa666f6897
3 changed files with 18 additions and 26 deletions

View file

@ -321,7 +321,7 @@ public:
int sys$module_unload(const char* name, size_t name_length);
int sys$profiling_enable(pid_t);
int sys$profiling_disable(pid_t);
int sys$futex(const Syscall::SC_futex_params*);
int sys$futex(Userspace<const Syscall::SC_futex_params*>);
int sys$set_thread_boost(int tid, int amount);
int sys$set_process_boost(pid_t, int amount);
int sys$chroot(const char* path, size_t path_length, int mount_flags);
@ -688,7 +688,7 @@ private:
VeilState m_veil_state { VeilState::None };
Vector<UnveiledPath> m_unveiled_paths;
WaitQueue& futex_queue(i32*);
WaitQueue& futex_queue(Userspace<const i32*>);
HashMap<u32, OwnPtr<WaitQueue>> m_futex_queues;
OwnPtr<PerformanceEventBuffer> m_perf_event_buffer;