diff options
author | KP Singh <kpsingh@google.com> | 2020-03-29 01:43:54 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-03-30 01:35:11 +0200 |
commit | 1e092a0318292637cde832868016f37e942eed24 (patch) | |
tree | a1ba54bb8ab6571011f6f834e2516dee145c2221 /tools/lib/bpf/libbpf.map | |
parent | bpf: lsm: Initialize the BPF LSM hooks (diff) | |
download | linux-1e092a0318292637cde832868016f37e942eed24.tar.xz linux-1e092a0318292637cde832868016f37e942eed24.zip |
tools/libbpf: Add support for BPF_PROG_TYPE_LSM
Since BPF_PROG_TYPE_LSM uses the same attaching mechanism as
BPF_PROG_TYPE_TRACING, the common logic is refactored into a static
function bpf_program__attach_btf_id.
A new API call bpf_program__attach_lsm is still added to avoid userspace
conflicts if this ever changes in the future.
Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Florent Revest <revest@google.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200329004356.27286-7-kpsingh@chromium.org
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index 159826b36b38..eabd3d3e689f 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -244,6 +244,9 @@ LIBBPF_0.0.8 { bpf_link__pin_path; bpf_link__unpin; bpf_map__set_initial_value; + bpf_program__attach_lsm; + bpf_program__is_lsm; bpf_program__set_attach_target; + bpf_program__set_lsm; bpf_set_link_xdp_fd_opts; } LIBBPF_0.0.7; |