diff options
| author | Cody Holliday <9455568+Codysseus@users.noreply.github.com> | 2019-04-05 11:15:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-04-05 11:15:48 +0200 |
| commit | 40f2363e80ac2585f5d4654caed588db21463c88 (patch) | |
| tree | b28c7bd9d7079c1da6c0d7d547171dc0c255ef1a /pkg | |
| parent | 5701183bd373a3c3c96a86010b67bfecfbddb485 (diff) | |
pkg/host: enable kallsyms parsing on arm
pkg/host/host_linux.go: Add "arm" to kallsyms support test.
pkg/host/host_test.go: TestKallsymsParse(): Add entry to test arm kallsyms parsing support.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/host/host_linux.go | 2 | ||||
| -rw-r--r-- | pkg/host/host_test.go | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pkg/host/host_linux.go b/pkg/host/host_linux.go index ae8d7af85..e8395511f 100644 --- a/pkg/host/host_linux.go +++ b/pkg/host/host_linux.go @@ -82,7 +82,7 @@ func parseKallsyms(kallsyms []byte, arch string) map[string]bool { switch arch { case "386", "amd64": re = regexp.MustCompile(` T (__ia32_|__x64_)?sys_([^\n]+)\n`) - case "arm64": + case "arm", "arm64": re = regexp.MustCompile(` T (__arm64_)?sys_([^\n]+)\n`) case "ppc64le": re = regexp.MustCompile(` T ()?sys_([^\n]+)\n`) diff --git a/pkg/host/host_test.go b/pkg/host/host_test.go index 43e063eaf..229a72599 100644 --- a/pkg/host/host_test.go +++ b/pkg/host/host_test.go @@ -94,6 +94,19 @@ c0000000011ed050 T __se_sys_accept4 `), []string{"bind", "listen", "accept4"}, }, + { + "arm", + []byte(` +c037c67c T __se_sys_setfsuid +c037c694 T __sys_setfsgid +c037c790 T sys_setfsgid +c037c790 T __se_sys_setfsgid +c037c7a8 T sys_getpid +c037c7d0 T sys_gettid +c037c7f8 T sys_getppid + `), + []string{"setfsgid", "getpid", "gettid", "getppid"}, + }, } for _, test := range tests { |
