diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2019-11-02 00:18:03 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-11-02 12:45:08 -0700 |
commit | fa553d9b57d4a98a160d1926b4e263e7a78c0cf3 (patch) | |
tree | 59237fefc66616b1656f1ade555b2365e8d89d88 /tools/include | |
parent | 50f9aa44cac7256551b2e0901831e432a6c52b7f (diff) |
bpf, testing: Add selftest to read/write sockaddr from user space
Tested on x86-64 and Ilya was also kind enough to give it a spin on
s390x, both passing with probe_user:OK there. The test is using the
newly added bpf_probe_read_user() to dump sockaddr from connect call
into .bss BPF map and overrides the user buffer via bpf_probe_write_user():
# ./test_progs
[...]
#17 pkt_md_access:OK
#18 probe_user:OK
#19 prog_run_xattr:OK
[...]
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/90f449d8af25354e05080e82fc6e2d3179da30ea.1572649915.git.daniel@iogearbox.net
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions