From 1461be9d82541ed8a2562169fe8719e1cdeeff2b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 22 Dec 2019 09:55:30 +0100 Subject: tools/syz-check: add some TODOs --- tools/syz-check/check.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools') diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go index 6b28d3671..30fe326d9 100644 --- a/tools/syz-check/check.go +++ b/tools/syz-check/check.go @@ -176,6 +176,18 @@ func checkStruct(typ *prog.StructDesc, astStruct *ast.Struct, str *dwarf.StructT } // TODO: we could also check enums (elements match corresponding flags in syzkaller). // TODO: we could also check values of literal constants (dwarf should have that, right?). + // TODO: handle nested structs/unions, e.g.: + // struct foo { + // union { + // ... + // } bar; + // }; + // should be matched with: + // foo_bar [ + // ... + // ] + // TODO: consider making guesses about semantic types of fields, + // e.g. if a name contains filedes/uid/pid/gid that may be the corresponding resource. ai := 0 offset := uint64(0) for _, field := range typ.Fields { -- cgit mrf-deployment