Commit Graph

1164 Commits

Author SHA1 Message Date
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