From 010ed08bc6af2324521c75828240ec843e9d15f5 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Tue, 8 Jan 2019 19:36:52 +0100 Subject: fuzzer: fix syscall detection As pointed out my Mark Rutland, kallsyms entries have format of __ia32_sys_${NAME} rather than __ia32_${NAME}. Fix the regexps. --- pkg/host/host_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/host/host_linux.go') diff --git a/pkg/host/host_linux.go b/pkg/host/host_linux.go index eb792a70b..a01e1bd42 100644 --- a/pkg/host/host_linux.go +++ b/pkg/host/host_linux.go @@ -62,9 +62,9 @@ func isSupported(c *prog.Syscall, target *prog.Target, sandbox string) (bool, st var re *regexp.Regexp switch target.Arch { case "386", "amd64": - re = regexp.MustCompile(` T (sys|ksys|__ia32|__x64)_([^\n]+)\n`) + re = regexp.MustCompile(` T (__ia32_|__x64_)?sys_([^\n]+)\n`) case "arm64": - re = regexp.MustCompile(` T (sys|ksys|__arm64)_([^\n]+)\n`) + re = regexp.MustCompile(` T (__arm64_)?sys_([^\n]+)\n`) default: panic("unsupported arch for kallsyms parsing") } -- cgit mrf-deployment