Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-04-06 | Kernel: Track big lock blocked threads in separate list | Jelle Raaijmakers | |
When we lock a mutex, eventually `Thread::block` is invoked which could in turn invoke `Process::big_lock().restore_exclusive_lock()`. This would then try to add the current thread to a different blocked thread list then the one in use for the original mutex being locked, and because it's an intrusive list, the thread is removed from its original list during the `.append()`. When the original mutex eventually unblocks, we no longer have the thread in the intrusive blocked threads list and we panic. Solve this by making the big lock mutex special and giving it its own blocked thread list. Because the process big lock is temporary and is being actively removed from e.g. syscalls, it's a matter of time before we can also remove the fix introduced by this commit. Fixes issue #9401. | |||
2022-04-06 | Kernel: Improve the aarch64 kernel source files disk layout | James Mintram | |
2022-04-05 | Kernel: Make sys$mmap() round requested VM size to page size multiple | Andreas Kling | |
This fixes an issue where File::mmap() overrides would fail because they were expecting to be called with a size evenly divisible by PAGE_SIZE. | |||
2022-04-05 | Kernel: Protect Mutex's thread lists with a spinlock | Andreas Kling | |
2022-04-05 | Kernel: Don't unregister Region from RegionTree *before* unmapping it | Andreas Kling | |
If we unregister from the RegionTree before unmapping, there's a race where a new region can get inserted at the same address that we're about to unmap. If this happens, ~Region() will then unmap the newly inserted region, which now finds itself with cleared-out page table entries. | |||
2022-04-05 | Kernel: Remove MemoryManager::region_tree() accessor | Andreas Kling | |
Let's not have a way to grab at the RegionTree from outside of MM. | |||
2022-04-05 | Kernel: Move allocate_unbacked_region_anywhere() to MemoryManager | Andreas Kling | |
This didn't need to be in RegionTree, and since it's specific to kernel VM anyway, let's move it to MemoryManager. | |||
2022-04-05 | Kernel: Move create_identity_mapped_region() to MemoryManager | Andreas Kling | |
This had no business being in RegionTree, since RegionTree doesn't track identity-mapped regions anyway. (We allow *any* address to be identity mapped, not just the ones that are part of the RegionTree's range.) | |||
2022-04-05 | Kernel: Add RegionTree::find_region_containing(address or range) | Andreas Kling | |
Let's encapsulate looking up regions so clients don't have to dig into RegionTree internals. | |||
2022-04-05 | Kernel: Add RegionTree::remove(Region&) | Andreas Kling | |
This allows clients to remove a region from the tree without reaching into the RegionTree internals. | |||
2022-04-05 | Kernel: Take the RegionTree spinlock when inspecting tree from outside | Andreas Kling | |
This patch adds RegionTree::get_lock() which exposes the internal lock inside RegionTree. We can then lock it from the outside when doing lookups or traversal. This solution is not very beautiful, we should find a way to protect this data with SpinlockProtected or something similar. This is a stopgap patch to try and fix the currently flaky CI. | |||
2022-04-05 | Kernel: Remove unused ShouldDeallocateVirtualRange parameters | Andreas Kling | |
Since there is no separate virtual range allocator anymore, this is no longer used for anything. | |||
2022-04-04 | Kernel: Add VERIFY_NOT_REACHED to aarch64 PageDirectory.cpp | James Mintram | |
2022-04-04 | Kernel: Add VERIFY_NOT_REACHED to aarch64 locking functions | James Mintram | |
2022-04-04 | Kernel: Add VERIFY_NOT_REACHED to the aarch64 handle_crash function | James Mintram | |
2022-04-04 | Kernel: Remove unused dummy function from dummy.cpp | James Mintram | |
2022-04-04 | Kernel: Add VERIFY_NOT_REACHED to stub functions in aarch64 dummy.cpp | James Mintram | |
2022-04-04 | Kernel: Add VERIFY_NOT_REACHED to stub aarch64 Processor functions | James Mintram | |
2022-04-04 | Kernel: Print out assertion info in __assertion_failed on aarch64 | James Mintram | |
2022-04-04 | Kernel: Add debug logging to learn more about unexpected NP faults | Andreas Kling | |
2022-04-04 | Kernel: Remove unused Region::try_create_kernel_only() | Andreas Kling | |
2022-04-04 | Kernel: Tweak broken dbgln_if() in sys$fork() after RegionTree changes | Andreas Kling | |
2022-04-04 | Kernel: Mark sys$adjtime() as not needing the big lock | Andreas Kling | |
This syscall works on global kernel state and so doesn't need protection from threads in the same process. | |||
2022-04-04 | Kernel: Mark sys$clock_settime() as not needing the big log | Andreas Kling | |
This syscall ends up disabling interrupts while changing the time, and the clock is a global resource anyway, so preventing threads in the same process from running wouldn't solve anything. | |||
2022-04-04 | Kernel: Mark sys$sched_{set,get}param() as not needing the big lock | Andreas Kling | |
Both of these syscalls take the scheduler lock while accessing the thread priority, so there's no reliance on the process big lock. | |||
2022-04-04 | Kernel: Randomize non-specific VM allocations done by sys$execve() | Andreas Kling | |
Stuff like TLS regions, main thread stacks, etc. All deserve to be randomized unless the ELF requires specific placement. :^) | |||
2022-04-03 | Kernel: Fix aarch64 kernel build on case sensitive file systems | Brian Gianforcaro | |
The dummy file has the wrong case, so it would fail to be found on case sensitive file systems. | |||
2022-04-04 | Kernel: Use the InstrusiveRedBlackTree::begin_from(V&) API | Idan Horowitz | |
This let's us skip an O(logn) tree traversal. | |||
2022-04-04 | Kernel: Remove false condition in RegionTree::allocate_range_specific | Idan Horowitz | |
Since find_largest_not_above returns the highest region that is below the end of the request range, no region after it can intersect with it. | |||
2022-04-04 | Kernel: Add RegionTree and remove VirtualRangeAllocator from aarch64 | James Mintram | |
2022-04-03 | Kernel: Actually fix accidental overlaps in allocate_range_specific() | Andreas Kling | |
Thanks to Idan for spotting this! :^) | |||
2022-04-03 | Kernel: Add kmalloc.cpp to aarch64 | James Mintram | |
2022-04-03 | Kernel: Convert ProcessorInfo::build_brand_string() to StringBuilder | Linus Groh | |
2022-04-03 | Kernel: Add hypervisor_vendor_id entry to /proc/cpuinfo | Linus Groh | |
2022-04-03 | Kernel+SystemMonitor+lscpu: Rename 'CPUID' -> 'Vendor ID' | Linus Groh | |
This is what the Intel manual, as well as Linux's cpuinfo calls it. | |||
2022-04-03 | Kernel: Remove EBX, ECX, and EDX values from hypervisor dmesgln() | Linus Groh | |
2022-04-03 | Kernel: Move hypervisor vendor ID string to ProcessorInfo | Linus Groh | |
This will make it possible to expose it in /proc/cpuinfo. :^) | |||
2022-04-03 | Kernel: Make ProcessorInfo::build_foo_string() private | Linus Groh | |
2022-04-03 | Kernel: Move feature string building to ProcessorInfo | Linus Groh | |
Other than a dmesgln(), ProcessorInfo is the only user of this function and is already responsible for building other CPUID-related strings. | |||
2022-04-03 | Kernel: Rename some ProcessorInfo members to match Intel manual | Linus Groh | |
Let's use terminology from the the Intel manual to avoid confusion. Also add `_string` suffixes to better distinguish the numeric values from the string values. | |||
2022-04-03 | Kernel: Move private ProcessorInfo members to the end | Linus Groh | |
2022-04-03 | Kernel: Fix accidental overlaps in RegionTree::allocate_range_specific() | Andreas Kling | |
Thanks to Idan for spotting this! :^) | |||
2022-04-03 | Kernel: Mark sys$listen() as not needing the big lock | Andreas Kling | |
This syscall already performs the necessary locking and so doesn't need to rely on the process big lock. | |||
2022-04-03 | Kernel: Don't hog file descriptor table lock in sys$bind() | Andreas Kling | |
We don't need to hold the lock across the entire syscall. Once we've fetched the open file description we're interested in, we can let go. | |||
2022-04-03 | Kernel: Don't hog file descriptor table lock in sys$listen() | Andreas Kling | |
We don't need to hold the lock across the entire syscall. Once we've fetched the open file description we're interested in, we can let go. | |||
2022-04-03 | Kernel: Mark sys$sendfd() and sys$recvfd() as not needing the big lock | Andreas Kling | |
These syscalls already perform the necessary locking and don't rely on the process big lock. | |||
2022-04-03 | Kenrel: Update a dmesgln() to say "RegionTree" instead of old class name | Andreas Kling | |
2022-04-03 | Kernel: Add a little explainer comment above RegionTree | Andreas Kling | |
2022-04-03 | Kernel: Improve RegionTree's internal helper function names | Andreas Kling | |
It's a bit nicer if functions that allocate ranges have some kind of name that includes both "allocate" and "range". :^) | |||
2022-04-03 | Kernel: Add missing include to PageDirectory.h | Andreas Kling | |