Files
kernel_google_msm-4.9/kernel
Stanislav Fomichev 4ec149beff bpf: Fix missing bpf_base_func_proto in cgroup_base_func_proto for CGROUP_NET=n
linux-next build bot reported compile issue [1] with one of its
configs. It looks like when we have CONFIG_NET=n and
CONFIG_BPF{,_SYSCALL}=y, we are missing the bpf_base_func_proto
definition (from net/core/filter.c) in cgroup_base_func_proto.

I'm reshuffling the code a bit to make it work. The common helpers
are moved into kernel/bpf/helpers.c and the bpf_base_func_proto is
exported from there.
Also, bpf_get_raw_cpu_id goes into kernel/bpf/core.c akin to existing
bpf_user_rnd_u32.

[1] https://lore.kernel.org/linux-next/CAKH8qBsBvKHswiX1nx40LgO+BGeTmb1NX8tiTttt_0uu6T3dCA@mail.gmail.com/T/#mff8b0c083314c68c2e2ef0211cb11bc20dc13c72

[huexxx@gmail.com: adapt to a different bpf_base_func_proto() function]
Fixes: 0456ea170cd6 ("bpf: Enable more helpers for BPF_PROG_TYPE_CGROUP_{DEVICE,SYSCTL,SOCKOPT}")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200424235941.58382-1-sdf@google.com
2025-12-21 17:51:41 +01:00
..
2019-11-28 18:28:55 +01:00
2020-01-21 11:28:26 -08:00
2022-07-29 18:58:19 +02:00
2025-12-21 17:51:32 +01:00
2022-09-05 14:02:59 +02:00
2021-03-03 18:08:08 +01:00
2020-04-02 17:20:26 +02:00
2022-07-21 21:42:40 +02:00
2018-08-03 07:55:24 +02:00
2020-01-12 11:24:12 +01:00
2018-04-16 14:04:54 -07:00