1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00
serenity/Kernel/Memory
creator1creeper1 326c6130a5 Kernel: Don't access directory table of uninitialized PageDirectory
PageDirectory gets initialized step-by-step in
PageDirectory::try_create_for_userspace(). This initialization may fail
anywhere in this function - for example, we may not be able to
allocate a directory table, in which case
PageDirectory::try_create_for_userspace() will return a null pointer.
We recognize this condition and early-return ENOMEM. However, at this
point, we need to correctly destruct the only partially initialized
PageDirectory. Previously, PageDirectory::~PageDirectory() would assume
that the object it was destructing was always fully initialized. It now
uses the new helper PageDirectory::is_cr3_initialized() to correctly
recognize when the directory table was not yet initialized. This helper
checks if the pointer to the directory table is null. Only if it is not
null does the destructor try to fetch the directory table using
PageDirectory::cr3().
2022-01-16 12:08:57 -08:00
..
AddressSpace.cpp Kernel: Don't bother with page tables for PROT_NONE mappings 2022-01-15 19:51:16 +01:00
AddressSpace.h Kernel: Remove old "region lookup cache" optimization 2022-01-15 19:51:15 +01:00
AllocationStrategy.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
AnonymousVMObject.cpp Kernel: Make AnonymousVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
AnonymousVMObject.h Kernel: Make AnonymousVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
InodeVMObject.cpp Kernel: Make InodeVMOBject construction OOM-aware 2022-01-15 22:16:00 +02:00
InodeVMObject.h Kernel: Make InodeVMOBject construction OOM-aware 2022-01-15 22:16:00 +02:00
MappedROM.h Kernel: Fix possible buffer overrun when scanning a MappedROM 2022-01-04 17:46:36 +00:00
MemoryManager.cpp Kernel: Only register kernel regions with MemoryManager 2022-01-15 19:51:15 +01:00
MemoryManager.h Kernel: Only register kernel regions with MemoryManager 2022-01-15 19:51:15 +01:00
PageDirectory.cpp Kernel: Don't access directory table of uninitialized PageDirectory 2022-01-16 12:08:57 -08:00
PageDirectory.h Kernel: Don't access directory table of uninitialized PageDirectory 2022-01-16 12:08:57 -08:00
PageFaultResponse.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
PhysicalPage.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalPage.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalRegion.cpp Kernel: Initialize PhysicalRegion::m_large_zones, remove m_small_zones 2021-12-22 13:29:31 -08:00
PhysicalRegion.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PhysicalZone.cpp Kernel: Add implied auto qualifiers in Memory 2022-01-09 23:29:57 -08:00
PhysicalZone.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PrivateInodeVMObject.cpp Kernel: Make PrivateInodeVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
PrivateInodeVMObject.h Kernel: Make PrivateInodeVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
Region.cpp Kernel: Don't remap already non-writable regions when they become CoW 2022-01-15 19:51:16 +01:00
Region.h Kernel: Don't release/relock spinlocks repeatedly during space teardown 2022-01-12 14:52:47 +01:00
RingBuffer.cpp Kernel: Use StringView instead of String in RingBuffer's constructor 2022-01-13 00:20:08 -08:00
RingBuffer.h Kernel: Use StringView instead of String in RingBuffer's constructor 2022-01-13 00:20:08 -08:00
ScatterGatherList.cpp Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
ScatterGatherList.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
ScopedAddressSpaceSwitcher.cpp Kernel: Access MemoryManager static functions statically 2021-10-02 18:16:15 +02:00
ScopedAddressSpaceSwitcher.h Kernel: Rename ProcessPagingScope => ScopedAddressSpaceSwitcher 2021-09-06 18:56:51 +02:00
SharedInodeVMObject.cpp Kernel: Make SharedInodeVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
SharedInodeVMObject.h Kernel: Make SharedInodeVMObject construction OOM-aware 2022-01-15 22:16:00 +02:00
TypedMapping.h Kernel: Make map_typed() & map_typed_writable() fallible using ErrorOr 2022-01-13 22:40:25 +01:00
VirtualRange.cpp Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
VirtualRange.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
VirtualRangeAllocator.cpp Kernel: Return EEXIST in VirtualRangeAllocator::try_allocate_specific() 2021-12-23 23:08:10 +01:00
VirtualRangeAllocator.h Kernel: Make VirtualRangeAllocator setup functions propagate errors 2021-11-18 21:11:30 +01:00
VMObject.cpp Kernel: Remove infallible VMObject resource factory functions 2022-01-15 22:16:00 +02:00
VMObject.h Kernel: Remove infallible VMObject resource factory functions 2022-01-15 22:16:00 +02:00