Skip to content

Commit

Permalink
deepin: KABI: KABI reservation for cgroup structures
Browse files Browse the repository at this point in the history
kabi: reserve space for cgroup frame

Link: https://gitee.com/openeuler/kernel/issues/I8SA3O
Signed-off-by: Chen Ridong <[email protected]>
Signed-off-by: Wentao Guan <[email protected]>
  • Loading branch information
Chen Ridong authored and opsiff committed Jan 17, 2025
1 parent a5331bd commit ee71a72
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions include/linux/cgroup-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/workqueue.h>
#include <linux/bpf-cgroup-defs.h>
#include <linux/psi_types.h>
#include <linux/deepin_kabi.h>

#ifdef CONFIG_CGROUPS

Expand Down Expand Up @@ -143,6 +144,10 @@ struct cgroup_file {
struct kernfs_node *kn;
unsigned long notified_at;
struct timer_list notify_timer;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
};

/*
Expand Down Expand Up @@ -200,6 +205,11 @@ struct cgroup_subsys_state {
* fields of the containing structure.
*/
struct cgroup_subsys_state *parent;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

/*
Expand Down Expand Up @@ -297,6 +307,11 @@ struct css_set {

/* For RCU-protected deletion */
struct rcu_head rcu_head;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

struct cgroup_base_stat {
Expand Down Expand Up @@ -368,6 +383,11 @@ struct cgroup_rstat_cpu {
*/
struct cgroup *updated_children; /* terminated by self cgroup */
struct cgroup *updated_next; /* NULL iff not on the list */

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

struct cgroup_freezer_state {
Expand Down Expand Up @@ -525,6 +545,11 @@ struct cgroup {
struct bpf_local_storage __rcu *bpf_cgrp_storage;
#endif

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
DEEPIN_KABI_RESERVE(5)
/* All ancestors including self */
struct cgroup *ancestors[];
};
Expand Down Expand Up @@ -568,6 +593,11 @@ struct cgroup_root {

/* The name for this hierarchy - may be empty */
char name[MAX_CGROUP_ROOT_NAMELEN];

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

/*
Expand Down Expand Up @@ -657,6 +687,9 @@ struct cftype {
__poll_t (*poll)(struct kernfs_open_file *of,
struct poll_table_struct *pt);

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lock_class_key lockdep_key;
#endif
Expand Down Expand Up @@ -691,6 +724,11 @@ struct cgroup_subsys {
void (*release)(struct task_struct *task);
void (*bind)(struct cgroup_subsys_state *root_css);

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)

bool early_init:1;

/*
Expand Down

0 comments on commit ee71a72

Please sign in to comment.