-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
In #25, basic smp support is enabled. However, there are still issues:
- (Resolved by fix(smp): move
accessing_user_memoryinto thread data #103)ACCESSING_USER_MEMshould be a variable per CPU or per task. Otherwise, if the kernel accesses user memory when it shouldn't, it won't be detected correctly.
Lines 353 to 367 in 67a042f
static ACCESSING_USER_MEM: AtomicBool = AtomicBool::new(false); /// Enables scoped access into user memory, allowing page faults to occur inside /// kernel. pub fn access_user_memory<R>(f: impl FnOnce() -> R) -> R { ACCESSING_USER_MEM.store(true, Ordering::Release); let result = f(); ACCESSING_USER_MEM.store(false, Ordering::Release); result } /// Check if the current thread is accessing user memory. pub fn is_accessing_user_memory() -> bool { ACCESSING_USER_MEM.load(Ordering::Acquire) } - Sync page table and TLB across all cores
TODO: add more description
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed