From 91630fe39dd964945efdbdb67870a16958696a19 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 13 Jan 2016 15:20:09 +0100 Subject: sys: add support for /dev/snd/control --- executor/executor.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'executor/executor.cc') 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); -- cgit mrf-deployment