Commit Graph

11 Commits

Author SHA1 Message Date
Dmitry Vyukov
52a33fd516 prog: remove default target and all global state
Now each prog function accepts the desired target explicitly.
No global, implicit state involved.
This is much cleaner and allows cross-OS/arch testing, etc.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
ffe7e17368 prog, sys: move types to prog
Large overhaul moves syscalls and arg types from sys to prog.
Sys package now depends on prog and contains only generated
descriptions of syscalls.
Introduce prog.Target type that encapsulates all targer properties,
like syscall list, ptr/page size, etc. Also moves OS-dependent pieces
like mmap call generation from prog to sys.

Update #191
2017-09-05 15:52:42 +02:00
Andrey Konovalov
ac0c70f74a prog, executor: move checksum computation to executor
This commit moves checksum computation to executor. This will allow to embed
dynamically generated values (like TCP sequence numbers) into packets.
2017-05-12 15:47:59 +02:00
Andrey Konovalov
0130c7b34e prog, sys: add icmpv6 packet descriptions and checksums
Also generalize checksums into the two kinds: inet and pseudo.
Inet checksums is just the Internet checksum of a packet.
Pseudo checksum is the Internet checksum of a packet with a pseudo header.
2017-02-08 17:11:54 +01:00
Andrey Konovalov
b4bdefbe9b prog, sys: add icmp descriptions and checksum 2017-02-06 20:24:49 +01:00
Dmitry Vyukov
df41f80177 prog: reformat code 2017-02-02 20:26:43 +01:00
Andrey Konovalov
13266cc0b6 prog, sys: add udp description and checksum 2017-02-02 19:19:32 +01:00
Andrey Konovalov
97ebf05eb9 prog, sys: add ipv6 description and checksum 2017-02-02 16:30:47 +01:00
Andrey Konovalov
d875900eb8 prog: format checksum_test.go 2017-01-31 18:41:17 +01:00
Andrey Konovalov
1f7f5daef8 prog, sys: add tcp packets descriptions
Also embed tcp checksums into packets.
2017-01-30 21:00:45 +01:00
Andrey Konovalov
63b16a5d5c prog, sys: add csum type, embed checksums for ipv4 packets
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.
2017-01-25 20:31:13 +01:00