summaryrefslogtreecommitdiff
path: root/Kernel/API
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-12-15 20:38:19 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-16 01:02:00 -0700
commit6c0486277e9bc8238ae82ee857a70014c9397db9 (patch)
treed0a599c10308e18709c1fefc33f726de489f7dcc /Kernel/API
parent1b5a565e5587bcf58d8801601a2c519771c1e971 (diff)
downloadserenity-6c0486277e9bc8238ae82ee857a70014c9397db9.zip
Kernel: Reintroduce the msyscall syscall as the annotate_mapping syscall
This syscall will be used later on to ensure we can declare virtual memory mappings as immutable (which means that the underlying Region is basically immutable for both future annotations or changing the protection bits of it).
Diffstat (limited to 'Kernel/API')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/API/VirtualMemoryAnnotations.h21
2 files changed, 22 insertions, 1 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index a1c0f11da4..9109e83277 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -45,6 +45,7 @@ enum class NeedsBigProcessLock {
S(alarm, NeedsBigProcessLock::Yes) \
S(allocate_tls, NeedsBigProcessLock::Yes) \
S(anon_create, NeedsBigProcessLock::No) \
+ S(annotate_mapping, NeedsBigProcessLock::No) \
S(beep, NeedsBigProcessLock::No) \
S(bind, NeedsBigProcessLock::No) \
S(chdir, NeedsBigProcessLock::No) \
@@ -124,7 +125,6 @@ enum class NeedsBigProcessLock {
S(mprotect, NeedsBigProcessLock::Yes) \
S(mremap, NeedsBigProcessLock::Yes) \
S(msync, NeedsBigProcessLock::Yes) \
- S(msyscall, NeedsBigProcessLock::No) \
S(munmap, NeedsBigProcessLock::Yes) \
S(open, NeedsBigProcessLock::Yes) \
S(perf_event, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/API/VirtualMemoryAnnotations.h b/Kernel/API/VirtualMemoryAnnotations.h
new file mode 100644
index 0000000000..ec140bd927
--- /dev/null
+++ b/Kernel/API/VirtualMemoryAnnotations.h
@@ -0,0 +1,21 @@
+/*
+ * 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,
+};
+
+AK_ENUM_BITWISE_OPERATORS(VirtualMemoryRangeFlags);
+
+}