diff options
| author | Lorenz Bauer <lmb@cloudflare.com> | 2020-06-11 12:00:40 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-06-11 21:10:50 +0200 |
| commit | 6dd6b37bc78fd2045096b6414fcfc42a7a943cf2 (patch) | |
| tree | f1ad6561b9e64f0aa823c6cdda2658e8bcbd9e50 /sys/linux | |
| parent | 954e0f8699e9388668fa87581c40fb7632ef7ef4 (diff) | |
sys/linux: update BPF_MAP_UPDATE_ELEM to enable more thorough sockmap fuzzing
sockmap and sockhash expect the value of the update syscall to be a file
descriptor for a UDP or TCP socket. Add this knowledge by introducing a
separate union for map update values.
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/bpf.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index 9fef31e31..981bf5036 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -96,10 +96,18 @@ bpf_map_lookup_arg { flags flags[bpf_lookup_flags, int64] } +bpf_map_update_val [ + buf array[int8] + udp sock_udp + udp6 sock_udp6 + tcp sock_tcp + tcp6 sock_tcp6 +] [varlen] + bpf_map_update_arg { map fd_bpf_map key ptr64[in, array[int8]] - val ptr64[in, array[int8]] + val ptr64[in, bpf_map_update_val] flags flags[bpf_map_flags, int64] } |
