summaryrefslogtreecommitdiff
path: root/Kernel/Process.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r--Kernel/Process.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index d62d6cb21c..572b6169dc 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -298,7 +298,7 @@ public:
int sys$getsockopt(const Syscall::SC_getsockopt_params*);
int sys$setsockopt(const Syscall::SC_setsockopt_params*);
int sys$getsockname(const Syscall::SC_getsockname_params*);
- int sys$getpeername(const Syscall::SC_getpeername_params*);
+ int sys$getpeername(Userspace<const Syscall::SC_getpeername_params*>);
int sys$sched_setparam(pid_t pid, Userspace<const struct sched_param*>);
int sys$sched_getparam(pid_t pid, Userspace<struct sched_param*>);
int sys$create_thread(void* (*)(void*), Userspace<const Syscall::SC_create_thread_params*>);
@@ -423,6 +423,13 @@ public:
}
template<typename T>
+ [[nodiscard]] bool validate_read_and_copy_typed(T* dest, Userspace<T*> src)
+ {
+ Userspace<const T*> const_src { src.ptr() };
+ return validate_read_and_copy_typed(dest, const_src);
+ }
+
+ template<typename T>
[[nodiscard]] bool validate_write_typed(T* value, size_t count = 1)
{
Checked size = sizeof(T);