diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-04-11 08:04:51 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-04-11 09:37:01 +0000 |
| commit | a2335417592dcd4545c1953807ae9c8906e133d5 (patch) | |
| tree | 919af28ce8d763f29270c69afdd895e194e088ee /tools | |
| parent | c0efc34f5a3f6a494541381c0f5770200c2640b5 (diff) | |
tools/syz-declextract: export info about file ops interfaces
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-declextract/declextract.go | 4 | ||||
| -rw-r--r-- | tools/syz-declextract/testdata/file_operations.c.info | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/tools/syz-declextract/declextract.go b/tools/syz-declextract/declextract.go index 0200967db..6ffca0170 100644 --- a/tools/syz-declextract/declextract.go +++ b/tools/syz-declextract/declextract.go @@ -275,7 +275,9 @@ func finishInterfaces(interfaces []*declextract.Interface, consts map[string]*co } extractor := subsystem.MakeExtractor(subsystem.GetList(target.OS)) for _, iface := range interfaces { - iface.ManualDescriptions = manual[iface.IdentifyingConst] + if iface.IdentifyingConst != "" { + iface.ManualDescriptions = declextract.Tristate(manual[iface.IdentifyingConst]) + } var crashes []*subsystem.Crash for _, file := range iface.Files { crashes = append(crashes, &subsystem.Crash{GuiltyPath: file}) diff --git a/tools/syz-declextract/testdata/file_operations.c.info b/tools/syz-declextract/testdata/file_operations.c.info index e69de29bb..a6ad4f27b 100644 --- a/tools/syz-declextract/testdata/file_operations.c.info +++ b/tools/syz-declextract/testdata/file_operations.c.info @@ -0,0 +1,16 @@ +FILEOP foo_mmap func:foo_mmap loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:true file:file_operations.c subsystem:kernel +FILEOP foo_read func:foo_read loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:true file:file_operations.c subsystem:kernel +FILEOP foo_write func:foo_write loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:true file:file_operations.c subsystem:kernel +FILEOP proc_open func:proc_open loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:false file:file_operations.c subsystem:kernel +FILEOP proc_read func:proc_read loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:false file:file_operations.c subsystem:kernel +FILEOP proc_write func:proc_write loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:false file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL1 func:foo_ioctl loc:10 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL2 func:foo_ioctl loc:10 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL3 func:foo_ioctl loc:10 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL4 func:foo_ioctl loc:10 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL5 func:foo_ioctl loc:10 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL6 func:foo_ioctl loc:8 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL FOO_IOCTL7 func:foo_ioctl loc:8 coverage:0 access:unknown manual_desc:false auto_desc:true file:file_operations.c subsystem:kernel +IOCTL UNUSED_IOCTL1 func:unused_ioctl loc:4 coverage:0 access:unknown manual_desc:false auto_desc:false file:file_operations.c subsystem:kernel +IOCTL UNUSED_IOCTL2 func:unused_ioctl loc:4 coverage:0 access:unknown manual_desc:false auto_desc:false file:file_operations.c subsystem:kernel +IOCTL proc_ioctl func:proc_ioctl loc:0 coverage:0 access:unknown manual_desc:unknown auto_desc:false file:file_operations.c subsystem:kernel |
