diff options
author | Andrii Nakryiko <[email protected]> | 2019-11-06 12:15:00 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2019-11-06 13:54:59 -0800 |
commit | ed578021210e14f15a654c825fba6a700c9a39a7 (patch) | |
tree | 0c47815ef3f5ba07f5e0e1262b9a6127fed70bca /scripts/gdb/linux/tasks.py | |
parent | 65a052d537f40e992eb1629cc6c25874064f51fd (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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions