diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-01-08 19:36:52 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-08 19:52:59 +0100 |
| commit | 010ed08bc6af2324521c75828240ec843e9d15f5 (patch) | |
| tree | e9ea7488aaec7ee85c14465f0c48adbdddcce92b /pkg/host/host_linux.go | |
| parent | baa5c8e247d411a8546a0a89733e0823aae5e47f (diff) | |
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.
Diffstat (limited to 'pkg/host/host_linux.go')
| -rw-r--r-- | pkg/host/host_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
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") } |
