aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-01-22 12:17:20 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-01-22 12:19:53 +0100
commit02754a8f9af246f440492295487282e55dc09cc0 (patch)
tree728b59573a119421b2a5e2b89f965edc9ff6f93a /pkg/report/linux.go
parent8eda0b957e5b39c0c525e74f51d6b39ab8c5b1ac (diff)
tools/syz-check: check netlink policy descriptions
Overall idea of netlink checking. Currnetly we check netlink policies for common detectable mistakes. First, we detect what looks like a netlink policy in our descriptions (these are structs/unions only with nlattr/nlnext/nlnetw fields). Then we find corresponding symbols (offset/size) in vmlinux using nm. Then we read elf headers and locate where these symbols are in the rodata section. Then read in the symbol data, which is an array of nla_policy structs. These structs allow to easily figure out type/size of attributes. Finally we compare our descriptions with the kernel policy description. Update #590
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index ac9a78ee5..968bc1692 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -38,7 +38,7 @@ func ctorLinux(cfg *config) (Reporter, []string, error) {
if cfg.kernelObj != "" {
vmlinux = filepath.Join(cfg.kernelObj, cfg.target.KernelObject)
var err error
- symbols, err = symbolizer.ReadSymbols(vmlinux)
+ symbols, err = symbolizer.ReadTextSymbols(vmlinux)
if err != nil {
return nil, nil, err
}