diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-31 16:28:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-31 16:28:37 +0200 |
commit | 314dbc10d47f986cf98dcbb4bd746ab9a15ef85e (patch) | |
tree | 09294a07091cb412026df379b703d5ff0244e726 /Kernel/API/Syscall.h | |
parent | e39a410546bb4bee172c8378afbc6bf99af73b30 (diff) | |
download | serenity-314dbc10d47f986cf98dcbb4bd746ab9a15ef85e.zip |
Kernel: Use Userspace<T> for sys$read() and sys$stat()
Add validation helper overloads as needed.
Diffstat (limited to 'Kernel/API/Syscall.h')
-rw-r--r-- | Kernel/API/Syscall.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 91cd72b960..52cf74e84e 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -27,6 +27,7 @@ #pragma once #include <AK/Types.h> +#include <AK/Userspace.h> #ifdef __serenity__ # include <LibC/fd_set.h> @@ -230,7 +231,7 @@ inline constexpr const char* to_string(Function function) #ifdef __serenity__ struct StringArgument { - const char* characters { nullptr }; + Userspace<const char*> characters; size_t length { 0 }; }; @@ -439,7 +440,7 @@ struct SC_waitid_params { struct SC_stat_params { StringArgument path; - struct stat* statbuf; + Userspace<struct stat*> statbuf; bool follow_symlinks; }; |