diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-10 16:36:11 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-10 16:36:11 +0100 |
commit | a77ecac900970bf11ed7db934fcb627e2019cae3 (patch) | |
tree | 3c367b841a3c451541b6f8991b172caccfb7234c | |
parent | 9b5c9efd73d90e70ac61f5acc6d30d087da5a4aa (diff) | |
download | serenity-a77ecac900970bf11ed7db934fcb627e2019cae3.zip |
fuzz-syscalls: Mark sys$emuctl() as someone who returns ENOSYS
This syscall is only relevant inside UserspaceEmulator and the kernel
will just return ENOSYS for it.
-rw-r--r-- | Userland/Tests/Kernel/fuzz-syscalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Tests/Kernel/fuzz-syscalls.cpp b/Userland/Tests/Kernel/fuzz-syscalls.cpp index 19bd694a65..e2c15b4fb7 100644 --- a/Userland/Tests/Kernel/fuzz-syscalls.cpp +++ b/Userland/Tests/Kernel/fuzz-syscalls.cpp @@ -48,7 +48,7 @@ static bool is_unfuzzable_syscall(int fn) static bool is_nosys_syscall(int fn) { - return fn == SC_futex; + return fn == SC_futex || fn == SC_emuctl; } static bool is_bad_idea(int fn, const size_t* direct_sc_args, const size_t* fake_sc_params, const char* some_string) @@ -85,7 +85,7 @@ static void do_systematic_tests() } // This is pure torture rc = syscall(Syscall::Function(i), 0xc0000001, 0xc0000002, 0xc0000003); - VERIFY(rc != -ENOSYS); + VERIFY(rc != -ENOSYS || is_nosys_syscall(i)); } // Finally, test invalid syscalls: |