aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-11-18 21:22:17 +0100
committerDmitry Vyukov <dvyukov@google.com>2015-11-18 21:22:17 +0100
commit495113290ed28d4debdecb5934a78d0beb722db7 (patch)
tree9661696bb419d22db4a3b8c1f16d95d32f9457aa /executor
parentbe856bc9e484b4ce3fac847b768fbdb95296f178 (diff)
basic support for dri/drm drivers
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.cc5
-rw-r--r--executor/syscalls.h14
2 files changed, 18 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index a14c87aa2..cc3dcdeb1 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -441,6 +441,11 @@ void execute_call(thread_t* th)
th->res = -1;
}
}
+ case __NR_syz_dri_open: {
+ char buf[128];
+ sprintf(buf, "/dev/dri/card%lu", th->args[0]);
+ th->res = open(buf, th->args[1], 0);
+ }
}
int errno0 = errno;
th->cover_size = cover_read(th);
diff --git a/executor/syscalls.h b/executor/syscalls.h
index 1a7ff5d81..560b9786b 100644
--- a/executor/syscalls.h
+++ b/executor/syscalls.h
@@ -10,7 +10,8 @@ struct call_t {
#define __NR_memfd_create 319
#endif
-#define __NR_syz_openpts 1000001
+#define __NR_syz_openpts 1000001
+#define __NR_syz_dri_open 1000002
call_t syscalls[] = {
{"open", __NR_open},
@@ -506,4 +507,15 @@ call_t syscalls[] = {
{"ioctl$TIOCLINUX5", __NR_ioctl},
{"ioctl$TIOCLINUX6", __NR_ioctl},
{"ioctl$TIOCLINUX7", __NR_ioctl},
+ {"syz_dri_open", __NR_syz_dri_open},
+ {"ioctl$DRM_IOCTL_VERSION", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_UNIQUE", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_MAGIC", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_IRQ_BUSID", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_MAP", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_CLIENT", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_STATS", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_GET_CAP", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_SET_CLIENT_CAP", __NR_ioctl},
+ {"ioctl$DRM_IOCTL_SET_VERSION", __NR_ioctl},
};