1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:05:08 +00:00

Kernel/Memory: Add option to annotate region mapping as immutable

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
This commit is contained in:
Liav A 2022-12-15 21:08:57 +02:00 committed by Andrew Kaster
parent 6c0486277e
commit 8585b2dc23
4 changed files with 35 additions and 4 deletions

View file

@ -14,6 +14,7 @@ namespace Kernel {
enum class VirtualMemoryRangeFlags : u32 {
None = 0,
SyscallCode = 1 << 0,
Immutable = 1 << 1,
};
AK_ENUM_BITWISE_OPERATORS(VirtualMemoryRangeFlags);