aboutsummaryrefslogtreecommitdiffstats
path: root/executor/syscalls_test.h
Commit message (Collapse)AuthorAgeFilesLines
* pkg/compiler: fix corner case in alignment calculationDmitry Vyukov2018-02-191-4/+6
|
* prog: rework address allocationDmitry Vyukov2018-02-191-2/+8
| | | | | | | | | | | | 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations.
* pkg/compiler: allow len of var-len arraysDmitry Vyukov2018-02-171-4/+6
| | | | | All netfilter subsystems use this unfortunately, so demote this to a warning.
* pkg/compiler: allow unions with only 1 fieldDmitry Vyukov2018-01-271-4/+6
| | | | | | | | | | | | | Unions with only 1 field are not actually unions, and can always be replaced with the option type. However, they are still useful when there will be more options in future but currently only 1 is described. Alternatives are: - not using union (but then all existing programs will be broken when union is finally introduced) - adding a fake field (ugly and reduces fuzzer efficiency) Allow unions with only 1 field.
* pkg/compiler, prog: fix template parent lensDmitry Vyukov2018-01-241-4/+6
| | | | | | | It's possible that a struct can have 2+ parents, which is the same template (differs only by arguments). See the new test case. Support such case.
* pkg/compiler: fix len of parent template structDmitry Vyukov2018-01-231-4/+6
| | | | | | | | | | | | | | | | | | | | | Consider the following example: type len_templ1[DATA1, DATA2] { data DATA1 inner len_temp2[DATA2] } type len_temp2[DATA] { data DATA len len[len_templ1, int8] } Here len refers to a parent struct, but the struct is a template, so it's actual name is something like "len_templ1[int8, int16]". Currently this does not work as compiler barks at incorrect len target. Make this work.
* sys/syz-sysgen: don't generate syz_ syscall numbersDmitry Vyukov2018-01-131-144/+140
| | | | They don't seem to be used today.
* pkg/compiler: support void typeDmitry Vyukov2018-01-131-2/+2
| | | | | | "void": type with static size 0 mostly useful inside of templates and varlen unions can't be syscall argument
* prog: support opt for proc typesDmitry Vyukov2018-01-061-4/+8
|
* prog: add test for len mutationDmitry Vyukov2018-01-061-4/+6
| | | | Test we actually can get an unnatural len value.
* pkg/compiler: add bitsize typeDmitry Vyukov2018-01-061-4/+8
| | | | This is need for few crypto/xfrm descriptions.
* prog: don't serialize output data argsDmitry Vyukov2017-12-171-6/+8
| | | | | | | | Fixes #188 We now will write just ""/1000 to denote a 1000-byte output buffer. Also we now don't store 1000-byte buffer in memory just to denote size. Old format is still parsed.
* prog: introduce more readable format for data argsDmitry Vyukov2017-12-171-4/+6
| | | | | | | | | | | | | | | | | | | | | Fixes #460 File names, crypto algorithm names, etc in programs are completely unreadable: bind$alg(r0, &(0x7f0000408000)={0x26, "6861736800000000000000000000", 0x0, 0x0, "6d6435000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000 00000000000"}, 0x58) Introduce another format for printable strings. New args are denoted by '' ("" for old args). New format is enabled for printable chars, \x00 and \t, \r, \n. Example: `serialize(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`, vs: `serialize(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`,
* prog: fix TestMutateTableDmitry Vyukov2017-12-171-4/+18
| | | | | | Now works fast enough even for short mode. Fixes #208
* sys: move test syscalls to a separate targetDmitry Vyukov2017-12-171-0/+157
We have them in linux solely for historical reasons. Fixes #462