On Wed, Oct 9, 2019 at 9:16 PM Alexei Starovoitov <ast@xxxxxxxxxx> wrote: > > 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 <ast@xxxxxxxxxx> > --- Looks good! Acked-by: Andrii Nakryiko <andriin@xxxxxx> > include/linux/bpf.h | 1 + > include/uapi/linux/bpf.h | 1 + > kernel/bpf/syscall.c | 18 ++++++++++++++---- > tools/include/uapi/linux/bpf.h | 1 + > 4 files changed, 17 insertions(+), 4 deletions(-) > [...]