summaryrefslogtreecommitdiff
path: root/Kernel/KBuffer.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-14 01:25:22 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-14 01:34:23 +0100
commit8415866c0371eae16e3c1221720efaa6c3cec3e2 (patch)
tree069ac36c07e125f946a1369eb34746e427ba3eb0 /Kernel/KBuffer.h
parent1593219a41bdb9d8efa62abf5fca462b38563878 (diff)
downloadserenity-8415866c0371eae16e3c1221720efaa6c3cec3e2.zip
Kernel: Remove user/kernel flags from Region
Now that we no longer need to support the signal trampolines being user-accessible inside the kernel memory range, we can get rid of the "kernel" and "user-accessible" flags on Region and simply use the address of the region to determine whether it's kernel or user. This also tightens the page table mapping code, since it can now set user-accessibility based solely on the virtual address of a page.
Diffstat (limited to 'Kernel/KBuffer.h')
-rw-r--r--Kernel/KBuffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h
index 665610571a..031c154308 100644
--- a/Kernel/KBuffer.h
+++ b/Kernel/KBuffer.h
@@ -50,7 +50,7 @@ class KBufferImpl : public RefCounted<KBufferImpl> {
public:
static RefPtr<KBufferImpl> try_create_with_size(size_t size, u8 access, const char* name = "KBuffer", AllocationStrategy strategy = AllocationStrategy::Reserve)
{
- auto region = MM.allocate_kernel_region(PAGE_ROUND_UP(size), name, access, false, strategy);
+ auto region = MM.allocate_kernel_region(PAGE_ROUND_UP(size), name, access, strategy);
if (!region)
return nullptr;
return adopt(*new KBufferImpl(region.release_nonnull(), size, strategy));
@@ -58,7 +58,7 @@ public:
static RefPtr<KBufferImpl> try_create_with_bytes(ReadonlyBytes bytes, u8 access, const char* name = "KBuffer", AllocationStrategy strategy = AllocationStrategy::Reserve)
{
- auto region = MM.allocate_kernel_region(PAGE_ROUND_UP(bytes.size()), name, access, false, strategy);
+ auto region = MM.allocate_kernel_region(PAGE_ROUND_UP(bytes.size()), name, access, strategy);
if (!region)
return nullptr;
memcpy(region->vaddr().as_ptr(), bytes.data(), bytes.size());
@@ -81,7 +81,7 @@ public:
bool expand(size_t new_capacity)
{
- auto new_region = MM.allocate_kernel_region(PAGE_ROUND_UP(new_capacity), m_region->name(), m_region->access(), false, m_allocation_strategy);
+ auto new_region = MM.allocate_kernel_region(PAGE_ROUND_UP(new_capacity), m_region->name(), m_region->access(), m_allocation_strategy);
if (!new_region)
return false;
if (m_region && m_size > 0)