hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9K8D1
--------------------------------
Limit bpf cgroup reserve flags to compile only on CONFIG_KABI_RESERVE.
Signed-off-by: Lu Jialin lujialin4@huawei.com --- include/linux/bpf-cgroup.h | 2 ++ include/linux/bpf.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index bf74485b6567..0d61a7e4778b 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h @@ -49,6 +49,7 @@ enum cgroup_bpf_attach_type { CGROUP_INET4_GETSOCKNAME, CGROUP_INET6_GETSOCKNAME, CGROUP_INET_SOCK_RELEASE, +#ifdef CONFIG_KABI_RESERVE CGROUP_ATTACH_TYPE_KABI_RESERVE_1, CGROUP_ATTACH_TYPE_KABI_RESERVE_2, CGROUP_ATTACH_TYPE_KABI_RESERVE_3, @@ -57,6 +58,7 @@ enum cgroup_bpf_attach_type { CGROUP_ATTACH_TYPE_KABI_RESERVE_6, CGROUP_ATTACH_TYPE_KABI_RESERVE_7, CGROUP_ATTACH_TYPE_KABI_RESERVE_8, +#endif MAX_CGROUP_BPF_ATTACH_TYPE };
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 84d4e4849e3c..fc6754747781 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -562,6 +562,7 @@ struct bpf_prog_offload { enum bpf_cgroup_storage_type { BPF_CGROUP_STORAGE_SHARED, BPF_CGROUP_STORAGE_PERCPU, +#ifdef CONFIG_KABI_RESERVE BPF_CGROUP_STORAGE_KABI_RESERVE_1, BPF_CGROUP_STORAGE_KABI_RESERVE_2, BPF_CGROUP_STORAGE_KABI_RESERVE_3, @@ -570,6 +571,7 @@ enum bpf_cgroup_storage_type { BPF_CGROUP_STORAGE_KABI_RESERVE_6, BPF_CGROUP_STORAGE_KABI_RESERVE_7, BPF_CGROUP_STORAGE_KABI_RESERVE_8, +#endif __BPF_CGROUP_STORAGE_MAX };