aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/auto.txt
Commit message (Collapse)AuthorAgeFilesLines
* pkg/declextract: add open fileops callback to interface listDmitry Vyukov2025-04-151-1/+1
| | | | | | Add open callback if there are no other unique callbacks. This happens for e.g. seq files which only have unique open, while read is a common seq_read callback.
* pkg/declextract: more precise fileops callback resolutionDmitry Vyukov2025-04-151-120/+10
| | | | | | Use resolved Function references instead of string names for fileops callback resolution. Function names are not unique, a number of callbacks have the same names.
* tools/syz-declextract: extract function references more preciselyDmitry Vyukov2025-04-151-6/+33
| | | | | | Currently we misparse some function references, e.g. for: .write = (foo) ? bar : baz, we extract "foo". Extract first function reference from such expressions.
* tools/syz-declextract: extract ioctls declared with enumsDmitry Vyukov2025-04-151-9/+141
| | | | | Some ioctls are declared inconsistently using enums rather than macros. Extract these as well.
* tools/syz-declextract: add interface coverage infoDmitry Vyukov2025-04-101-2/+2
| | | | | | Add coverage percent for kernel interfaces. The current data is generated with Mar coverage report on kernel commit 1e7857b28020ba57ca7fdafae7ac855ba326c697.
* pkg/declextract: export syscall variants as separate interfacesDmitry Vyukov2025-04-101-21/+42
| | | | | | 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: refine arg types for syscall variantsDmitry Vyukov2025-04-091-305/+305
| | | | | | Use scope-based dataflow analysis for syscall variants (including ioctls). As the result we only consider code that relates to a partiuclar command/ioctl, and can infer arguments/return types for each command/ioctl independently.
* sys/linux: update auto descriptions and constsDmitry Vyukov2025-04-091-27/+153
| | | | Update auto.txt and consts on v6.15-rc1.
* pkg/declextract: infer syscall commandsDmitry Vyukov2025-01-221-4/+669
| | | | | | | | Use function scope information extracted in the previous commit to infer multiplexed syscalls (fcntl, prctl, ...) and infer their arguments. Descriptions generated on Linux commit c4b9570cfb63501.
* tools/syz-declextract: support function scopesDmitry Vyukov2025-01-221-157/+2806
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* pkg/declextract: remove unused includes and definesDmitry Vyukov2025-01-171-149/+2
| | | | | | | | | | This is nice on its own, but this will also help to prevent lots of problems when we export more info from the clang tool in future. The clang tool does not know what will end up in the final descriptions, so it exports info about all consts that it encounters. As the result we pull in lots of includes/defines, and lots of kernel includes/defines are broken or create problems. So the fewer we have, the better.
* tools/syz-declextract: infer argument/field typesDmitry Vyukov2024-12-171-94/+99
| | | | | | 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.
* pkg/declextract: change auto_todo type to int8Dmitry Vyukov2024-12-131-1/+1
| | | | | | We use auto_todo type as an element of array for void*. array[int8] is lowered to the buffer type, which is much better handled by the fuzzer engine + closer resembles real blobs.
* sys/linux: update auto-generated interfaces with LOC infoDmitry Vyukov2024-12-131-28/+28
|
* pkg/declextract: generated single openat for all related filesDmitry Vyukov2024-12-111-1026/+24
|
* pkg/declextract: restore use of ipv6_addrDmitry Vyukov2024-12-111-2/+2
|
* tools/syz-declextract: generate file_operations descriptionsDmitry Vyukov2024-12-111-0/+3784
| | | | | | | | Emit descriptions for special files in /dev, /sys, /proc, and ./. pkg/declextract combines file_operations info produced by the clang tool with the dynamic probing info produced by pkg/ifaceprobe in order to produce complete descriptions for special files.
* pkg/declextract: emit more netlink familiesDmitry Vyukov2024-12-111-0/+35
| | | | Emit families w/o policy, emit duplicate commands.
* pkg/declextract: refine more networking typesDmitry Vyukov2024-12-111-73/+35
|
* pkg/declextract: refactor netlink generationDmitry Vyukov2024-12-111-2062/+2148
| | | | | | | Emit all information related to a single netlink family close to each other. Previously we emitted them scattered and grouped by info type. That was both inconvinient to emit and inconvinient to read. NFC.
* pkg/declextract: rename generated names for consistencyDmitry Vyukov2024-12-111-1258/+1258
| | | | | | Currently we append "$auto", or "$auto_record", or prepend "auto_", or insert "auto" somewhere in the middle. Use more consistent naming: always append "$auto".
* tools/syz-declextract: rewriteDmitry Vyukov2024-12-111-132/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syz-declextract accumulated a bunch of code health problems so that now it's hard to change/extend it, lots of new features can only be added in in hacky ways and cause lots of code duplication. It's also completly untested. Rewrite the tool to: - move as much code as possible to Go (working with the clang tool is painful for a number of reasons) - allow testing and add unit tests (first layer of tests test what information is produced by the clang tool, second layer of tests test how that information is transformed to descriptions) - allow extending the clang tool output to export arbitrary info in non-hacky way (now it produces arbitrary JSON instead of a mix of incomplete descriptions and interfaces) - remove code duplication in the clang tool and provide common infrastructure to add new analysis w/o causing more duplication - provide more convinient primitives in the clang tool - improve code style consistency and stick to the LLVM code style (in particular, variable names must start with a capital letter, single-statement blocks are not surrounded with {}) - remove intermixing of code that works on different levels (currently we have AST analysis + busness logic + printfs all intermixed with each other) - provide several helper Go packages for better code structuring (e.g. pkg/clangtool just runs the tool on source files in parallel and returns results, this already separates a bunch of low-level logic from the rest of the code under a simple abstraction) I've tried to make the output match the current output as much as possible so that the diff is managable (in some cases at the cost of code quality, this should be fixed in future commits). There are still some differences, but hopefully they are managable for review (more includes/defines, reordered some netlink attributes). Fixed minor bugs are fixed along the way, but mostly NFC: 1. Some unions were incorrectly emitted as [varlen] (C unions are never varlen). 2. Only a of [packed], [align[N]] attributes was emitted for struct (both couldn't be emitted).
* pkg/compiler: add automatic metaDmitry Vyukov2024-12-111-928/+930
| | | | | | Mark the whole file with "meta automatic" instead of marking each syscall. This reduces size of descriptions + allows to do special things with the whole file (e.g. we already treat auto consts specially).
* tools/syz-declextract: prefix flags with auto_Dmitry Vyukov2024-11-261-2/+2
| | | | They can clash with our manual flags names.
* sys/linux: update descriptions/constsDmitry Vyukov2024-11-261-2/+115
| | | | | | | Update to upstream commit 228a1157fb9f. VFIO_TYPE1_NESTING_IOMMU const was removed in 35890f85573c. Remove it from descriptions.
* tools/syz-declextract: support nested netlink policiesDmitry Vyukov2024-11-181-147/+389
|
* tools/syz-declextract: don't generate NLA_REJECT/TYPE_MAX attrsDmitry Vyukov2024-11-181-4/+0
| | | | These are not accepted as inputs (NLA_REJECT is usually used in dump operation).
* tools/syz-declextract: add heuristic for sigsetsizeDmitry Vyukov2024-11-141-11/+11
|
* tools/syz-declextract: improve name matching heuristicsDmitry Vyukov2024-11-141-95/+95
|
* tools/syz-declextract: fix generic netlink family namesDmitry Vyukov2024-11-131-1/+1
|
* tools/syz-declextract: fix reserved struct field namesDmitry Vyukov2024-11-131-4/+4
|
* sys/linux: regenerate automatic descriptionsDmitry Vyukov2024-11-111-6175/+18
|
* tools/syz-declextract: enumerate io_uring operationsDmitry Vyukov2024-11-111-314/+319
|
* tools/syz-declextract: fix non-determinism and syscall selectionDmitry Vyukov2024-11-111-32/+35
| | | | | | | | | Currently syscall selection is non-deterministic and we frequently choose wrond ones. This leads to flaky argument names/types, and wrong argument types (e.g. int16 instead of uid, old_utimbuf32 instead of utimbuf, etc). Make syscall selection robust and correct.
* tools/syz-declextract: make fixed header more readableDmitry Vyukov2024-10-251-3/+3
| | | | Combine all fixed header parts in a single raw string literal.
* sys/linux: regenerate descriptionsDmitry Vyukov2024-10-251-375/+435
| | | | Regenerate descriptions on kernel commit 715ca9dd687f89ddaac8ec8ccb3b5e5a30311a99.
* sys/linux: add automatic_helper attribute to some syscalls and run ↵Pimyn Girgis2024-10-091-308/+345
| | | | syz-declextract
* sys/linux: result of running syz-declextractPimyn Girgis2024-09-251-1083/+3398
|
* sys/linux: remove auto-manual descriptions and run syz-declextractPimyn Girgis2024-09-091-2133/+2134
|
* sys/linux: result of running syz-declextractPimyn Girgis2024-09-031-412/+5994
| | | | Added the result of running syz-declextract. Added auto-manual.txt containing necessary manually written descriptions.
* sys/linux: result of running syz-declextract and syz-env make extract on the ↵Pimyn Girgis2024-08-221-9/+1291
| | | | default config of the Linux kernel
* tools/syz-declextract, sys/linux: generate descriptions with auto attribute ↵Pimyn Girgis2024-08-121-0/+422
and filter syscalls based on architectures Start generating descriptions directly in syz-declextract. Automatically generated descriptions are marked with "auto" attribute and parameter names are changed if they use a reserved keyword. By default, all parameters are of type intptr; This is intended to change later. "run" now produces deterministic output and filters system calls to only allow ones supported by syzkaller supported architectures, and renames any system calls that need to be renamed.