aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-declextract/testdata/functions.c.json
Commit message (Collapse)AuthorAgeFilesLines
* all: reformat C/C++ filesDmitry Vyukov2026-01-191-21/+21
|
* pkg/declextract: export syscall variants as separate interfacesDmitry Vyukov2025-04-101-14/+28
| | | | | | Export each syscall variant (e.g. fcnt$*) as a separate interface. Effectively these are separate syscalls. We will want this for ioctl as well (it's not 1 interface).
* tools/syz-declextract: extend test dataDmitry Vyukov2025-04-091-3/+6
| | | | | | Add few interesting cases for scope analysis. Move functions related to resource to the header file, they must be visible in every file to work.
* tools/syz-declextract: support function scopesDmitry Vyukov2025-01-221-186/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract info about function scopes formed by switch'es on function arguments. For example if we have: void foo(..., int cmd, ...) { ... switch (cmd) { case FOO: ... block 1 ... case BAR: ... block 2 ... } ... } We record that any data flow within block 1 is only relevant when foo's arg cmd has value FOO, similarly for block 2 and BAR. This allows to do 3 things: 1. Locate ioctl commands that are switched on within transitively called functions. 2. Infer return value for each ioctl command. 3. Infer argument type when it's not specified in _IO macro. This will also allow to infer other multiplexed syscalls. Descriptions generated on Linux commit c4b9570cfb63501.
* tools/syz-declextract: infer argument/field typesDmitry Vyukov2024-12-171-2/+229
| | | | | | Use data flow analysis to infer syscall argument, return value, and struct field types. See the comment in pkg/declextract/typing.go for more details.
* tools/syz-declextract: extract info about all functionsDmitry Vyukov2024-12-131-0/+52
Extract info about all functions, and compute total LOC for each interface. For now only static calls are considered, this doesn't handle indirect calls yet. This is just a groundwork for more complex callgraph/dataflow analysis.