From 829f023456746402c5e958e624a7cabf3bef2e30 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 18 Apr 2018 16:30:13 +0200 Subject: 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. --- pkg/host/host_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/host/host_linux.go') 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, "" -- cgit mrf-deployment