aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2022-03-16 10:38:23 -0700
committerAlexei Starovoitov <[email protected]>2022-03-16 15:07:49 -0700
commit663af70aabb7c9b6bd5e1c1cdeb44e7025a4f855 (patch)
tree076f9ee083ab1a78459adec451c33df0373e59df /lib/string_helpers.c
parent6585abea98ae5f750358a6427f2ddf7715393f69 (diff)
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 <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions