]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add prog flag to struct bpf_ksym object
authorJiri Olsa <jolsa@kernel.org>
Thu, 12 Mar 2020 19:56:03 +0000 (20:56 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Mar 2020 19:49:52 +0000 (12:49 -0700)
commitbcd6cb23bc434fbdf19217b0f37ade0247fe7a50
treefc4bb2d1cf96c608c2c200e54766d4dc202cb496
parent080f70f2b399446afd3e7f985ea099c6a0b2b826
bpf: Add prog flag to struct bpf_ksym object

Adding 'prog' bool flag to 'struct bpf_ksym' to mark that
this object belongs to bpf_prog object.

This change allows having bpf_prog objects together with
other types (trampolines and dispatchers) in the single
bpf_tree. It's used when searching for bpf_prog exception
tables by the bpf_prog_ksym_find function, where we need
to get the bpf_prog pointer.

>From now we can safely add bpf_ksym support for trampoline
or dispatcher objects, because we can differentiate them
from bpf_prog objects.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200312195610.346362-9-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
kernel/bpf/core.c