aboutsummaryrefslogtreecommitdiffstats
path: root/sys/akaros
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-30 21:10:38 -0700
committerDmitry Vyukov <dvyukov@google.com>2018-08-30 21:45:04 -0700
commita4718693a3d9fcabb02299b2ec07c19d8208c539 (patch)
tree4646830d734816c5d6ab7bd5f71338ce3f9b1b54 /sys/akaros
parent4239b99abbcccac9104facbf2b040a5af4ffe1b1 (diff)
sys/linux: add syz_execute_func
The function executes random code. Update #310
Diffstat (limited to 'sys/akaros')
-rw-r--r--sys/akaros/gen/amd64.go5
-rw-r--r--sys/akaros/sys.txt2
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/akaros/gen/amd64.go b/sys/akaros/gen/amd64.go
index 52089bc66..36f528698 100644
--- a/sys/akaros/gen/amd64.go
+++ b/sys/akaros/gen/amd64.go
@@ -1305,6 +1305,9 @@ var syscalls_amd64 = []*Syscall{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "new_l", TypeSize: 8}}, Buf: "new"},
}},
+ {Name: "syz_execute_func", CallName: "syz_execute_func", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "text", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", IsVarlen: true}, Kind: 4}},
+ }},
{NR: 126, Name: "tap_fds", CallName: "tap_fds", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tap_reqs", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "fd_tap_req"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "nr_reqs", TypeSize: 8}}, Buf: "tap_reqs"},
@@ -1526,4 +1529,4 @@ var consts_amd64 = []ConstValue{
{Name: "WUNTRACED", Value: 2},
}
-const revision_amd64 = "44785e2dac3e0f922841ab905a8c4e7838585083"
+const revision_amd64 = "f9824f5b26bc0ee36bc1e6debd6e8a8d6eee33ab"
diff --git a/sys/akaros/sys.txt b/sys/akaros/sys.txt
index 07fe3609d..c7a02faab 100644
--- a/sys/akaros/sys.txt
+++ b/sys/akaros/sys.txt
@@ -16,6 +16,8 @@ include <termios.h>
resource fd[int32]: 0xffffffffffffffff, AT_FDCWD
resource pid[int32]: 0, 0xffffffffffffffff
+syz_execute_func(text ptr[in, text[target]])
+
openat(fromfd fd[opt], path ptr[in, filename], path_l len[path], oflag flags[open_flags], mode flags[open_mode]) fd
read(fd fd, buf buffer[out], count len[buf])
write(fd fd, buf buffer[in], count len[buf])