diff --git a/Kernel/Arch/x86/common/CPU.cpp b/Kernel/Arch/x86/common/CPU.cpp index 4d67fb13c1..13fb019a75 100644 --- a/Kernel/Arch/x86/common/CPU.cpp +++ b/Kernel/Arch/x86/common/CPU.cpp @@ -23,7 +23,7 @@ void __assertion_failed(const char* msg, const char* file, unsigned line, const // Switch back to the current process's page tables if there are any. // Otherwise stack walking will be a disaster. if (Process::has_current()) - MM.enter_process_paging_scope(Process::current()); + MM.enter_process_address_space(Process::current()); PANIC("Aborted"); } diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index e24bad36b5..b600bcc5d1 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -221,7 +221,7 @@ void handle_crash(RegisterState const& regs, char const* description, int signal // If a process crashed while inspecting another process, // make sure we switch back to the right page tables. - MM.enter_process_paging_scope(process); + MM.enter_process_address_space(process); dmesgln("CRASH: CPU #{} {} in ring {}", Processor::current_id(), description, (regs.cs & 3)); dump(regs); diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index af01463512..e5d2337ff0 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -910,12 +910,12 @@ RefPtr MemoryManager::allocate_supervisor_physical_page() return page; } -void MemoryManager::enter_process_paging_scope(Process& process) +void MemoryManager::enter_process_address_space(Process& process) { - enter_space(process.address_space()); + enter_address_space(process.address_space()); } -void MemoryManager::enter_space(AddressSpace& space) +void MemoryManager::enter_address_space(AddressSpace& space) { auto current_thread = Thread::current(); VERIFY(current_thread != nullptr); diff --git a/Kernel/Memory/MemoryManager.h b/Kernel/Memory/MemoryManager.h index a3ca79e121..c8fa06dba6 100644 --- a/Kernel/Memory/MemoryManager.h +++ b/Kernel/Memory/MemoryManager.h @@ -160,8 +160,8 @@ public: void unmap_text_after_init(); void unmap_ksyms_after_init(); - static void enter_process_paging_scope(Process&); - static void enter_space(AddressSpace&); + static void enter_process_address_space(Process&); + static void enter_address_space(AddressSpace&); bool validate_user_stack_no_lock(AddressSpace&, VirtualAddress) const; bool validate_user_stack(AddressSpace&, VirtualAddress) const; diff --git a/Kernel/Memory/ProcessPagingScope.cpp b/Kernel/Memory/ProcessPagingScope.cpp index a9a4dbd1a9..b8e94fcaa1 100644 --- a/Kernel/Memory/ProcessPagingScope.cpp +++ b/Kernel/Memory/ProcessPagingScope.cpp @@ -14,7 +14,7 @@ ProcessPagingScope::ProcessPagingScope(Process& process) { VERIFY(Thread::current() != nullptr); m_previous_cr3 = read_cr3(); - MM.enter_process_paging_scope(process); + MM.enter_process_address_space(process); } ProcessPagingScope::~ProcessPagingScope() diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 15087db6eb..8545e3ddee 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -278,7 +278,7 @@ static KResultOr load_elf_object(NonnullOwnPtr String elf_name = object_description.absolute_path(); VERIFY(!Processor::in_critical()); - Memory::MemoryManager::enter_space(*new_space); + Memory::MemoryManager::enter_address_space(*new_space); KResult ph_load_result = KSuccess; elf_image.for_each_program_header([&](const ELF::Image::ProgramHeader& program_header) { @@ -434,7 +434,7 @@ KResultOr Process::load(NonnullRefPtr main_program_ auto new_space = TRY(Memory::AddressSpace::try_create(nullptr)); ScopeGuard space_guard([&]() { - Memory::MemoryManager::enter_process_paging_scope(*this); + Memory::MemoryManager::enter_process_address_space(*this); }); auto load_offset = TRY(get_load_offset(main_program_header, main_program_description, interpreter_description)); @@ -524,7 +524,7 @@ KResult Process::do_exec(NonnullRefPtr main_program_description TemporaryChange global_profiling_disabler(g_profiling_all_threads, false); m_space = load_result.space.release_nonnull(); } - Memory::MemoryManager::enter_space(*m_space); + Memory::MemoryManager::enter_address_space(*m_space); m_executable = main_program_description->custody(); m_arguments = arguments;