aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2019-10-16 03:24:58 +0000
committerDaniel Borkmann <[email protected]>2019-10-17 14:44:35 +0000
commitccfe29eb29c2edcea6552072ef00ff4117f53e83 (patch)
tree43baf143abe39dd1c045e90e209a00f1993e4930 /tools/lib/bpf/bpf.c
parentbpf: Process in-kernel BTF (diff)
downloadkernel-ccfe29eb29c2edcea6552072ef00ff4117f53e83.tar.gz
kernel-ccfe29eb29c2edcea6552072ef00ff4117f53e83.zip
bpf: Add attach_btf_id attribute to program load
Add attach_btf_id attribute to prog_load command. It's similar to existing expected_attach_type attribute which is used in several cgroup based program types. Unfortunately expected_attach_type is ignored for tracing programs and cannot be reused for new purpose. Hence introduce attach_btf_id to verify bpf programs against given in-kernel BTF type id at load time. It is strictly checked to be valid for raw_tp programs only. In a later patches it will become: btf_id == 0 semantics of existing raw_tp progs. btd_id > 0 raw_tp with BTF and additional type safety. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Acked-by: Martin KaFai Lau <[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