1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:55:08 +00:00

Fix /proc/PID/stack in the new per-process page directory world.

I added an RAII helper called OtherTaskPagingScope. While present,
it switches the kernel over to using another task's page directory.
This is perfect for e.g walking the stack in /proc/PID/stack.
This commit is contained in:
Andreas Kling 2018-11-01 11:44:21 +01:00
parent c45f166c63
commit 5891691640
4 changed files with 12 additions and 32 deletions

View file

@ -346,20 +346,6 @@ bool MemoryManager::unmapSubregion(Task& task, Task::Subregion& subregion)
return true;
}
bool MemoryManager::unmapRegionsForTask(Task& task)
{
ASSERT_INTERRUPTS_DISABLED();
for (auto& region : task.m_regions) {
if (!unmapRegion(task, *region))
return false;
}
for (auto& subregion : task.m_subregions) {
if (!unmapSubregion(task, *subregion))
return false;
}
return true;
}
bool MemoryManager::mapSubregion(Task& task, Task::Subregion& subregion)
{
InterruptDisabler disabler;