diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2019-12-24 11:19:40 +1100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-24 01:28:38 +0100 |
commit | 0cb89f5927455e19c2ad851cba041d5ab9294827 (patch) | |
tree | 01d38e2c0ae5881673cc92b24759514a53613478 /Kernel | |
parent | b557aab8845d5b4e652532a94c32bf26ccae6016 (diff) | |
download | serenity-0cb89f5927455e19c2ad851cba041d5ab9294827.zip |
Kernel: Mark kernel stack regions as... stack regions
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Thread.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 20a92177e3..34938bceb0 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -85,6 +85,7 @@ Thread::Thread(Process& process) if (m_process.is_ring0()) { m_kernel_stack_region = MM.allocate_kernel_region(default_kernel_stack_size, String::format("Kernel Stack (Thread %d; Ring0)", m_tid), false, true); + m_kernel_stack_region->set_stack(true); m_kernel_stack_base = m_kernel_stack_region->vaddr().get(); m_kernel_stack_top = m_kernel_stack_region->vaddr().offset(default_kernel_stack_size).get() & 0xfffffff8u; m_tss.esp = m_kernel_stack_top; @@ -92,6 +93,7 @@ Thread::Thread(Process& process) } else { // Ring3 processes need a separate stack for Ring0. m_kernel_stack_region = MM.allocate_kernel_region(default_kernel_stack_size, String::format("Kernel Stack (Thread %d; Ring3)", m_tid), false, true); + m_kernel_stack_region->set_stack(true); m_kernel_stack_base = m_kernel_stack_region->vaddr().get(); m_kernel_stack_top = m_kernel_stack_region->vaddr().offset(default_kernel_stack_size).get() & 0xfffffff8u; m_tss.ss0 = 0x10; |