Commit 75711e28 authored by Lu Jialin's avatar Lu Jialin Committed by Zheng Zengkai
Browse files

kabi: reserve space for cgroup bpf structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4GII8?from=project-issue


CVE: NA

--------

We reserve some fields beforehand for cgroup bpf structures prone 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: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarweiyang wang <wangweiyang2@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7ef131ba
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/percpu-refcount.h>
#include <linux/rbtree.h>
#include <uapi/linux/bpf.h>
#include <linux/kabi.h>

struct sock;
struct sockaddr;
@@ -88,6 +89,23 @@ 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)
	KABI_RESERVE(9)
	KABI_RESERVE(10)
	KABI_RESERVE(11)
	KABI_RESERVE(12)
	KABI_RESERVE(13)
	KABI_RESERVE(14)
	KABI_RESERVE(15)
	KABI_RESERVE(16)
};

int cgroup_bpf_inherit(struct cgroup *cgrp);