forked from Bananymous/banan-os
Kernel: Don't map interrupt stack as userspace accessable
This commit is contained in:
parent
b51d2f5295
commit
6cf7e01fe9
|
@ -122,8 +122,21 @@ namespace Kernel
|
||||||
|
|
||||||
thread->m_is_userspace = true;
|
thread->m_is_userspace = true;
|
||||||
|
|
||||||
thread->m_stack = TRY(VirtualRange::create_to_vaddr_range(process->page_table(), 0x300000, KERNEL_OFFSET, m_userspace_stack_size, PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present, true));
|
thread->m_stack = TRY(VirtualRange::create_to_vaddr_range(
|
||||||
thread->m_interrupt_stack = TRY(VirtualRange::create_to_vaddr_range(process->page_table(), 0x300000, KERNEL_OFFSET, m_interrupt_stack_size, PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present, true));
|
process->page_table(),
|
||||||
|
0x300000, KERNEL_OFFSET,
|
||||||
|
m_userspace_stack_size,
|
||||||
|
PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present,
|
||||||
|
true
|
||||||
|
));
|
||||||
|
|
||||||
|
thread->m_interrupt_stack = TRY(VirtualRange::create_to_vaddr_range(
|
||||||
|
process->page_table(),
|
||||||
|
0x300000, KERNEL_OFFSET,
|
||||||
|
m_interrupt_stack_size,
|
||||||
|
PageTable::Flags::ReadWrite | PageTable::Flags::Present,
|
||||||
|
true
|
||||||
|
));
|
||||||
|
|
||||||
thread->setup_exec();
|
thread->setup_exec();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue