From c8ae244ab8c65500ad940cdf4e3cd50068308e9f Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 9 Aug 2020 15:30:11 -0700 Subject: [PATCH] Kernel: Use Userspace for the shbuf_get syscall --- Kernel/Process.h | 2 +- Kernel/Syscalls/shbuf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.h b/Kernel/Process.h index ffda74443d..83a3687efa 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -315,7 +315,7 @@ public: int sys$shbuf_create(int, void** buffer); int sys$shbuf_allow_pid(int, pid_t peer_pid); int sys$shbuf_allow_all(int); - void* sys$shbuf_get(int shbuf_id, size_t* size); + void* sys$shbuf_get(int shbuf_id, Userspace size); int sys$shbuf_release(int shbuf_id); int sys$shbuf_seal(int shbuf_id); int sys$shbuf_set_volatile(int shbuf_id, bool); diff --git a/Kernel/Syscalls/shbuf.cpp b/Kernel/Syscalls/shbuf.cpp index 166569d40d..8f92562642 100644 --- a/Kernel/Syscalls/shbuf.cpp +++ b/Kernel/Syscalls/shbuf.cpp @@ -120,7 +120,7 @@ int Process::sys$shbuf_release(int shbuf_id) return 0; } -void* Process::sys$shbuf_get(int shbuf_id, size_t* user_size) +void* Process::sys$shbuf_get(int shbuf_id, Userspace user_size) { REQUIRE_PROMISE(shared_buffer); if (user_size && !validate_write_typed(user_size))