提交 56f99a05 编写于 作者: Y Yongqiang Liu 提交者: Zheng Zengkai

kabi: mm: reserve space for memory subsystem related

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JWSP
CVE: NA

--------------------------------------

Reserve space for the structure in memory subsystem.
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 cf7ca788
......@@ -31,6 +31,7 @@
#include <linux/sizes.h>
#include <linux/sched.h>
#include <linux/pgtable.h>
#include <linux/kabi.h>
struct mempolicy;
struct anon_vma;
......@@ -648,6 +649,10 @@ struct vm_operations_struct {
*/
struct page *(*find_special_page)(struct vm_area_struct *vma,
unsigned long addr);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm)
......
......@@ -4,6 +4,7 @@
#include <linux/mm_types_task.h>
#include <linux/kabi.h>
#include <linux/auxvec.h>
#include <linux/list.h>
#include <linux/spinlock.h>
......@@ -374,6 +375,11 @@ struct vm_area_struct {
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
#endif
struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
} __randomize_layout;
struct core_thread {
......@@ -581,6 +587,15 @@ struct mm_struct {
#endif
} __randomize_layout;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_RESERVE(5)
KABI_RESERVE(6)
KABI_RESERVE(7)
KABI_RESERVE(8)
#if IS_ENABLED(CONFIG_KVM) && !defined(__GENKSYMS__)
struct kvm *kvm;
#endif
......
......@@ -8,6 +8,7 @@
#include <linux/mmap_lock.h>
#include <linux/srcu.h>
#include <linux/interval_tree.h>
#include <linux/kabi.h>
struct mmu_notifier_subscriptions;
struct mmu_notifier;
......@@ -215,6 +216,11 @@ struct mmu_notifier_ops {
*/
struct mmu_notifier *(*alloc_notifier)(struct mm_struct *mm);
void (*free_notifier)(struct mmu_notifier *subscription);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
/*
......@@ -234,6 +240,9 @@ struct mmu_notifier {
struct mm_struct *mm;
struct rcu_head rcu;
unsigned int users;
KABI_RESERVE(1)
KABI_RESERVE(2)
};
/**
......
......@@ -21,6 +21,7 @@
#include <linux/mm_types.h>
#include <linux/page-flags.h>
#include <asm/page.h>
#include <linux/kabi.h>
/* Free memory management - zoned buddy allocator. */
#ifndef CONFIG_FORCE_MAX_ZONEORDER
......@@ -583,6 +584,11 @@ struct zone {
bool contiguous;
ZONE_PADDING(_pad3_)
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
/* Zone statistics */
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
atomic_long_t vm_numa_stat[NR_VM_NUMA_STAT_ITEMS];
......@@ -824,6 +830,9 @@ typedef struct pglist_data {
ZONE_PADDING(_pad2_)
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
/* Per-node vmstats */
struct per_cpu_nodestat __percpu *per_cpu_nodestats;
atomic_long_t vm_stat[NR_VM_NODE_STAT_ITEMS];
......
......@@ -12,6 +12,7 @@
#include <linux/fs.h>
#include <linux/atomic.h>
#include <linux/page-flags.h>
#include <linux/kabi.h>
#include <asm/page.h>
struct notifier_block;
......@@ -291,6 +292,8 @@ struct swap_info_struct {
*/
struct work_struct discard_work; /* discard worker */
struct swap_cluster_list discard_clusters; /* discard clusters list */
KABI_RESERVE(1)
KABI_RESERVE(2)
struct plist_node avail_lists[]; /*
* entries in swap_avail_heads, one
* entry per node.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册