aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
Commit message (Collapse)AuthorAgeFilesLines
* prog, executor: move checksum computation to executorAndrey Konovalov2017-05-121-11/+94
| | | | | This commit moves checksum computation to executor. This will allow to embed dynamically generated values (like TCP sequence numbers) into packets.
* prog, sys: add csum type, embed checksums for ipv4 packetsAndrey Konovalov2017-01-251-30/+12
| | | | | | | This change adds a `csum[kind, type]` type. The only available kind right now is `ipv4`. Using `csum[ipv4, int16be]` in `ipv4_header` makes syzkaller calculate and embed correct checksums into ipv4 packets.
* prog: validate deserialized programsDmitry Vyukov2017-01-241-2/+4
| | | | | | | The optimization change removed validation too aggressively. We do need program validation during deserialization, because we can get bad programs from corpus or hub. Restore program validation after deserialization.
* all: spot optimizationsDmitry Vyukov2017-01-201-16/+45
| | | | | | | | | | | | | A bunch of spot optmizations after cpu/memory profiling: 1. Optimize hot-path coverage comparison in fuzzer. 2. Don't allocate and copy serialized program, serialize directly into shmem. 3. Reduce allocations during parsing of output shmem (encoding/binary sucks). 4. Don't allocate and copy coverage arrays, refer directly to the shmem region (we are not going to mutate them). 5. Don't validate programs outside of tests, validation allocates tons of memory. 6. Replace the choose primitive with simpler switches. Choose allocates fullload of memory (for int, func, and everything the func refers). 7. Other minor optimizations.
* prog, sys: fix padding varlen structsAndrey Konovalov2017-01-191-1/+1
|
* prog: fix union and struct offsets in SerializeForExecAndrey Konovalov2017-01-181-30/+27
|
* prog: add bitfields to templatesAndrey Konovalov2017-01-171-1/+9
| | | | | | Now it's possible to use `int32:18` to denote a bitfield of size 18 as a struct field. This fixes #72.
* sys: add proc type to denote per proccess integersAndrey Konovalov2016-11-251-5/+5
|
* prog: remote Type argument from Arg.Size/ValueDmitry Vyukov2016-11-111-7/+7
| | | | | They are not necessary since we now always have types attached to args. Also remove sys.Type.InnerType as it is not necessary now as well.
* sys: attach Dir to all typesDmitry Vyukov2016-11-111-1/+1
| | | | | | Dir is a static info, so we don't need to compute, propagate and attach it in prog whenever we generate/change programs. Attach Dir to all types.
* Add big-endian intsAndrey Konovalov2016-10-131-1/+1
|
* prog: skip union when calculating field offsetAndrey Konovalov2016-09-191-1/+1
|
* sys: add union typeDmitry Vyukov2015-12-291-5/+4
|
* prog: don't serialize paddingsDmitry Vyukov2015-12-281-1/+3
| | | | | | Paddings in serialized programs are unnecessary and confusing. Instead restore them implicitly. Also use [,,,,] for arrays.
* prog: remove padding checkingDmitry Vyukov2015-12-231-23/+8
| | | | | So far it has found only false positives. Let's leave this to KMSAN.
* csource: new packageDmitry Vyukov2015-12-231-19/+23
| | | | | Move C source generation into a separate package. Prog is too bloated already.
* sys: automatically add padding to structsDmitry Vyukov2015-12-171-6/+26
|
* initial commitDmitry Vyukov2015-10-121-0/+172