mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
8585b2dc23
We add this basic functionality to the Kernel so Userspace can request a particular virtual memory mapping to be immutable. This will be useful later on in the DynamicLoader code. The annotation of a particular Kernel Region as immutable implies that the following restrictions apply, so these features are prohibited: - Changing the region's protection bits - Unmapping the region - Annotating the region with other virtual memory flags - Applying further memory advises on the region - Changing the region name - Re-mapping the region
22 lines
355 B
C++
22 lines
355 B
C++
/*
|
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/EnumBits.h>
|
|
#include <AK/Types.h>
|
|
|
|
namespace Kernel {
|
|
|
|
enum class VirtualMemoryRangeFlags : u32 {
|
|
None = 0,
|
|
SyscallCode = 1 << 0,
|
|
Immutable = 1 << 1,
|
|
};
|
|
|
|
AK_ENUM_BITWISE_OPERATORS(VirtualMemoryRangeFlags);
|
|
|
|
}
|