diff options
| author | Andrii Nakryiko <[email protected]> | 2020-06-16 05:04:30 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-06-17 15:50:02 +0000 |
| commit | 02553b91da5deb63c8562b47529b09b734659af0 (patch) | |
| tree | 82b0bdb70f7daa8660d243a98a1e893b4b08767c /tools/testing/selftests/bpf/progs/test_autoload.c | |
| parent | bpf, xdp, samples: Fix null pointer dereference in *_user code (diff) | |
| download | kernel-02553b91da5deb63c8562b47529b09b734659af0.tar.gz kernel-02553b91da5deb63c8562b47529b09b734659af0.zip | |
bpf: bpf_probe_read_kernel_str() has to return amount of data read on success
During recent refactorings, bpf_probe_read_kernel_str() started returning 0 on
success, instead of amount of data successfully read. This majorly breaks
applications relying on bpf_probe_read_kernel_str() and bpf_probe_read_str()
and their results. Fix this by returning actual number of bytes read.
Fixes: 8d92db5c04d1 ("bpf: rework the compat kernel probe handling")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions
