Kernel: Use Userspace<T> in pledge syscall

This commit is contained in:
Brian Gianforcaro 2020-08-01 16:17:45 -07:00 committed by Andreas Kling
parent ba4cf59d04
commit 2a74c59dec
Notes: sideshowbarker 2024-07-19 04:23:58 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -322,7 +322,7 @@ public:
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);
int sys$pledge(const Syscall::SC_pledge_params*);
int sys$pledge(Userspace<const Syscall::SC_pledge_params*>);
int sys$unveil(const Syscall::SC_unveil_params*);
int sys$perf_event(int type, FlatPtr arg1, FlatPtr arg2);
int sys$get_stack_bounds(FlatPtr* stack_base, size_t* stack_size);

View file

@ -29,7 +29,7 @@
namespace Kernel {
int Process::sys$pledge(const Syscall::SC_pledge_params* user_params)
int Process::sys$pledge(Userspace<const Syscall::SC_pledge_params*> user_params)
{
Syscall::SC_pledge_params params;
if (!validate_read_and_copy_typed(&params, user_params))