aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/host_linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-04-18 16:30:13 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-04-18 16:30:13 +0200
commit829f023456746402c5e958e624a7cabf3bef2e30 (patch)
tree64e25dc82cb175f215a7fe4f3963be3ccc5f4ad1 /pkg/host/host_linux.go
parent52643b44142b6b5de7b9d2a9fde0fd58ec1f1028 (diff)
pkg/host: fix kallsyms check
Recent kernel changes to not call syscalls directly from kernel code renamed syscall symbols from sys_foo to ksys_foo. Support both formats.
Diffstat (limited to 'pkg/host/host_linux.go')
-rw-r--r--pkg/host/host_linux.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/host/host_linux.go b/pkg/host/host_linux.go
index 6914ad202..64c87d295 100644
--- a/pkg/host/host_linux.go
+++ b/pkg/host/host_linux.go
@@ -46,7 +46,8 @@ func isSupported(c *prog.Syscall, sandbox string) (bool, string) {
if newname := kallsymsMap[name]; newname != "" {
name = newname
}
- if !bytes.Contains(kallsyms, []byte(" T sys_"+name+"\n")) {
+ if !bytes.Contains(kallsyms, []byte(" T sys_"+name+"\n")) &&
+ !bytes.Contains(kallsyms, []byte(" T ksys_"+name+"\n")) {
return false, fmt.Sprintf("sys_%v is not present in /proc/kallsyms", name)
}
return true, ""