diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2020-07-20 13:48:06 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-21 13:26:26 -0700 |
commit | e4d9c2320716ea0e9ef59f503ddd8f253a642ddd (patch) | |
tree | 6f0b5d742197e5600edb95fb3a7fc16f1b4c4335 /tools/testing/selftests/bpf/progs/bpf_iter_udp4.c | |
parent | 6bd557275ad5a1adaff5082f4e24218ba344e0c0 (diff) | |
download | linux-e4d9c2320716ea0e9ef59f503ddd8f253a642ddd.tar.gz linux-e4d9c2320716ea0e9ef59f503ddd8f253a642ddd.tar.bz2 linux-e4d9c2320716ea0e9ef59f503ddd8f253a642ddd.zip |
samples/bpf, selftests/bpf: Use bpf_probe_read_kernel
A handful of samples and selftests fail to build on s390, because
after commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}()
only to archs where they work") bpf_probe_read is not available
anymore.
Fix by using bpf_probe_read_kernel.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200720114806.88823-1-iii@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/bpf_iter_udp4.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/bpf_iter_udp4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c b/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c index 7053784575e4..f258583afbbd 100644 --- a/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c +++ b/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c @@ -18,7 +18,7 @@ static long sock_i_ino(const struct sock *sk) return 0; inode = &container_of(sk_socket, struct socket_alloc, socket)->vfs_inode; - bpf_probe_read(&ino, sizeof(ino), &inode->i_ino); + bpf_probe_read_kernel(&ino, sizeof(ino), &inode->i_ino); return ino; } |