aboutsummaryrefslogtreecommitdiffstats
path: root/prog/decodeexec.go
Commit message (Collapse)AuthorAgeFilesLines
* all: replace collide mode by `async` call propertyAleksandr Nogikh2021-12-101-0/+4
| | | | | | | | | | | | | Replace the currently existing straightforward approach to race triggering (that was almost entirely implemented inside syz-executor) with a more flexible one. The `async` call property instructs syz-executor not to block until the call has completed execution and proceed immediately to the next call. The decision on what calls to mark with `async` is made by syz-fuzzer. Ultimately this should let us implement more intelligent race provoking strategies as well as make more fine-grained reproducers.
* prog/decodeexec.go: properly handle call props before no-copyin callsAleksandr Nogikh2021-10-071-0/+1
| | | | | | | | | | | If a call having non-default call props is followed by a call not having copyin instructions, the non-default call prop values will be lost. Fix this by trying to commit the call before processing the call props structure. Adjust the call-props-related decodeexec test to emulate that situation as well.
* all: refactor fault injection into call propsAleksandr Nogikh2021-09-221-1/+2
| | | | | | | | | | | | Now that call properties mechanism is implemented, we can refactor fault injection. Unfortunately, it is impossible to remove all traces of the previous apprach. In reprolist and while performing syz-ci jobs, syzkaller still needs to parse the old format. Remove the old prog options-based approach whenever possible and replace it with the use of call properties.
* all: introduce call propertiesAleksandr Nogikh2021-09-221-0/+15
| | | | | | | | | Call properties let us specify how each individual call within a program must be executed. So far the only way to enforce extra rules was to pass extra program-level properties (e.g. that is how fault injection was done). However, it entangles the logic and not flexible enough. Implement an ability to pass properties along with each individual call.
* ipc: fix endianness issuesAlexander Egorenkov2020-06-231-4/+1
| | | | | | | | Use native byte-order for IPC and program serialization. This way we will be able to support both little- and big-endian architectures. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* all: fix some static analysis warningsDmitry Vyukov2019-04-231-3/+3
| | | | | | Fix warnings produced by golangci-lint. Update #977
* prog, pkg/csource: more readable serialization for stringsDmitry Vyukov2018-12-151-2/+7
| | | | | | | Always serialize strings in readable format (non-hex). Serialize binary data in readable format in more cases. Fixes #792
* prog, pkg/compiler: support fmt typeDmitry Vyukov2018-07-081-3/+6
| | | | | fmt type allows to convert intergers and resources to string representation.
* executor: use proper default values for resourcesDmitry Vyukov2018-02-261-13/+25
| | | | | | | | | We currently use -1 as default value for resources when the actual value is not available. -1 is good for fd's, but is not the right default value for pointers/keys/etc. Pass from prog and use in executor proper default value for resources.
* pkg/csource: fix handling of proc typesDmitry Vyukov2017-12-221-3/+8
| | | | | | | | | | Generated program always uses pid=0 even when there are multiple processes. Make each process use own pid. Unfortunately required to do quite significant changes to prog, because the current format only supported fixed pid. Fixes #490
* prog: use dense indexes for copyout instructionsDmitry Vyukov2017-12-171-13/+22
| | | | Fixes #174
* prog: add DeserializeExecDmitry Vyukov2017-12-171-0/+213
Factor out program parsing from pkg/csource. csource code that parses program and at the same time formats output is very messy and complex. New aproach also allows to understand e.g. when a call has copyout instructions which is useful for better C source output.