Commit Graph

1427 Commits

Author SHA1 Message Date
Dmitry Vyukov
1155a0d1d6 sys/linux: sync call timeouts with executor
Timeouts in executor and sys/linux get out of sync. Sync them.
2020-04-19 10:26:57 +02:00
Dmitry Vyukov
cc8708904d sys/linux: add timeout call attributes
Move additional call/prog timeouts to descriptions.

Due to this logic duplication executor used 50ms
for syz_mount_image, while pkg/csource used 100ms.
2020-04-19 10:26:57 +02:00
Dmitry Vyukov
90d17ab898 prog: introduce call attributes
Add common infrastructure for syscall attributes.
Add few attributes we want, but they are not implemented for now
(don't affect behavior, this will follow).
2020-04-19 10:26:57 +02:00
Dmitry Vyukov
0781895e0f pkg/compiler: refactor attribute handling
Introduce common infrastructure for describing and parsing attribute
instead of custom per-attribute code scattered across several locations.

Change align attribute syntax from the weird align_N to align[N].
This also allows to use literal constants as N.

Introduce notion of builtin constants.
Currently we have only PTR_SIZE, which is needed to replace
align_ptr with align[PTR_SIZE].
2020-04-19 10:26:57 +02:00
Dmitry Vyukov
365fba2440 executor: surround the data mapping with PROT_NONE pages
Surround the main data mapping with PROT_NONE pages to make virtual address layout more consistent
across different configurations (static/non-static build) and C repros.
One observed case before: executor had a mapping above the data mapping (output region),
while C repros did not have that mapping above, as the result in one case VMA had next link,
while in the other it didn't and it caused a bug to not reproduce with the C repro.

The bug that reproduces only with the mapping above:
https://lkml.org/lkml/2020/4/17/819
2020-04-18 14:43:29 +02:00
Dmitry Vyukov
67234372ef prog: refactor target.MakeMmap
Make MakeMmap return more than 1 call.
This is a preparation for future changes.
Also remove addr/size as they are effectively
always the same and can be inferred from the target
(will also conflict with the future changes).
Also rename to MakeDataMmap to better represent
the new purpose: it's just some arbitrary mmap,
but rather mapping of the data segment.
2020-04-18 14:35:45 +02:00
Dmitry Vyukov
ea36da8271 sys/linux: use PROT_EXEC for the data section mmap
Turns out the mmap protection get out of sync
between executor and C reproducers.
C reproducers missed PROT_EXEC.
Add PROT_EXEC for linux, freebsd and akaros.
2020-04-18 10:33:03 +02:00
ais2397@gmail.com
c743fcb3e0 sys/netbsd: add minherit(2) 2020-04-16 07:02:15 +02:00
Dmitry Vyukov
3f3c557402 sys/linux: add some more ipv4/6 addresses
Add few private ipv4/6 addresses that may affect kernel behavior.
2020-04-14 09:11:27 +02:00
Dmitry Vyukov
ffe85af864 sys/linux: regenerate consts
On the current linux-next:
f19bb13a0eaf0034a603e3b54a7c3a50faf6821e (next-20200414)

EXT4_EOFBLOCKS_FL was removed by 4337ecd1fe997d2b2135b4434caaccdb47c10c06

ARM does not support KVM anymore, removed by 541ad0150ca4 ("arm: Remove 32bit KVM host support").

Fixes #1676
2020-04-14 07:37:58 +02:00
ais2397@gmail.com
a517e13956 sys/netbsd: fix struct stat 2020-04-13 21:20:21 +02:00
Paul Chaignon
17a986e54c sys/linux: add link_create and link_update commands
Signed-off-by: Paul Chaignon <paul@cilium.io>
2020-04-12 17:03:47 +02:00
Paul Chaignon
95536f1d7b bpf: update BPF constants
Signed-off-by: Paul Chaignon <paul@cilium.io>
2020-04-12 17:03:47 +02:00
Ayushi Sharma
d9ed075d1a
sys/netbsd: adding chflags(2) syscalls (#1661) 2020-04-04 00:07:51 +02:00
Andrey Konovalov
84da034b1e sys/linux: run usb runtests with namespace/setuid sandbox 2020-04-03 12:42:06 +02:00
Ayushi Sharma
46105100bf
sys/netbsd: adding lwp syscalls (#1654) 2020-03-31 14:14:00 +02:00
Mark Johnston
7d95711b32 sys/freebsd: add Capsicum system calls 2020-03-27 05:51:58 +01:00
Mark Johnston
be07a9be5e sys/freebsd: add __realpathat system call 2020-03-27 05:51:58 +01:00
Mark Johnston
87abd520f8 sys/freebsd: add bindat(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
c37c8bf05b sys/freebsd: add POSIX shared memory system calls 2020-03-27 05:51:58 +01:00
Mark Johnston
ed2c77ae59 sys/freebsd: add connectat(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
f2e4c4ea82 sys/freebsd: add posix_fadvise(2) and posix_fallocate(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
0645e7c7e9 sys/freebsd: add missing open(2) flags 2020-03-27 05:51:58 +01:00
Mark Johnston
20d6478ce7 sys/freebsd: use symbolic names for faccessat(2) flags 2020-03-27 05:51:58 +01:00
Mark Johnston
7a683c4c28 sys/freebsd: add chflags(2) and related syscalls 2020-03-27 05:51:58 +01:00
Mark Johnston
892d1075a4 sys/freebsd: add lchmod(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
7c5dc2298f sys/freebsd: add copy_file_range(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
31f17aa979 sys/freebsd: add minherit(2) 2020-03-27 05:51:58 +01:00
Mark Johnston
edada2ecad sys/freebsd: add FreeBSD-specific madvise(2) flags 2020-03-27 05:51:58 +01:00
Mark Johnston
0b37813464 sys/freebsd: fix mode for socket_inet_sctp.txt 2020-03-27 05:51:58 +01:00
Dmitry Vyukov
2ab437bb1e prog: improve TestDeserializeHelper
1. Allow to not provide Out if it's the same as In.
2. Always check Out.
2020-03-24 08:43:00 +01:00
Dmitry Vyukov
ef871b2e4f sys/linux: don't use syz_open_dev when openat is enough 2020-03-24 08:43:00 +01:00
Dmitry Vyukov
8cf47975a6 pkg/compiler: truncate const values to their physical size
We do similar truncation for values in the prog package (truncateToBitSize).
Truncating them in the generated descriptions makes it possible
to directly compare values (otherwise -1 and truncated -1 don't match).
2020-03-24 08:43:00 +01:00
Marco Vanotti
aa6c6a5572 sys/fuchsia: Add cprng and vmo tests.
This commit adds two new tests for fuchsia. One tests a basic syscall
(zx_cprng_draw), and the other does multiple tests over a vmo.
2020-03-21 07:02:15 +01:00
Dmitry Vyukov
97bc55cead pkg/compiler: check that flags values fit into base type
flags[foo, int8]
foo = 0x12345678

is always an error, detect these cases.
Found some bugs in mptcp, packet sockets, kvm.
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
2e9037c55f pkg/compiler: check that const values fit into base type
const[0x12345678, int8] is always an error, detect these cases.
Found some bugs in mptcp, socket proto and fuchsia fidl descriptions.
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
80d43738f1 prog: rename target.SanitizeCall to Neutralize
We will need a wrapper for target.SanitizeCall that will do more
than just calling the target-provided function. To avoid confusion
and potential mistakes, give the target function and prog function
different names. Prog package will continue to call this "sanitize",
which will include target's "neutralize" + more.
Also refactor API a bit: we need a helper function that sanitizes
the whole program because that's needed most of the time.

Fixes #477
Fixes #502
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
a2f9a44649 prog: export deserialization test helper for sys/{linux,openbsd}
sys/{linux,openbsd} duplicate deserialization test logic as well.
Export and reuse the existing helper function.
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
1ea952c9ff pkg/compiler: calculate more precise sizes for arguments
If we have:

ioctl(fd fd, cmd int32)
ioctl$FOO(fd fd, cmd const[FOO])

Currently we assume that cmd size in ioctl$FOO is sizeof(void*).
However, we know that in ioctl it's specified as int32,
so we can infer that the actual syscall size is 4.

This massively reduces sizes of socket/setsockopt/getsockopt/ioctl
and some other syscalls, which is good because we now use physical
size in mutation/hints and some other places.

This will also enable not morphing ioctl's into other ioctl's.

Update #477
Update #502
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
924f760604 pkg/compiler: ensure consistency of syscall argument types
Ensure that we don't have conflicting sizes for the same argument
of the same syscall, e.g.:

foo$1(a int16)
foo$2(a int32)

This is useful for several reasons:
 - we will be able avoid morphing syscalls into other syscalls
 - we will be able to figure out more precise sizes for args
   (lots of them are implicitly intptr, which is the largest
   type on most important arches)
 - found few bugs in linux descriptions

Update #477
Update #502
2020-03-17 21:19:13 +01:00
Dmitry Vyukov
5de34a784c pkg/compiler: don't specify syscall consts for test OS
This is just tedious. Fabricate them on the fly.
2020-03-17 21:19:13 +01:00
Andrey Konovalov
d89275f2aa executor, sys/linux: add ath9k usb descriptions
Among other things this changes timeout for USB programs from 2 to 3 seconds.

ath9k fuzzing also requires ath9k firmware to be present, so system images
need to be regenerated with the updated script.
2020-03-13 07:44:43 +01:00
Anton Lindqvist
b655d91b8c sys/openbsd: prevent killing the ssh VM connection
This is one of the root causes of the 'no output from test machine'
panic. Issuing a DIOCKILLSTATES ioctl on a /dev/pf file descriptor will
cause state associated with ongoing connections to be purged;
effectively killing the ssh connection to the VM.

Including net/pfvar.h is necessary in order to make use of the
DIOCKILLSTATES define.
2020-03-05 09:14:28 +01:00
Andrey Konovalov
576fb9bc34 sys, docs: rename syzcall to pseudo-syscall 2020-03-04 19:28:09 +01:00
Anton Lindqvist
09d53fbb27 sys/syz-extract: favor clang on OpenBSD
Clang is the default compiler on amd64 which is the only supported
architecture by syzkaller right now.
2020-03-04 18:27:18 +01:00
Anton Lindqvist
9ef240be5f sys/syz-extract: fix handling of odd prefixed syscalls on OpenBSD
This makes syz-extract work again on OpenBSD.
2020-03-04 18:27:18 +01:00
Anton Lindqvist
4fb7265b97 sys/openbsd: remove unused define 2020-03-04 18:27:18 +01:00
Dmitry Vyukov
2ffa6679c4 sys/linux: add NETLINK_SOCK_DIAG descriptions
Incomplete, but something.
2020-02-21 19:09:56 +01:00
Dmitry Vyukov
4428511d10 sys/linux: add NETLINK_RDMA descriptions 2020-02-21 17:38:10 +01:00
Dmitry Vyukov
ed54dfe305 sys/linux: add NETLINK_AUDIT descriptions 2020-02-21 11:32:08 +01:00
Dmitry Vyukov
82d32c2951 sys/syz-extract: fix output formatting
Remove spaces in the beginning of the message.
The message is actually multi-line and the spaces
are added only before the first line, which makes
the subsequent lines inconsistently offsetted.
2020-02-21 11:19:15 +01:00
Dmitry Vyukov
b6ed147834 prog: dump orig prog if Deserialize panics
We are seeing some one-off panics during Deserialization
and it's unclear if it's machine memory corrpution or
an actual bug in prog. I leam towards machine memory corruption
but it's impossible to prove without seeing the orig program.

Move git revision to prog and it's more base package
(sys can import prog, prog can't import sys).
2020-02-21 10:22:07 +01:00
Dmitry Vyukov
bd2a74a31f sys/linux: add smc_pnetid genetlink descriptions 2020-02-20 18:42:57 +01:00
Dmitry Vyukov
135c18aadb tools: add script that checks copyright headers
Fixes #1604
2020-02-18 16:05:10 +01:00
Dmitry Vyukov
012fbc3229 sys/linux: add descriptions of wireguard packets 2020-02-18 10:31:04 +01:00
Dmitry Vyukov
d52d4872e3 sys/linux: don't extract from futex.txt and watch_queue.txt
These are not present in linux-next.
2020-02-18 10:31:03 +01:00
Dmitry Vyukov
105edea6a3 sys/linux: fix udp test
Fix the packet injection in udp test.
Now we know how to do it!
And without IFF_NAPI_FRAGS it actually reaches the socket.

Update #1594
2020-02-18 10:31:02 +01:00
Dmitry Vyukov
b97f1e694a sys/linux: add broadcast mac address
Code in net/ethernet/eth.c does this:

__be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
{
...
	if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
					      dev->dev_addr))) {
		if (unlikely(is_multicast_ether_addr_64bits(eth->h_dest))) {
			if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
				skb->pkt_type = PACKET_BROADCAST;
			else
				skb->pkt_type = PACKET_MULTICAST;
		} else {
			skb->pkt_type = PACKET_OTHERHOST;
		}
	}

Multicast and broadcast are distinct and dev->broadcast seems to be ffffffffffff
by default, so add another multicast mac address that will serve as PACKET_MULTICAST.
2020-02-18 10:31:02 +01:00
André Almeida
d0d8e8bc77
sys/linux: add new FUTEX_WAIT_MULTIPLE operation
Create individual file for futex syscall and add description for the new
operation FUTEX_WAIT_MULTIPLE.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
2020-02-17 06:27:23 +01:00
Paul Chaignon
cf9142006b sys/linux: add map batch operations
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
2020-02-16 10:22:29 +01:00
Paul Chaignon
88f115c969 sys/linux: update BPF constants and structures
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
2020-02-16 10:22:29 +01:00
Dmitry Vyukov
84f4fc8afc sys/linux: add SO_BINDTODEVICE specialization for wireguard
SO_BINDTODEVICE for wg devices allows to reach very important
part of functionality (wg_xmit).

Update #806
2020-02-12 11:50:15 +01:00
Jason A. Donenfeld
4d1ab643be
sys/linux: restrict wireguard allowedips cidr size
By keeping this small, it means much greater probability that a randomly
generated packet that hits xmit will match an existing peer.
2020-02-11 15:12:17 +01:00
Andrey Konovalov
084454aecd dashboard, sys: update USB config 2020-02-11 02:19:31 +01:00
Dmitry Vyukov
d9e55b056e sys/linux/test: add few tests for UDP
Update #1594
2020-02-10 18:35:43 +01:00
Dmitry Vyukov
18847f55bb pkg/ast: introduce hex-encoded string literals
The stringnozescapes does not make sense with filename,
also we may need similar escaping for string flags.
Handle escaped strings on ast level instead.
This avoids introducing new type and works seamleassly with flags.

As alternative I've also tried using strconv.Quote/Unquote
but it leads to ugly half-escaped strings:
"\xb0\x80s\xe8\xd4N\x91\xe3ڒ,\"C\x82D\xbb\x88\\i\xe2i\xc8\xe9\xd85\xb1\x14):M\xdcn"

Make hex-encoded strings a separate string format instead.
2020-02-10 14:45:20 +01:00
Dmitry Vyukov
d0da558cb1 sys/linux: dump netdev_addr_id for wg2
Commit "wireguard: use wg0, wg1, wg2" added wg2,
bump netdev_addr_id accordingly.
2020-02-10 10:52:58 +01:00
Jason A. Donenfeld
b97dee873b pkg/compiler: allow for escaped strings
This adds stringnozescapes to allow parsing of escape sequences in
strings.
2020-02-10 10:51:16 +01:00
Jason A. Donenfeld
4f86d32773 wireguard: use wg0, wg1, wg2
This matches more closely what people are used to dealing with. We also
add one additional device for interesting multi-interface effects.
2020-02-10 10:51:16 +01:00
Jason A. Donenfeld
2c71f1a912 wireguard: increase chance that public and private will correspond
This tests more edge cases, as well as allowing for potentially a
correponding public and private key to be installed.
2020-02-10 10:51:16 +01:00
Christian Brauner
5be3a391ba sys/linux: add new pidfd_getfd syscall
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-02-06 12:38:23 +01:00
Dmitry Vyukov
692266c73a sys/linux: use literal consts instead of hardcoded number 2020-02-01 11:33:32 +01:00
Christoph Paasch
326d4c7836 sys/linux: add IPPROTO_MPTCP support
Adding support for IPPROTO_MPTCP. Like SMC, it is on top of TCP and can
thus be treated like a regular TCP socket.
2020-02-01 11:14:31 +01:00
Dmitry Vyukov
0eb59c2768 sys/linux: regenerate files 2020-01-31 19:31:55 +01:00
Dmitry Vyukov
96ce537b15 sys/linux: add some wireguard descriptions
Update #806
2020-01-31 19:12:16 +01:00
Dmitry Vyukov
d14236bc0a sys/linux: fix drm_mode_fb_cmd2 layout
Thanks to syz-check for catching this.

Update #590
2020-01-28 15:37:49 +01:00
Dmitry Vyukov
5e48183c6e sys/linux: add ethtool netlink descriptions 2020-01-28 15:08:47 +01:00
Dmitry Vyukov
56cd6c9b80 sys/linux: add time namespace descriptions 2020-01-27 15:18:15 +01:00
Dmitry Vyukov
dd56146d26 prog: remove unused ResourceDesc.Type 2020-01-26 11:30:18 +01:00
Dmitry Vyukov
55da6462ff pkg/serializer: do not write field names if it won't save space
If we are going to write all values, don't write field names.
This only increases size of generated files.
The change reduces size of generated files by 5.8%
(62870496-59410354=3460142 bytes saved).
2020-01-26 11:07:18 +01:00
Dmitry Vyukov
f4e7270e33 sys/linux: extend DRM ioctl descriptions
+ disable binderfs (see comments)
+ add few more missing tty ioctls
+ improve few minor things in hci descriptions
2020-01-25 22:30:06 +01:00
Dmitry Vyukov
11ebf937fc sys/linux: restore FOU_ATTR_LOCAL/PEER_V6
They are being fixed in kernel:
https://lists.openwall.net/netdev/2020/01/23/122
2020-01-23 15:05:22 +01:00
Dmitry Vyukov
8d11a11a30 sys/linux: improve infiniband_rdma descriptions 2020-01-23 15:05:21 +01:00
Dmitry Vyukov
0e8428d26f tools/syz-check: add limited checking of varlen structs
Stop at the fist varlen field, but check the preceeding ones.
Frequently the varlen array is the last field,
so we should get good checking for these cases.

Update #590
2020-01-23 15:05:21 +01:00
Dmitry Vyukov
9ab9b329d9 sys/linux: check for missing/duplicate netlink attrs
Update #590
2020-01-23 15:05:20 +01:00
Dmitry Vyukov
46961c2ff5 sys/linux: fix more netlink warnings
Handle NLA_BITFIELD32.
Match string attribtues better.
Calculate and check min size for varlen structs.
Fix NLA_UNSPEC size check.
Fix some things in descriptions.

Update #590
2020-01-23 15:05:19 +01:00
Dmitry Vyukov
3334d684ce sys/linux: fix incorrect nlattr sizes
Update #590
2020-01-22 18:31:20 +01:00
Dmitry Vyukov
f5fe1f1fcf sys/linux: more fixing of netlink policy names
Update #590
2020-01-22 18:31:20 +01:00
Dmitry Vyukov
2bdcee05b5 sys/linux: mark all nested netlink attributes as nlnest
As far as I understand most subsystems don't care about
the nest flag, but some do. But marking them as nest
won't harm (?). Let's mark all of them.

Caught several cases where should have been used array[policy]
but used just policy.

Update #590
2020-01-22 18:31:19 +01:00
Dmitry Vyukov
e4c56f390e tools/syz-check: improve matching netlink attributes
1. Match policies that has a _suffix in our descriptions
(we frequently do this to improve precision or avoid dup names).
2. Rename policies in descriptions to match kernel names.
3. Match policy if there are several such names in kernel.
4. Recognize policies with helper sub-policies.

Update #590
2020-01-22 18:31:15 +01:00
Dmitry Vyukov
010feb8758 sys/linux: add new netlink warnings
Update #590
2020-01-22 12:19:53 +01:00
Dmitry Vyukov
c40da18cc3 sys/linux: fix IFLA_BR_GROUP_ADDR type 2020-01-20 10:29:45 +01:00
Dmitry Vyukov
0342f8c7bc sys/linux: add more device descriptions (geneve, lowpan, ipoib, cfhsi) 2020-01-19 13:51:21 +01:00
Dmitry Vyukov
4668877967 sys/linux: add some batadv descriptions 2020-01-18 21:02:24 +01:00
Dmitry Vyukov
543c012b4e executor: create macvtap, macsec devices 2020-01-18 21:02:24 +01:00
Dmitry Vyukov
22535fecd5 pkg/compiler: don't mark flags with 0 as bitmask
They can't be a bitmask. This fixes important cases
of "0, 1" and "0, 1, 2" flags. Fix some descriptions
that added 0 to bitmasks explicitly (we should do it
automatically instead).
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
d412ea5e8e pkg/compiler: sort flags values
Will simplify runtime analysis of flags.
Also just no reason to make it more deterministic
and avoid unnecessary diffs in future if values are reordered.
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
132dcea0af pkg/compiler: generate const[0] for flags w/o values
Generate const[0] for flags without values and for flags
with a single value which is 0.
This is the intention in all existing cases (e.g. an enum with types
of something, but there is really only 1 type exists).
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
d2f8d5ab46 sys/linux: fix sigset_t/sigaction layout on arm
Update #590
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
773117bf81 tools/syz-check: also check arm/arm64
They mostly duplicate the warnings we already have for amd64/386.
But uncovered few very interesting local things (e.g. epoll_event
is packed only on amd64, so arm/arm64 layout is wrong, but 386
is correct because int64 alignment is different).

Update #590
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
2ec9a3ad9a sys/linux: update warn files
Just regenerate with current descriptions and current linux-next.
Few uninteresting changes.
2020-01-18 21:02:24 +01:00
Dmitry Vyukov
b803944b58 prog: don't add fallback coverage after prctl
The same reason as with seccomp.
2020-01-15 17:35:31 +01:00
Dmitry Vyukov
b67897d4d1 sys/linux: extend and improve NFNL_SUBSYS_NFTABLES descriptions 2020-01-15 16:06:10 +01:00
Dmitry Vyukov
02b6b5430a sys/linux: add NFNL_SUBSYS_NFTABLES descriptions 2020-01-14 19:55:25 +01:00
Dmitry Vyukov
3288120597 sys/linux: add NFNL_SUBSYS_CTNETLINK_TIMEOUT descriptions 2020-01-13 18:02:45 +01:00
Dmitry Vyukov
99565c1a26 sys/linux: add NFNL_SUBSYS_ACCT descriptions 2020-01-13 07:58:58 +01:00
Dmitry Vyukov
76bd6dd281 sys/linux: add NFNL_SUBSYS_OSF descriptions 2020-01-13 07:58:56 +01:00
Dmitry Vyukov
53faa9fe74 sys/freebsd: fix ipv6_packet name
The common code now expects it to be called ipv6_packet_t.
The freebsd fork wasn't updated when the linux version changed.
2020-01-12 14:01:45 +01:00
Dmitry Vyukov
31290a4541 sys/linux: open more files from procfs 2020-01-12 11:13:18 +01:00
Dmitry Vyukov
4de4e9f01d sys/linux: add NFNL_SUBSYS_ULOG descriptions 2020-01-09 15:13:17 +01:00
Dmitry Vyukov
a41d89c7c9 sys/linux: add NFNL_SUBSYS_QUEUE descriptions 2020-01-09 14:44:40 +01:00
Dmitry Vyukov
d817520681 sys/linux: few minor ipset improvements.
1. Add "bitmap:port" type.
2. ipv4/6 addresses must be in network byte order.
2020-01-07 12:41:07 +01:00
Dmitry Vyukov
1bcd407ecb sys/linux: add ipset descriptions 2020-01-07 10:02:11 +01:00
Dmitry Vyukov
a0f466387d sys/linux: fix 2 netlink data layout bugs
1. Turns out that NLA_F_NESTED is actually used and checked
(nla_parse_nested checks it, while nla_parse_nested_deprecated does not).
Similarly, ipset extensively checks NLA_F_NET_BYTEORDER.
So we need these bits.

2. nla_len must not account for the trailing alighnment padding.
This means we set wrong len for payloads that are not multiple of 4
(int8/int16/strings/arrays/some structs/etc).
2020-01-07 10:02:10 +01:00
Dmitry Vyukov
d2bde102ff pkg/compiler: fix another bitfield layout bug
See the added test for details.
2020-01-07 10:02:09 +01:00
Dmitry Vyukov
d83499aa56 sys/linux: add NFNL_SUBSYS_CTHELPER/NFNL_SUBSYS_CTNETLINK_EXP descriptions 2020-01-05 17:15:59 +01:00
Dmitry Vyukov
d646e21ff4 prog: fix tests for string enforcement
String value enforcement broke a number of tests
where we use different values.
Be more string as to what string values we use in tests.
Required to add tmpfs descriptions to test syz_mount_image.
Also special-casing AF_ALG algorithms as these are auto-generated.
2020-01-05 12:50:29 +01:00
Dmitry Vyukov
c5f5069930 sys/linux: add AF_NETLINK/NETLINK_NETFILTER/NFNL_SUBSYS_CTNETLINK descriptions 2020-01-05 11:46:36 +01:00
Dmitry Vyukov
026aaeb2b5 prog: don't mutate strings with enumerated values
Strings with enumerated values are frequently file names
or have complete enumeration of relevant values.
Mutating complete enumeration if not very profitable.
Mutating file names leads to escaping paths and
fuzzer messing with things it is not supposed to mess with as in:

r0 = openat$apparmor_task_exec(0xffffffffffffff9c, &(0x7f0000000440)='/proc/self//exe\x00', 0x3, 0x0)
2020-01-05 11:46:35 +01:00
Dmitry Vyukov
9c216c0182 sys/linux: add vlan/macvlan/ipvlan/mactap device policies 2020-01-03 21:35:40 +01:00
Dmitry Vyukov
76d86b16e6 executor: setup vlan/macvlan/ipvlan devices 2020-01-03 19:01:39 +01:00
Dmitry Vyukov
b485b85127 sys/linux: add basic AF_PHONET descriptions 2020-01-03 17:36:36 +01:00
Dmitry Vyukov
b2a0884c1b sys/linux: add minimal AFS descriptions 2020-01-03 17:04:29 +01:00
Dmitry Vyukov
8ff25100c2 sys/linux: add 80211 descriptions 2020-01-03 16:11:49 +01:00
Dmitry Vyukov
7ec787382c sys/linux: fix SIOCGIFINDEX
Mark ifindex as opt in SIOCGIFINDEX.
Otherwise it's considered inout and SIOCGIFINDEX can't be used
to produce ifindex'es on its own. It requires an input ifindex
first and only then it can output own ifindex.
2020-01-03 16:11:49 +01:00
Dmitry Vyukov
fca6a74d0c executor: connect virt_wifi to veth
virt_wifi docs say that the enslaved device won't be usable
on itself. It's probably not a good idea to make lo unusable.
Enslave a dedicated veth instead.
2020-01-03 16:11:49 +01:00
Dmitry Vyukov
4e3e3c8d4b sys/linux: add netlabel descriptions 2020-01-03 16:11:49 +01:00
Dmitry Vyukov
21d4f173c5 sys/linux: improve ipv4/ipv6 vnet descriptions
1. Use optional[T] instead of array[T, 0:1].
2. Deduplicate 3 copies of ARP packet.
3. Deduplicate IPOPT_LSRR/IPOPT_SSRR/IPOPT_RR.
4. More precise description of IPOPT_TIMESTAMP/IPOPT_LSRR/IPOPT_SSRR/IPOPT_RR.
5. Don't use IPOPT_END/IPOPT_NOOP in generic option (they have different format).
6. Restrict cipso doi values.
7. Fix IPOPT_RA value type (int16 instead of int32).
8. Match ipv4/ipv6 packet type with payload.
9. Prefer 0 frag_off for ipv4 packets (they are extremely hard to get right).
2020-01-03 16:11:49 +01:00
Dmitry Vyukov
25a0186eba sys/linux: add IPPROTO_L2TP descriptions 2019-12-31 10:52:22 +01:00
Dmitry Vyukov
7f117e28b8 sys/linux: add virt_wifi and xfrm devices
+ some netlink descriptions
2019-12-30 20:18:14 +01:00
Dmitry Vyukov
6b36d33868 syz-manager: corpus rotation
Use a random subset of syscalls/corpus/coverage for each individual VM run.
Hypothesis is that this should allow fuzzer to get more coverage
find more bugs in saturated state (stuck in local optimum).
See the issue and comments for details.

Update #1348
2019-12-30 16:37:38 +01:00
Dmitry Vyukov
28a9676c17 sys/linux: add {MSG,SEM,SHM}_STAT_ANY 2019-12-30 16:37:38 +01:00
Dmitry Vyukov
be5c2c8197 sys/linux: fix 32-bit warnings
Lots of interesting findings...
Especially 2 byte uid/gid/pid.

Update #590
2019-12-23 10:56:16 +01:00
Dmitry Vyukov
4b042b7d67 sys/linux: fix int64 alignment on 386
Turns out int64 alignment is 4 on 386...
But on arm it's still 8.

Another amusing finding thanks to syz-check.

Update #590
2019-12-23 08:57:42 +01:00
Dmitry Vyukov
61f4e7ee54 tools/syz-check: check amd64 and 386 at the same time
Update #590
2019-12-22 19:34:12 +01:00
Dmitry Vyukov
8b96726707 sys/linux: fix warnings in template definition
Update #590
2019-12-22 11:39:02 +01:00
Dmitry Vyukov
c5907f7c7a tools/syz-check: check templates
Also rename some netfilter types to eliminate massive amounts of template warnings.

Update #590
2019-12-22 11:19:49 +01:00
Dmitry Vyukov
9b81e6bdb8 sys/linux: fix warning in dev_video4linux.txt
Update #590
2019-12-22 10:15:24 +01:00
Dmitry Vyukov
8fecec2eb0 sys/linux: another batch of warning fixes
The only remaining part now is dev_video4linux.txt

Update #590
2019-12-22 09:29:44 +01:00
Dmitry Vyukov
bfdfc2603c prog: don't fail decoding on non-default out args
We get them in cross-compilation test where an out const
arg has different values in different archs.
No reason to fail deserialization in that case, replace with default
arg instead.
2019-12-21 14:53:37 +01:00
Dmitry Vyukov
bc5869180f sys/linux: fix 240 warnings in descriptions
Sweeping fix of everything up to socket_netlink_route.txt.

Update #590
2019-12-20 16:45:35 +01:00
Dmitry Vyukov
f83f92fd5e tools/syz-check: inject description compilation warnings
Currently we print them as part of `make genereate`,
but nobody reads them, too much output each time.
Don't print them in `make generate` and instead
print in syz-check, the warn files are a good mechanism
to handle "known warnings".
2019-12-20 16:45:34 +01:00
Dmitry Vyukov
ae5ed0b140 pkg/compiler: fix bitfield layout bug
Fixes #1542

Found thanks to syz-check. Update #590
2019-12-20 16:45:34 +01:00
Dmitry Vyukov
4bba9fd162 pkg/compiler: fix alignment of string-formatted values
We used size as alignment, this is very wrong.

Found thanks to syz-check. Update #590
2019-12-20 16:45:34 +01:00
Dmitry Vyukov
08f0467614 sys/test: and another set of bitfield tests
Just trying to get my head around it (and fix this in tests).

Update #1542
2019-12-20 16:45:33 +01:00
Dmitry Vyukov
e30cbdae48 sys/test: and another bitfield test
Just trying to get my head around it (and fix this in tests).

Update #1542
2019-12-19 20:00:44 +01:00
Dmitry Vyukov
20c6855484 prog: refactor bitfields representation
All callers of BitfieldMiddle just want static size (0 for middle).
Make it so: Size for middle bitfields just returns 0. Removes lots of if's.
Introduce Type.UnitSize, which now holds the underlying type for bitfields.
This will be needed to fix #1542 b/c even if UnitSize=4 for last bitfield
Size can be anywhere from 0 to 4 (not necessary equal to UnitSize due to overlapping).
2019-12-19 19:32:45 +01:00
Dmitry Vyukov
af9047c60a sys/linux: prohibit TIOCSSERIAL
Replace TIOCSSERIAL with TIOCGSERIAL.
TIOCSSERIAL can do nasty things under root, like causing writes to random memory
pretty much like /dev/mem, but this is also working as intended.
For details see:
https://groups.google.com/g/syzkaller-bugs/c/1rVENJf9P4U/m/QtGpapRxAgAJ
https://syzkaller.appspot.com/bug?extid=f4f1e871965064ae689e
TODO: TIOCSSERIAL does some other things that are not dangerous
and would be nice to test, if/when we can sanitize based on sandbox value
we could prohibit it only under sandbox=none.
2019-12-19 19:32:45 +01:00
Dmitry Vyukov
79b211f74b sys/linux: fix caps test for new descriptions 2019-12-18 17:34:36 +01:00
Dmitry Vyukov
52395b6ee8 sys/test: add few other tests for tricky bitfields
Update #1542
2019-12-18 16:42:17 +01:00
Dmitry Vyukov
73c3845438 pkg/compiler: fix incorrect alignment calculation for padding
We assumed that for ConstType alignment is equal to size,
which is perfectly reasonable for normal int8/16/32/64/ptr.
However, padding is also represented by ConstType of arbitrary size,
so if we added 157 bytes of padding that becomes alignment of
the padding field and as the result of the whole struct.
This affects very few structs, but quite radically and quite
important structs.

Discovered thanks to syz-check.

Update #590
2019-12-18 14:44:12 +01:00
Dmitry Vyukov
42dc692776 sys/linux: another batch of syz-check fixes
Update #590
2019-12-18 14:38:24 +01:00
Dmitry Vyukov
fa33c32796 tools/syz-check: don't print our/kernel field name twice if equal 2019-12-18 12:04:56 +01:00
Dmitry Vyukov
82b3c9dfee sys/linux: fix few bugs
Fix some descirptions disperancies with kernel and regenerate warnings on next-20191218.
2019-12-18 12:00:12 +01:00
Dmitry Vyukov
1b49002e79 tools/syz-check: don't print line numbers for warnings
Line numbers create huge diffs when lines change slightly.
That's very unhandy b/c we want to look at added/removed warnings.
2019-12-18 10:50:24 +01:00
Dmitry Vyukov
2f68adff0b sys/linux: support new split sound ioctls
Some sounds ioctls are now explicitly doubled for 32/64 bits. Support that.
Fix mips SOL_SOCKET issues by rearranging includes.
Improve few other fields.
2019-12-18 10:50:24 +01:00
Dmitry Vyukov
0d635f1100 sys/syz-extract: print less output
Don't print every file if extraction is successful.
This makes seeing errors harder as output for each arch takes
more than a single screen.
2019-12-18 10:50:21 +01:00
Andrey Konovalov
f2fe0772a9 sys/linux: various descriptions fixes 2019-12-18 07:48:36 +01:00
Dmitry Vyukov
64ca0a3711 tools/syz-check: add description checking utility
syz-check parses vmlinux dwarf, extracts struct descriptions,
compares them with what we have (size, fields, alignment, etc)
and produces .warn files.
This is first raw version, it can be improved in a number of ways.
But it already helped to identify a critical issue #1542
and shows some wrong struct descriptions.

Update #590
2019-12-17 19:03:39 +01:00
Dmitry Vyukov
7b9de469e6 sys/linux: regenerate consts
Regenerate on next-20191217.
Rename s/VMADDR_CID_RESERVED/VMADDR_CID_LOCAL/ as it was renamed in kernel.
2019-12-17 11:21:45 +01:00
Dmitry Vyukov
17273b73d6 sys/syz-extract: don't redefine __asm__ in ELF mode
This is not necessary since we build legit object file
for the target binary now. But this breaks mips with:

/linux/arch/mips/include/asm/thread_info.h:53:30: error: register name not specified for ‘__current_thread_info’
 register struct thread_info *__current_thread_info __asm__("$28");

So just remove the old hack.

Follow up to #1536
2019-12-17 11:15:08 +01:00
Jouni Hogander
2b31345f36 Autogenerated files for linux/mips64le
This patch adds all autogenerated files for linux/mips64le. Files are
generated by following commands:

make extract
bin/syz-extract -build -os=linux -arch=mips64le -sourcedir=linux
make generate
2019-12-17 11:10:52 +01:00
Jouni Hogander
24856513b2 sys/syz-extract: Add mips64le specific include paths
Couple of include paths are needed for syz-extract to work for
mips64ler2.
2019-12-17 11:10:52 +01:00
Jouni Hogander
07bfd71dac Implement basic support for MIPS64LE
Add basic stuff to enable MIPS64ELR2 target:
 - build
 - make extract
 - make generate
 - qemu execution
 - system call parsing from /proc/kallsyms
2019-12-17 11:10:52 +01:00
Dmitry Vyukov
f5963ab6ed sys/linux: add a test that files are writable 2019-12-16 19:37:38 +01:00
Andrey Konovalov
0ae38e4489 sys/linux: minor improvements for USB descriptions
1. Define endpoint maxpacket as flags with a few valid values.

2. Define bits of bmNetworkCapabilities.
2019-12-16 09:28:02 +01:00
Dmitry Vyukov
a5c1ab05b3 sys/test: add more tests for bitfields
Add tests for issue #1542

The correct results are obtained with the following program:

struct foo {
	unsigned char	f0;
	unsigned int	f1:4;
	unsigned short	f2:4;
};

struct bar {
	char f0;
	struct foo foo;
};

int main() {
	struct bar y;
	memset(&y, 0, sizeof(y));
	y.f0 = 0x12;
	y.foo.f0 = 0x34;
	y.foo.f1 = 0x56;
	y.foo.f2 = 0x78;
	int i;
	for (i = 0; i < sizeof(y); i++)
		printf("%02x", ((unsigned char*)&y)[i]);
	printf("\n");
}
2019-12-13 15:26:10 +01:00
Dmitry Vyukov
cb704a294c executor: fix syz_mount_image
1. It always crashed in cover_reset when coverage is disabled.
2. Use NONFAILING when accessing image segments.
3. Give it additional 100 ms as it may be slow.
4. Add a test for syz_mount_image.
2019-12-10 16:08:35 +01:00
Andrey Konovalov
5a5826a14e sys/linux, dashboard: update USB config and IDs 2019-12-10 12:45:34 +01:00
Marco Vanotti
607350e438 syz/targets: add SyzExecutorCmd flag
This commit adds a new attribute to syzkaller targets that tells
syzkaller how to invoke the syz-executor command.

Some systems, like Fuchsia, are now building syz-executor as part of the
build, and there is no need to copy it over, or to run it from `/tmp`.
In fact, that might stop working at some time in the future in Fuchsia.

All places that used to copy syz-executor into the target machine will
now check for the SyzExecutorCmd flag, and won't copy it if the flag is
set.
2019-12-09 15:13:49 -08:00
Marco Vanotti
1f9a4e330b sys/targets: change clang++ to clang for fuchsia
Syzkaller binaries are built in C mode even if they are c++ binaries.
Recent clang version (clang++-10) consider this an error/warning,
causing issues during build time.

Change-Id: Ia6d1ab46597efc42772c1c7a63188c3c04a729a7
2019-12-09 15:13:49 -08:00
Marco Vanotti
701420fdad sys/targets: fix path for libdriver.so in Fuchsia 2019-12-09 15:13:49 -08:00
Dmitry Vyukov
1508f45368 sys/linux: refine few framebuffer/kbd ioctls 2019-12-07 18:45:45 +01:00
Andrey Konovalov
98b4ef2d37 sys/linux: update USB TODOs 2019-12-05 15:53:48 +01:00
Siddharth Muralee
9fd5a512f3 sys/netbsd: fix the build issues with posix_spawn 2019-12-05 10:06:13 +01:00
Siddharth M
b91ea9289b make required changes to sys/netbsd 2019-12-05 10:06:13 +01:00
R3x
a734d2a6d9 sys/netbsd: add the newer vfork syscall 2019-12-05 10:06:13 +01:00
R3x
e06d2ea701 sys/netbsd: Added posix_spawn and fork syscalls 2019-12-05 10:06:13 +01:00
Dmitry Vyukov
dfe2e9d84a sys/linux: enforce arguments of all syz_open_dev calls
Opening random devices can lead to havoc.
Enforce device major/minor.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
cbfd910250 sys/linux: more tuning of tty devices
Enable /dev/tty{1-6}. These seem to be special.
Few first connected to framebuffers. But the rest
seem to be different from e.g. tty20 anyway.
Also /dev/tty is different from the rest.
/dev/ttyS3 and /dev/ttyprintk are different.
Properly pair BSD pty terminals.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
a715d760ae sys/linux: add /dev/fb1
qemu -vga cirrus results in /dev/fb0 and /dev/fb1.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
ab342da3f9 sys/linux: add binderfs descriptions 2019-12-02 18:21:43 +01:00
Dmitry Vyukov
dc01aea003 sys/linux: add /dev/fb descriptions
Framebuffer descriptions + open more tty dev nodes.
2019-12-02 18:17:04 +01:00
Dmitry Vyukov
82d81ba98e sys/linux: regenerate consts
Regenerate consts now that make extract is fixed.
Interestingly some arm consts have changed (arm/i386 abi difference?).
2019-12-02 14:44:04 +01:00
Dmitry Vyukov
3aa380090f sys/syz-extract: extract constants from ELF
Add a second mode that extracts constant values from
ELF object, instead of running the executable.
This allows to not (1) link binaries, (2) use proper cross-compiler.
It finally fixes 386/arm extracts for my distro.
Hopefully not makes things worse for others,
should generally be safer/more reliable.
The current mode is left b/c I can't test all OSes,
windows binaries are not ELF, so we may need it anyway.
But later we may switch more OSes to this new mode
if they break (fuchsia?).
2019-12-02 14:36:47 +01:00
Dmitry Vyukov
f879db37f9 sys/linux: more device refinements
Add some mode /dev/nodes*
Add anoter midi device.
2019-12-01 19:51:52 +01:00
Dmitry Vyukov
5d12311f3a sys/linux: add /dev/ptp descriptions 2019-12-01 19:07:51 +01:00
Dmitry Vyukov
9dfc7e00d5 sys/linux: refine some device types
/dev/pmem0 is a block device.
/dev/adsp1 is the same as /dev/dsp1.
dmmidi,admmidi,amidi is the same as /dev/snd/midi.
2019-12-01 18:29:00 +01:00
Dmitry Vyukov
27d609bf84 sys/linux: add /dev/snd/pcm* descriptions 2019-12-01 17:47:28 +01:00
Dmitry Vyukov
c35a341c32 sys/linux: add /dev/dsp descriptions 2019-12-01 11:08:13 +01:00
Dmitry Vyukov
3504484430 sys/linux: update consts
Regenerate const files for all arches.
2019-12-01 11:03:27 +01:00
Dmitry Vyukov
edcd9e3c9a sys/syz-extract: use clang if gcc is broken
On my Debian gcc -m32 is hopelessly broken.
Using clang fixes at least arch 386.
Arch arm is still broken b/c clang does not like
some of kernel arm inline assemly constraints.
2019-12-01 10:59:54 +01:00
Dmitry Vyukov
a76bf83ffa sys/linux: fix /dev/watch_queue name
It's /dev/watch_queue not /dev/fd_watch_queue.
Don't know if it was renamed, or alwys wrong, but does not matter much,
now it's /dev/watch_queue.

Also attach v4l ioctls to /dev/swradio,radio,vbi,cec.
It seems that _some_ of them are applicable to these devices as well.
2019-11-30 19:17:15 +01:00
Dmitry Vyukov
3a75be00f5 sys/linux: add open of /dev/dri/renderD128
It's created by qemu but is not matched by the existing /dev/dri/renderD# pattern.
2019-11-29 15:03:37 +01:00
Dmitry Vyukov
ad6aec4193 sys/linux: fix NFC_SOCKPROTO_RAW socket call
It requires SOCK_SEQPACKET not SOCK_STREAM.
2019-11-29 14:47:56 +01:00
Dmitry Vyukov
4f7e1d0f5e sys/linux: use openat for /dev/cdrom
No need to use syz_open_dev here, openat will do.
Also add /dev/cdrom1 b/c qemu -machine q35 creates cdrom1 instead of cdrom.
2019-11-29 10:46:50 +01:00
Dmitry Vyukov
aac51b70cd sys/linux: use known tags for 9p virtio/xen
Name virtio/xen sources "syz" so that it's possible to expose
it from host and actually use.
2019-11-29 10:46:26 +01:00
Paul Chaignon
7a53a9d93f sys/linux: update BPF constants
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-11-29 10:45:42 +01:00
Shiyu Sun
d496d44718 sys/windows/sys.txt: use bool32 instead of int32[0:1] 2019-11-28 10:01:41 +01:00
Shiyu Sun
ba2dd280e6 sys/linux/socket.txt: add more description for socket ioctls 2019-11-28 10:01:41 +01:00
Shiyu Sun
2e2ab0c725 sys/linux: more update to current linux-next 2019-11-28 10:01:41 +01:00
Andrei Vagin
5a38f3f066 sys/linux: describe PTRACE_PEEKSIGINFO
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-11-27 09:35:58 +01:00
Christian Brauner
bc992c0ee4 sys/linux: add new arguments to struct clone_args for clone3()
Linux v5.5 extends struct clone_args for clone3() by two additional
parameters:

@set_tid:      Pointer to an array of type *pid_t. The size
               of the array is defined using @set_tid_size.
               This array is used to select PIDs/TIDs for
               newly created processes. The first element in
               this defines the PID in the most nested PID
               namespace. Each additional element in the array
               defines the PID in the parent PID namespace of
               the original PID namespace. If the array has
               less entries than the number of currently
               nested PID namespaces only the PIDs in the
               corresponding namespaces are set.
@set_tid_size: This defines the size of the array referenced
               in @set_tid. This cannot be larger than the
               kernel's limit of nested PID namespaces.

Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-26 13:07:43 +01:00
Eric Biggers
f72ffd024d sys/linux/fscrypt.txt: add FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64
This flag is new in 5.5.

Also add a link to the fscrypt API documentation.
2019-11-26 11:34:30 +01:00
Eric Biggers
f746151a93 sys/linux/init_alg.go: add new algorithms
Add new crypto algorithms from linux-next (future v5.5):

- BLAKE2b and BLAKE2s
- "-arm" implementations of ChaCha and XChaCha
- "-arm" and "-neon" implementations of Poly1305
2019-11-25 20:23:10 +01:00
Dmitry Vyukov
6bfd3dd23b sys/linux: update to current linux-next
Regenerate consts on linux-next next-20191125.
DEVLINK_ATTR_NETNS_* consts were chifted by 1.
__BPF_FUNC_MAX_ID increased as usual.
CRYPTO_ALG_TYPE_BLKCIPHER, CRYPTO_ALG_TYPE_ABLKCIPHER were removed,
replace them with CRYPTO_ALG_TYPE_SKCIPHER.
2019-11-25 14:30:28 +01:00
Dmitry Vyukov
0199dc9d8c sys/linux: add a NEED comment 2019-11-22 09:40:46 +01:00
Denis Efremov
e89749efe8 sys/linux: run "make generate" for smack
Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Denis Efremov
dd653133d5 sys/linux: extract constants for smack.txt
Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Denis Efremov
159175a74a sys/linux: update smack descriptions
Add descriptions for /sys/fs/smackfs/* interfaces.

Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Dmitry Vyukov
b5c36524a2 sys/targets: add HostFuzzer flag
Move HostFuzzer from vm/qemu.
It's needed in a number of other packages
and strictly saying is not specific to qemu
(it just happened that both fuchsia and akaros only support qemu).
2019-11-16 09:58:54 +01:00
David Pursell
79248ee88b sys/fuchsia: remove deprecated exception APIs
The port-based exception APIs have been deprecated on Fuchsia and will
be removed shortly. Delete them from the syscall definitions and
modify the Fuchsia executor to use the new channel-based APIs instead.
2019-11-14 16:21:01 -08:00
David Pursell
a3f5ce76b1 sys/fuchsia: fix Fuchsia extract/generate
Updates some paths and add zx_eventpair type definition to fix
`make extract` and `make generate`.
2019-11-14 16:21:01 -08:00
Jiri Pirko
5d15a96786 sys/linux/socket.txt: add devlink pci related netdev
Add netdev name related to pci netdev and fix comment for netdevsim0.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Dmitry Vyukov
b17cbe9d11 sys/targets: don't run flag tests on non-build OS
We should not try to do any builds for such targets anyway.
And the compiler does not have to exist/work.
2019-11-07 11:06:56 +01:00
Dmitry Vyukov
0281aea335 sys/linux: fix up some int64 syscall args
See the discussion on #1493.
These args are actually intptr's.
2019-11-07 11:06:48 +01:00
Andrey Konovalov
bc2c6e45b9 sys/linux: update usb runtests
Add a test that issues multiple syz_usb_ep_write calls.
Update hiddev test to use a wider used hid driver.
2019-11-05 16:45:35 +01:00
Dmitry Vyukov
18e12644fc sys/linux/text: fix test program syntax 2019-11-04 12:46:09 +01:00
Dmitry Vyukov
e2d61622eb sys/linux: improve CAN descriptions 2019-11-04 12:39:39 +01:00
Dmitry Vyukov
99d946ccff executor: fix setup of vxcan
Adding vxcan1 also adds vxcan0. Setup and use both.
2019-11-03 15:00:15 +01:00
Jiri Pirko
d40d75d2d7 executor: move fixed pci devlink handle into network namespace
In case there is a fixed pci devlink handle "pci/pci/0000:00:10.0"
on the system (initial network namespace), it is moved to a working
network namespace.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-03 14:20:59 +01:00
Jiri Pirko
97f4b019d8 sys/linux: extend devlink for fixed pci handle
Extend devlink to also work with fixed pci handle "pci/0000:00:10.0".

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-03 14:20:59 +01:00
Jiri Pirko
fceca3f4b7 sys/linux: add forgotten SECCOMP_FILTER_FLAG_NEW_LISTENER bits
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-03 14:20:59 +01:00
Dmitry Vyukov
d603afc9e4 sys/linux: add missing arm/386 CAN consts 2019-11-02 21:44:59 +01:00
Dmitry Vyukov
841212d4cc sys/linux: extend CAN descriptions 2019-11-02 21:31:45 +01:00
Paul Chaignon
1297f23947 sys/linux: use template base to simplify pppox description
Co-authored-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-11-02 21:30:47 +01:00
Paul Chaignon
997ccc675b pkg/compiler: define fileoff template
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-11-01 19:14:49 +01:00
Matthew Dempsky
a41ca8fa82 sys/targets: fix Fuchsia build
Zircon directories have changed. Again.
2019-10-30 13:28:29 -07:00
Dmitry Vyukov
439d7b14af sys/linux: add SECCOMP_FILTER_FLAG_NEW_LISTENER support 2019-10-28 16:54:23 +01:00
Paul Chaignon
cddfeb2030 sys/linux: fix range in InfiniBand description
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-10-25 18:16:59 +02:00
Paul Chaignon
f2635abc2a sys/linux: use alignment in integer ranges
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-10-25 18:16:59 +02:00
Paul Chaignon
9113054e42 sys/freebsd: fix int should be const
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-10-25 18:16:59 +02:00
Paul Chaignon
618d98cd48 sys/linux: fix int should be const in InfiniBand description 2019-10-25 18:16:59 +02:00
Dmitry Vyukov
c401a48c99 sys/linux: add ioctl_ns 2019-10-25 13:41:12 +02:00
Jiri Pirko
04ca72cd45 sys/linux: add support for basic devlink syscalls
Add support for basic set of devlink interface syscalls

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-10-25 13:15:56 +02:00
Hangbin Liu
d01bb02a96 sys/linux/socket_netlink_route_sched: update tca_polices
Update #533

This patch update tca_polices by adding new polices TCA_POLICE_RATE64
and TCA_POLICE_PEAKRATE64

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
c29eac91f1 sys/linux/socket_netlink_route_sched: add new tc actions
Update #533

This patch add new tc actions: ct, ctinfo, xt, mpls

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
4807c9ef9f sys/linux/socket_netlink_route_sched: add tc flower filter
Update #533

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
cf14803361 sys/linux/socket_netlink_route_sched: add some new classes
Update #533

In this patch I added new classes: cake, cbs, fq_codel, mq, mqprio,
multiq, netem, prio, red, sfb, sfq, skbprio, taprio, tbf, ingress,
clsact.

These classes has Qdisc_class_ops in kernel, but no netlink parameters.
So we can testing them by just calling them directly.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
40b82bef55 sys/linux/socket_netlink_route_sched: add some new qdiscs
Update #533

In this patch I added new qdiscs cake, etf, pfifo_fast, plug,
qfq, rr, skbprio, taprio, atm, drr, blackhole, clsact, ingress,
mq.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
b1f951e1e4 sys/linux/socket_netlink_route_sched: fix tcm_info structure
Update #533

Don't know why I didn't add tcm__pad in tcm_info structure
at the begining. But let's fix it now.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Hangbin Liu
910e03ca15 sys/linux/socket_netlink_route_sched: add chain actions
Update #533

Chain actions also use filter policies, so we can add them easily.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-10-24 09:30:50 +02:00
Andrey Konovalov
a970258ea5 dashboard/config: better extract usb configs
When generating a USB config, disable USB symbols that are disabled in the
base config, as they might have been enabled when some of the dependecies
got enabled.
2019-10-23 10:13:19 +02:00
Andrey Konovalov
6901a56e00 executor/usb: enable endpoints on SET_INTERFACE
This commit changes syz_usb_control_io to enable the relevant endpoints
for the interface being set via a SET_INTERFACE request.
2019-10-21 15:56:03 +02:00
Andrey Konovalov
8c88c9c1c9 sys/linux/vusb.txt: add some TODOs 2019-10-16 18:28:52 +02:00
Dmitry Vyukov
d4ea592f78 sys/linux: add some new flags
Add a few new assorted things, some flags, etc.
2019-10-15 14:13:41 +02:00
Dmitry Vyukov
2b7a4c5e69 sys/linux: add exfat descriptions 2019-10-15 13:50:06 +02:00
Dmitry Vyukov
6078bcf4f9 sys/linux: add watch_queue descriptions 2019-10-15 13:50:06 +02:00
Andrey Konovalov
323ca50263 sys/linux/vusb.txt: describe UAC1 device class 2019-10-15 13:08:30 +02:00
Andrey Konovalov
05ad729222 dashboard/config: update USB config 2019-10-14 14:14:06 +02:00