Kernel: Use Userspace<T> in sys$get_stack_bounds()

This commit is contained in:
Andreas Kling 2021-03-01 14:50:36 +01:00
parent 122c7b6cbb
commit b5f32be577
Notes: sideshowbarker 2024-07-18 21:48:51 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -346,7 +346,7 @@ public:
KResultOr<int> sys$pledge(Userspace<const Syscall::SC_pledge_params*>);
KResultOr<int> sys$unveil(Userspace<const Syscall::SC_unveil_params*>);
KResultOr<int> sys$perf_event(int type, FlatPtr arg1, FlatPtr arg2);
KResultOr<int> sys$get_stack_bounds(FlatPtr* stack_base, size_t* stack_size);
KResultOr<int> sys$get_stack_bounds(Userspace<FlatPtr*> stack_base, Userspace<size_t*> stack_size);
KResultOr<int> sys$ptrace(Userspace<const Syscall::SC_ptrace_params*>);
KResultOr<int> sys$sendfd(int sockfd, int fd);
KResultOr<int> sys$recvfd(int sockfd, int options);

View file

@ -30,7 +30,7 @@
namespace Kernel {
KResultOr<int> Process::sys$get_stack_bounds(FlatPtr* user_stack_base, size_t* user_stack_size)
KResultOr<int> Process::sys$get_stack_bounds(Userspace<FlatPtr*> user_stack_base, Userspace<size_t*> user_stack_size)
{
FlatPtr stack_pointer = Thread::current()->get_register_dump_from_stack().userspace_esp;
auto* stack_region = space().find_region_containing(Range { VirtualAddress(stack_pointer), 1 });