From: Lu Jialin lujialin4@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8TP4Z
--------------------------------
We reserve some fields beforehand for cgroup_bpf_attach_type bpf_cgroup_storage_type prone and struct cgroup_bpf to change, therefore, we can hot add/change features of bpf cgroup with this enhancement.
After reserving, normally cache does not matter as the reserved fields are not accessed at all.
Signed-off-by: Lu Jialin lujialin4@huawei.com Signed-off-by: Xiang Yang xiangyang3@huawei.com --- include/linux/bpf-cgroup-defs.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/linux/bpf-cgroup-defs.h b/include/linux/bpf-cgroup-defs.h index 7b121bd780eb..fb6adb1c3889 100644 --- a/include/linux/bpf-cgroup-defs.h +++ b/include/linux/bpf-cgroup-defs.h @@ -7,6 +7,7 @@ #include <linux/list.h> #include <linux/percpu-refcount.h> #include <linux/workqueue.h> +#include <linux/kabi.h>
struct bpf_prog_array;
@@ -70,6 +71,15 @@ struct cgroup_bpf {
/* cgroup_bpf is released using a work queue */ struct work_struct release_work; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
#else /* CONFIG_CGROUP_BPF */