]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Refactor bpf_link update handling
authorAndrii Nakryiko <andriin@fb.com>
Wed, 29 Apr 2020 00:16:05 +0000 (17:16 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 29 Apr 2020 00:27:07 +0000 (17:27 -0700)
commit722bf46cf55b31b81480da96e735d9148ce46c22
treea248c1de80b38d6ab048574215a164431ce8ea83
parent77cd6dfd3b36a87bba424c58ff76c980543202b1
bpf: Refactor bpf_link update handling

Make bpf_link update support more generic by making it into another
bpf_link_ops methods. This allows generic syscall handling code to be agnostic
to various conditionally compiled features (e.g., the case of
CONFIG_CGROUP_BPF). This also allows to keep link type-specific code to remain
static within respective code base. Refactor existing bpf_cgroup_link code and
take advantage of this.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200429001614.1544-2-andriin@fb.com
include/linux/bpf-cgroup.h
include/linux/bpf.h
kernel/bpf/cgroup.c
kernel/bpf/syscall.c
kernel/cgroup/cgroup.c