diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-01-16 14:50:43 +0100 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@gmail.com> | 2019-01-16 19:19:53 +0100 |
| commit | c2faf9b2d5b583f53d01b8b483e26b61ed72cbbf (patch) | |
| tree | 8223752709973ec927c4291fda3f3341a5ef0ea6 /sys/linux/init.go | |
| parent | b5df78dc5d994bc61f1ecee2c5c85313178f392e (diff) | |
all: detect extra coverage support
Based on whether the kernel supports KCOV_REMOTE_ENABLE ioctl.
Diffstat (limited to 'sys/linux/init.go')
| -rw-r--r-- | sys/linux/init.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/linux/init.go b/sys/linux/init.go index c5e4c810c..e0efe22c7 100644 --- a/sys/linux/init.go +++ b/sys/linux/init.go @@ -81,6 +81,7 @@ func InitTarget(target *prog.Target) { if target.Arch == runtime.GOARCH { KCOV_INIT_TRACE = uintptr(target.GetConst("KCOV_INIT_TRACE")) KCOV_ENABLE = uintptr(target.GetConst("KCOV_ENABLE")) + KCOV_REMOTE_ENABLE = uintptr(target.GetConst("KCOV_REMOTE_ENABLE")) KCOV_DISABLE = uintptr(target.GetConst("KCOV_DISABLE")) KCOV_TRACE_CMP = uintptr(target.GetConst("KCOV_TRACE_CMP")) } @@ -88,10 +89,11 @@ func InitTarget(target *prog.Target) { var ( // This should not be here, but for now we expose this for syz-fuzzer. - KCOV_INIT_TRACE uintptr - KCOV_ENABLE uintptr - KCOV_DISABLE uintptr - KCOV_TRACE_CMP uintptr + KCOV_INIT_TRACE uintptr + KCOV_ENABLE uintptr + KCOV_REMOTE_ENABLE uintptr + KCOV_DISABLE uintptr + KCOV_TRACE_CMP uintptr ) type arch struct { |
