aboutsummaryrefslogtreecommitdiffstats
path: root/executor/syscalls_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-07 15:32:16 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-07 15:32:30 +0200
commit645e75f8038d1b177ead2d6ea0b3ade6f7f9d985 (patch)
treeabdb1ba3d8b7dff944d0ca84fc382bc0094f8635 /executor/syscalls_linux.h
parent7fb9023fd78f6c0641624e3169c405e384f14691 (diff)
executor: make syscall table and number constant
We see some crashes that suggest corruption of the syscall number: invalid command number 1296 (errno 11) invalid command number 107 (errno 110) Make the table and the number constant to prevent corruption.
Diffstat (limited to 'executor/syscalls_linux.h')
-rw-r--r--executor/syscalls_linux.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/executor/syscalls_linux.h b/executor/syscalls_linux.h
index d093d0b6d..0d9bba2aa 100644
--- a/executor/syscalls_linux.h
+++ b/executor/syscalls_linux.h
@@ -6,8 +6,8 @@
#define SYZ_PAGE_SIZE 4096
#define SYZ_NUM_PAGES 4096
#define SYZ_DATA_OFFSET 536870912
-unsigned syscall_count = 1949;
-call_t syscalls[] = {
+#define SYZ_SYSCALL_COUNT 1949
+const call_t syscalls[] = {
{"accept4", 364},
{"accept4$alg", 364},
{"accept4$ax25", 364},
@@ -1967,8 +1967,8 @@ call_t syscalls[] = {
#define SYZ_PAGE_SIZE 4096
#define SYZ_NUM_PAGES 4096
#define SYZ_DATA_OFFSET 536870912
-unsigned syscall_count = 2001;
-call_t syscalls[] = {
+#define SYZ_SYSCALL_COUNT 2001
+const call_t syscalls[] = {
{"accept", 43},
{"accept$alg", 43},
{"accept$ax25", 43},
@@ -3980,8 +3980,8 @@ call_t syscalls[] = {
#define SYZ_PAGE_SIZE 4096
#define SYZ_NUM_PAGES 4096
#define SYZ_DATA_OFFSET 536870912
-unsigned syscall_count = 1958;
-call_t syscalls[] = {
+#define SYZ_SYSCALL_COUNT 1958
+const call_t syscalls[] = {
{"accept", 285},
{"accept$alg", 285},
{"accept$ax25", 285},
@@ -5950,8 +5950,8 @@ call_t syscalls[] = {
#define SYZ_PAGE_SIZE 4096
#define SYZ_NUM_PAGES 4096
#define SYZ_DATA_OFFSET 536870912
-unsigned syscall_count = 1930;
-call_t syscalls[] = {
+#define SYZ_SYSCALL_COUNT 1930
+const call_t syscalls[] = {
{"accept", 202},
{"accept$alg", 202},
{"accept$ax25", 202},
@@ -7892,8 +7892,8 @@ call_t syscalls[] = {
#define SYZ_PAGE_SIZE 4096
#define SYZ_NUM_PAGES 4096
#define SYZ_DATA_OFFSET 536870912
-unsigned syscall_count = 1819;
-call_t syscalls[] = {
+#define SYZ_SYSCALL_COUNT 1819
+const call_t syscalls[] = {
{"accept", 330},
{"accept$alg", 330},
{"accept$ax25", 330},