aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-04-06 23:41:59 +0000
committerDaniel Borkmann <[email protected]>2023-04-11 16:05:44 +0000
commitbdcab4144f5da97cc0fa7e1dd63b8475e10c8f0a (patch)
treebee6d65b08664ac39e3134dce4d0b0621cf65844 /tools/lib/bpf/bpf.c
parentbpf: Add log_true_size output field to return necessary log buffer size (diff)
downloadkernel-bdcab4144f5da97cc0fa7e1dd63b8475e10c8f0a.tar.gz
kernel-bdcab4144f5da97cc0fa7e1dd63b8475e10c8f0a.zip
bpf: Simplify internal verifier log interface
Simplify internal verifier log API down to bpf_vlog_init() and bpf_vlog_finalize(). The former handles input arguments validation in one place and makes it easier to change it. The latter subsumes -ENOSPC (truncation) and -EFAULT handling and simplifies both caller's code (bpf_check() and btf_parse()). For btf_parse(), this patch also makes sure that verifier log finalization happens even if there is some error condition during BTF verification process prior to normal finalization step. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Lorenz Bauer <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf.c')
0 files changed, 0 insertions, 0 deletions