diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-05 12:16:30 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-05 12:23:39 +0100 |
commit | e87eac92730f1cc55d7a44f8bb6331b4a8e33535 (patch) | |
tree | c8a17aba1bf677a5fc6059b018baa8f861fd1670 /Userland/Libraries/LibC/stdlib.cpp | |
parent | 4df3a34bc29a4fde57bd0d1ae408a3d094c10b62 (diff) | |
download | serenity-e87eac92730f1cc55d7a44f8bb6331b4a8e33535.zip |
Userland: Add LibSystem and funnel all syscalls through it
This achieves two things:
- Programs can now intentionally perform arbitrary syscalls by calling
syscall(). This allows us to work on things like syscall fuzzing.
- It restricts the ability of userspace to make syscalls to a single
4KB page of code. In order to call the kernel directly, an attacker
must now locate this page and call through it.
Diffstat (limited to 'Userland/Libraries/LibC/stdlib.cpp')
-rw-r--r-- | Userland/Libraries/LibC/stdlib.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp index 8a0dc247d0..56f1070e76 100644 --- a/Userland/Libraries/LibC/stdlib.cpp +++ b/Userland/Libraries/LibC/stdlib.cpp @@ -30,7 +30,6 @@ #include <AK/StdLibExtras.h> #include <AK/Types.h> #include <AK/Utf8View.h> -#include <Kernel/API/Syscall.h> #include <LibELF/AuxiliaryVector.h> #include <alloca.h> #include <assert.h> @@ -45,6 +44,7 @@ #include <sys/mman.h> #include <sys/stat.h> #include <sys/wait.h> +#include <syscall.h> #include <unistd.h> static void strtons(const char* str, char** endptr) |