1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-14 15:30:59 +00:00
serenity/Kernel/VM
Andreas Kling b0321bf290 Kernel: Zero-fill faults should not temporarily enable interrupts
We were doing a temporary STI/CLI in MemoryManager::zero_page() to be
able to acquire the VMObject's lock before zeroing out a page.

This logic was inherited from the inode fault handler, where we need
to enable interrupts anyway, since we might need to interact with the
underlying storage device.

Zero-fill faults don't actually need to lock the VMObject, since they
are already guaranteed exclusivity by interrupts being disabled when
entering the fault handler.

This is different from inode faults, where a second thread can often
get an inode fault for the same exact page in the same VMObject before
the first fault handler has received a response from the disk.
This is why the lock exists in the first place, to prevent this race.

This fixes an intermittent crash in sys$execve() that was made much
more visible after I made userspace stacks lazily allocated.
2019-11-01 17:59:47 +01:00
..
AnonymousVMObject.cpp Kernel: Use a FixedArray for VMObject::m_physical_pages 2019-08-07 20:12:50 +02:00
AnonymousVMObject.h Kernel: Split VMObject into two classes: Anonymous- and InodeVMObject 2019-08-07 18:09:32 +02:00
InodeVMObject.cpp Kernel: Rename "vmo" to "vmobject" everywhere 2019-09-04 11:27:14 +02:00
InodeVMObject.h Kernel: Split VMObject into two classes: Anonymous- and InodeVMObject 2019-08-07 18:09:32 +02:00
MemoryManager.cpp Kernel: Zero-fill faults should not temporarily enable interrupts 2019-11-01 17:59:47 +01:00
MemoryManager.h APIC: Enable APIC and start APs 2019-10-16 19:14:02 +02:00
PageDirectory.cpp Kernel: Display virtual addresses as V%p instead of L%x 2019-08-26 11:31:58 +02:00
PageDirectory.h Kernel: Add mapping from page directory base (PDB) to PageDirectory 2019-08-06 11:30:26 +02:00
PhysicalAddress.h Kernel: Add LogStream operator<< for PhysicalAddress 2019-09-15 20:47:49 +02:00
PhysicalPage.cpp Kernel: Move kmalloc() into a Kernel/Heap/ directory 2019-09-16 09:01:44 +02:00
PhysicalPage.h Kernel: Add a simple slab allocator for small allocations 2019-09-16 10:33:27 +02:00
PhysicalRegion.cpp Kernel: Fix returning pages to regions >= 2GB 2019-09-17 09:27:23 +02:00
PhysicalRegion.h Kernel: Move PhysicalAddress.h into VM/ 2019-07-09 15:04:45 +02:00
RangeAllocator.cpp Kernel: Make it possible to turn off VM guard pages at compile time 2019-09-30 17:22:16 +02:00
RangeAllocator.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
Region.cpp Kernel: Defer creation of Region CoW bitmaps until they're needed 2019-10-01 19:58:41 +02:00
Region.h Kernel: Defer creation of Region CoW bitmaps until they're needed 2019-10-01 19:58:41 +02:00
VirtualAddress.h Kernel: Add LogStream operator<< for VirtualAddress 2019-08-06 10:28:46 +02:00
VMObject.cpp Kernel: Use a FixedArray for VMObject::m_physical_pages 2019-08-07 20:12:50 +02:00
VMObject.h Kernel: Put all VMObjects in an InlineLinkedList instead of a HashTable 2019-08-08 11:11:22 +02:00