linux-stable/tools
Martin KaFai Lau 663af70aab bpf: selftests: Add helpers to directly use the capget and capset syscall
After upgrading to the newer libcap (>= 2.60),
the libcap commit aca076443591 ("Make cap_t operations thread safe.")
added a "__u8 mutex;" to the "struct _cap_struct".  It caused a few byte
shift that breaks the assumption made in the "struct libcap" definition
in test_verifier.c.

The bpf selftest usage only needs to enable and disable the effective
caps of the running task.  It is easier to directly syscall the
capget and capset instead.  It can also remove the libcap
library dependency.

The cap_helpers.{c,h} is added.  One __u64 is used for all CAP_*
bits instead of two __u32.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20220316173823.2036955-1-kafai@fb.com
2022-03-16 15:07:49 -07:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch tools arch x86: Sync the msr-index.h copy with the kernel sources 2022-02-22 17:43:05 -03:00
bootconfig
bpf bpftool: man: Add missing top level docs 2022-03-15 15:51:41 -07:00
build Merge remote-tracking branch 'torvalds/master' into perf/core 2022-01-13 10:20:59 -03:00
cgroup tools/cgroup/slabinfo: update to work with struct slab 2022-02-21 11:34:49 +01:00
counter
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include bpf-lsm: Introduce new helper bpf_ima_file_hash() 2022-03-10 18:57:54 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Support batch_size option to bpf_prog_test_run 2022-03-09 14:19:22 -08:00
memory-model tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering 2021-11-30 17:47:08 -08:00
objtool objtool: Fix truncated string warning 2022-01-24 10:09:06 -08:00
pci
pcmcia
perf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-03 11:55:12 -08:00
power More ACPI updates for 5.17-rc1 2022-01-18 08:51:51 +02:00
rcu
scripts tools: Fix unavoidable GCC call in Clang builds 2022-03-08 23:36:37 +01:00
spi
testing bpf: selftests: Add helpers to directly use the capget and capset syscall 2022-03-16 15:07:49 -07:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing rtla/osnoise: Fix error message when failing to enable trace instance 2022-02-25 21:05:30 -05:00
usb
virtio
vm tools/vm/page-types.c: print file offset in hexadecimal 2021-11-06 13:30:40 -07:00
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00