summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/ptrace.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-08 15:45:40 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-08 18:27:28 +0100
commitf1b5def8fd48cf09704a6d4151f9002b80354430 (patch)
treeec7af45dcfb129a0ae9ec434141d84f3faaef885 /Kernel/Syscalls/ptrace.cpp
parentb2cba3036ef83d4099d917124ad65efc955a2f68 (diff)
downloadserenity-f1b5def8fd48cf09704a6d4151f9002b80354430.zip
Kernel: Factor address space management out of the Process class
This patch adds Space, a class representing a process's address space. - Each Process has a Space. - The Space owns the PageDirectory and all Regions in the Process. This allows us to reorganize sys$execve() so that it constructs and populates a new Space fully before committing to it. Previously, we would construct the new address space while still running in the old one, and encountering an error meant we had to do tedious and error-prone rollback. Those problems are now gone, replaced by what's hopefully a set of much smaller problems and missing cleanups. :^)
Diffstat (limited to 'Kernel/Syscalls/ptrace.cpp')
-rw-r--r--Kernel/Syscalls/ptrace.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp
index 26e91fcaae..22cb45ec49 100644
--- a/Kernel/Syscalls/ptrace.cpp
+++ b/Kernel/Syscalls/ptrace.cpp
@@ -73,7 +73,7 @@ KResultOr<u32> Process::peek_user_data(Userspace<const u32*> address)
KResult Process::poke_user_data(Userspace<u32*> address, u32 data)
{
Range range = { VirtualAddress(address), sizeof(u32) };
- auto* region = find_region_containing(range);
+ auto* region = space().find_region_containing(range);
if (!region)
return EFAULT;
ProcessPagingScope scope(*this);