Commit be81bea1 authored by Kefeng Wang's avatar Kefeng Wang
Browse files

kabi: mm: add kabi reserve for mm structure

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8UU53



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

Reserve space for the structure in mm subsystem.

Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
parent ea6de9f6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ struct mempolicy {
		nodemask_t cpuset_mems_allowed;	/* relative to these nodes */
		nodemask_t user_nodemask;	/* nodemask passed by user */
	} w;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
};

/*
+4 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@

#include <linux/wait.h>
#include <linux/compiler.h>
#include <linux/kabi.h>

struct kmem_cache;

@@ -23,6 +24,9 @@ typedef struct mempool_s {
	mempool_alloc_t *alloc;
	mempool_free_t *free;
	wait_queue_head_t wait;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
} mempool_t;

static inline bool mempool_initialized(mempool_t *pool)
+9 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ struct vmem_altmap {
	unsigned long free;
	unsigned long align;
	unsigned long alloc;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/*
@@ -99,6 +101,8 @@ struct dev_pagemap_ops {
	 */
	int (*memory_failure)(struct dev_pagemap *pgmap, unsigned long pfn,
			      unsigned long nr_pages, int mf_flags);
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#define PGMAP_ALTMAP_VALID	(1 << 0)
@@ -133,6 +137,11 @@ struct dev_pagemap {
	const struct dev_pagemap_ops *ops;
	void *owner;
	int nr_range;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	union {
		struct range range;
		DECLARE_FLEX_ARRAY(struct range, ranges);
+8 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/kasan.h>
#include <linux/memremap.h>
#include <linux/slab.h>
#include <linux/kabi.h>

struct mempolicy;
struct anon_vma;
@@ -562,6 +563,9 @@ struct vm_fault {
					 * page table to avoid allocation from
					 * atomic context.
					 */
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
};

/*
@@ -641,6 +645,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)
};

#ifdef CONFIG_NUMA_BALANCING
+11 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@

#include <asm/mmu.h>

#include <linux/kabi.h>

#ifndef AT_VECTOR_SIZE_ARCH
#define AT_VECTOR_SIZE_ARCH 0
#endif
@@ -677,6 +679,10 @@ struct vm_area_struct {
#ifdef CONFIG_SHARE_POOL
	struct sp_area *spa;
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
} __randomize_layout;

#ifdef CONFIG_SCHED_MM_CID
@@ -943,6 +949,11 @@ struct mm_struct {
#endif
	} __randomize_layout;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	/*
	 * The mm_cpumask needs to be at the end of mm_struct, because it
	 * is dynamically sized based on nr_cpu_ids.
Loading