1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

Kernel: Make sure the kernel info page is read-only for userspace

To enforce this, we create two separate mappings of the same underlying
physical page. A writable mapping for the kernel, and a read-only one
for userspace (the one returned by sys$get_kernel_info_page.)
This commit is contained in:
Andreas Kling 2019-12-15 22:21:28 +01:00
parent 77cf607cda
commit 0a75a46501
3 changed files with 26 additions and 7 deletions

View file

@ -63,6 +63,7 @@ public:
void map_for_kernel(VirtualAddress, PhysicalAddress, bool cache_disabled = false);
OwnPtr<Region> allocate_kernel_region(size_t, const StringView& name, bool user_accessible = false, bool should_commit = true);
OwnPtr<Region> allocate_kernel_region_with_vmobject(VMObject&, size_t, const StringView& name);
OwnPtr<Region> allocate_user_accessible_kernel_region(size_t, const StringView& name);
unsigned user_physical_pages() const { return m_user_physical_pages; }