diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-01-13 15:20:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2016-01-13 16:54:29 +0100 |
| commit | 91630fe39dd964945efdbdb67870a16958696a19 (patch) | |
| tree | e27636d31191224234c20a82d8a6b6d05602b182 /executor/executor.cc | |
| parent | bca57831a52b02209464bda38afd9ef251fabb95 (diff) | |
sys: add support for /dev/snd/control
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index 20beb728f..a3590cece 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -360,11 +360,18 @@ thread_t* schedule_call(int n, int call_index, int call_num, uint64_t num_args, case __NR_umount2: case __NR_syz_fuse_mount: case __NR_syz_fuseblk_mount: + case __NR_syz_open_sndctrl: root = true; default: if (strcmp(syscalls[call_num] .name, - "open$sndseq") == 0) + "open$kvm") == 0 || + strcmp(syscalls[call_num] + .name, + "open$sndseq") == 0 || + strcmp(syscalls[call_num] + .name, + "open$sndtimer") == 0) root = true; } @@ -574,6 +581,15 @@ void execute_call(thread_t* th) th->res = fd; break; } + case __NR_syz_open_sndctrl: { + // syz_open_sndctrl(id intptr, flags flags[open_flags]) fd[sndctrl] + uint64_t id = th->args[0]; + uint64_t flags = th->args[1]; + char buf[128]; + + sprintf(buf, "/dev/snd/controlC%d", (int)(id % 4)); + th->res = open(buf, flags); + } } th->reserrno = errno; th->cover_size = cover_read(th); |
