linux/tools
Andrii Nakryiko ed57802121 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
2019-11-06 13:54:59 -08:00
..
accounting
arch tools headers kvm: Sync kvm headers with the kernel sources 2019-10-15 12:30:08 -03:00
bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-10-26 22:57:27 -07:00
build tools build: Add capability-related feature detection 2019-08-12 17:14:14 -03:00
cgroup iocost_monitor: Report debt 2019-09-10 12:31:39 -06:00
debugging
firewire
firmware
gpio
hv - First round of vmbus hibernation support from Dexuan Cui. 2019-09-24 12:36:31 -07:00
iio tools: iio: add .gitignore 2019-08-18 20:45:57 +01:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-11-02 15:29:58 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Simplify BPF_CORE_READ_BITFIELD_PROBED usage 2019-11-06 13:54:59 -08:00
memory-model tools/memory-model: Update the informal documentation 2019-08-09 10:28:57 -07:00
nfsd
objtool KVM: x86: Check kvm_rebooting in kvm_spurious_fault() 2019-09-25 15:23:33 +02:00
pci
pcmcia
perf perf kmem: Fix memory leak in compact_gfp_flags() 2019-10-16 10:08:32 -03:00
power platform-drivers-x86 for v5.4-2 2019-09-24 12:39:40 -07:00
scripts
spi
testing libbpf: Simplify BPF_CORE_READ_BITFIELD_PROBED usage 2019-11-06 13:54:59 -08:00
thermal/tmon
time
usb
virtio tools/virtio: xen stub 2019-10-13 09:38:27 -04:00
vm
wmi
Makefile tools: Keep list of tools in alphabetical order 2019-08-14 10:59:59 -03:00