mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel: Use Userspace<T> for sys$read() and sys$stat()
Add validation helper overloads as needed.
This commit is contained in:
parent
e39a410546
commit
314dbc10d4
5 changed files with 67 additions and 7 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue