summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/bpf_prog_linfo.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-11-06 12:15:00 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-11-06 13:54:59 -0800
commited578021210e14f15a654c825fba6a700c9a39a7 (patch)
tree0c47815ef3f5ba07f5e0e1262b9a6127fed70bca /tools/lib/bpf/bpf_prog_linfo.c
parent65a052d537f40e992eb1629cc6c25874064f51fd (diff)
libbpf: Simplify BPF_CORE_READ_BITFIELD_PROBED usage
Streamline BPF_CORE_READ_BITFIELD_PROBED interface to follow BPF_CORE_READ_BITFIELD (direct) and BPF_CORE_READ, in general, i.e., just return read result or 0, if underlying bpf_probe_read() failed. In practice, real applications rarely check bpf_probe_read() result, because it has to always work or otherwise it's a bug. So propagating internal bpf_probe_read() error from this macro hurts usability without providing real benefits in practice. This patch fixes the issue and simplifies usage, noticeable even in selftest itself. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20191106201500.2582438-1-andriin@fb.com
Diffstat (limited to 'tools/lib/bpf/bpf_prog_linfo.c')
0 files changed, 0 insertions, 0 deletions