aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/host_linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-11-20 17:23:24 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-11-20 17:23:24 +0100
commitf07ea3fc223b56f47547f7c94ca5f50154e3b6be (patch)
tree0a339657a63405644c9709185f52e2a9b053a039 /pkg/host/host_linux.go
parente4f20040fb986af60d45655977266233a4900410 (diff)
sys/linux: remove get_kernel_syms, add quotactl syscall
get_kernel_syms does not seem to be present upstream. Describe an old quotactl syscall. Also fix umount/umount2 names in kallsyms.
Diffstat (limited to 'pkg/host/host_linux.go')
-rw-r--r--pkg/host/host_linux.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkg/host/host_linux.go b/pkg/host/host_linux.go
index 6da153f2d..3c2a3156f 100644
--- a/pkg/host/host_linux.go
+++ b/pkg/host/host_linux.go
@@ -54,7 +54,19 @@ func isSupported(kallsyms []byte, c *prog.Syscall) bool {
if len(kallsyms) == 0 {
return true
}
- return bytes.Index(kallsyms, []byte(" T sys_"+c.CallName+"\n")) != -1
+ name := c.CallName
+ if newname := kallsymsMap[name]; newname != "" {
+ name = newname
+ }
+ return bytes.Index(kallsyms, []byte(" T sys_"+name+"\n")) != -1
+}
+
+// Some syscall names diverge in __NR_* consts and kallsyms.
+// umount2 is renamed to umount in arch/x86/entry/syscalls/syscall_64.tbl.
+// Where umount is renamed to oldumount is unclear.
+var kallsymsMap = map[string]string{
+ "umount": "oldumount",
+ "umount2": "umount",
}
func isSupportedSyzkall(c *prog.Syscall) bool {