bpf: Introduce cgroup_{common,current}_func_proto
authorStanislav Fomichev <sdf@google.com>
Tue, 23 Aug 2022 22:25:51 +0000 (15:25 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Aug 2022 23:08:21 +0000 (16:08 -0700)
commitdea6a4e17013382b20717664ebf3d7cc405e0952
tree63cec65b79079956824e270aa7455bac8450defe
parent92ec1cc3784a2a8a7a62596dcec4f2224b85dcf4
bpf: Introduce cgroup_{common,current}_func_proto

Split cgroup_base_func_proto into the following:

* cgroup_common_func_proto - common helpers for all cgroup hooks
* cgroup_current_func_proto - common helpers for all cgroup hooks
  running in the process context (== have meaningful 'current').

Move bpf_{g,s}et_retval and other cgroup-related helpers into
kernel/bpf/cgroup.c so they closer to where they are being used.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/20220823222555.523590-2-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf-cgroup.h
kernel/bpf/cgroup.c
kernel/bpf/helpers.c