Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions include/linux/device-mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/dm-ioctl.h>
#include <linux/deepin_kabi.h>
#include <linux/math64.h>
#include <linux/ratelimit.h>

Expand Down Expand Up @@ -356,11 +357,6 @@ struct dm_target {
*/
bool discards_supported:1;

/*
* Set if this target requires stable data during writeback.
*/
bool needs_stable_writes:1;

/*
* Set if this target requires that discards be split on
* 'max_discard_sectors' boundaries.
Expand Down Expand Up @@ -401,6 +397,9 @@ struct dm_target {
* bio_set_dev(). NOTE: ideally a target should _not_ need this.
*/
bool needs_bio_set_dev:1;

/* Set if this target requires stable data during writeback. */
DEEPIN_KABI_EXTEND(bool needs_stable_writes:1)
};

void *dm_per_bio_data(struct bio *bio, size_t data_size);
Expand Down
12 changes: 7 additions & 5 deletions include/linux/io_uring_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/blkdev.h>
#include <linux/task_work.h>
#include <linux/bitmap.h>
#include <linux/deepin_kabi.h>
#include <linux/llist.h>
#include <uapi/linux/io_uring.h>

Expand Down Expand Up @@ -362,9 +363,6 @@ struct io_ring_ctx {
bool iowq_limits_set;

struct callback_head poll_wq_task_work;
/* deferred ->poll_wq wake up for local task_work */
struct rcu_head poll_wq_rcu;
atomic_t poll_wq_rcu_pending;
struct list_head defer_list;
unsigned sq_thread_idle;
/* protected by ->completion_lock */
Expand All @@ -378,6 +376,9 @@ struct io_ring_ctx {
unsigned short n_sqe_pages;
struct page **ring_pages;
struct page **sqe_pages;
/* deferred ->poll_wq wake up for local task_work */
DEEPIN_KABI_EXTEND(struct rcu_head poll_wq_rcu)
DEEPIN_KABI_EXTEND(atomic_t poll_wq_rcu_pending)
};

struct io_tw_state {
Expand Down Expand Up @@ -579,7 +580,8 @@ struct io_kiocb {
__poll_t apoll_events;
};
atomic_t refs;
bool cancel_seq_set;
DEEPIN_KABI_REPLACE(atomic_t poll_refs,
bool cancel_seq_set)
struct io_task_work io_task_work;
unsigned nr_tw;
/* for polled requests, i.e. IORING_OP_POLL_ADD and async armed poll */
Expand All @@ -589,7 +591,6 @@ struct io_kiocb {
/* opcode allocated if it needs to store data for async defer */
void *async_data;
/* linked requests, IFF REQ_F_HARDLINK or REQ_F_LINK are set */
atomic_t poll_refs;
struct io_kiocb *link;
/* custom credentials, valid IFF REQ_F_CREDS is set */
const struct cred *creds;
Expand All @@ -599,6 +600,7 @@ struct io_kiocb {
u64 extra1;
u64 extra2;
} big_cqe;
DEEPIN_KABI_EXTEND(atomic_t poll_refs)
};

struct io_overflow_cqe {
Expand Down
22 changes: 18 additions & 4 deletions include/linux/mm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,6 @@ struct mm_struct {
*/
int mm_lock_seq;
#endif
#ifdef CONFIG_FUTEX
atomic64_t futex_unique_id;
#endif


unsigned long hiwater_rss; /* High-watermark of RSS usage */
unsigned long hiwater_vm; /* High-water virtual memory usage */
Expand Down Expand Up @@ -1061,8 +1057,26 @@ struct mm_struct {
#endif /* CONFIG_LRU_GEN */
} __randomize_layout;

#ifdef CONFIG_FUTEX
#ifdef CONFIG_64BIT
DEEPIN_KABI_USE(1, atomic64_t futex_unique_id)
DEEPIN_KABI_RESERVE(2)
#else
/*
* 32-bit reserve words are four bytes each and only four-byte
* aligned, which cannot host the alignment atomic64_t needs (eight
* bytes on ARM EABI), so keep two u32 words and cast at the use
* sites. The anonymous struct above holds atomic64_t pinned_vm,
* so its size is a multiple of eight and this storage in fact sits
* at an eight-byte-aligned offset, keeping the casts safe and
* cpu_bitmap at its baseline offset on every layout.
*/
DEEPIN_KABI_USE(1, 2, u32 futex_unique_id[2])
#endif
#else
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
#endif
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
DEEPIN_KABI_RESERVE(5)
Expand Down
7 changes: 4 additions & 3 deletions include/linux/sched/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/percpu_counter.h>
#include <linux/refcount.h>
#include <linux/ratelimit.h>
#include <linux/deepin_kabi.h>

/*
* Some day this will be a full-fledged user tracking system..
Expand All @@ -28,15 +29,15 @@ struct user_struct {
defined(CONFIG_SECRETMEM)
atomic_long_t locked_vm; /* pinned pages charged to RLIMIT_MEMLOCK */
#endif
#ifdef CONFIG_PERF_EVENTS
atomic_long_t perf_mlock; /* perf buffer pages within perf_event_mlock_kb */
#endif
#ifdef CONFIG_WATCH_QUEUE
atomic_t nr_watches; /* The number of watches this user currently has */
#endif

/* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit;
#ifdef CONFIG_PERF_EVENTS
DEEPIN_KABI_EXTEND(atomic_long_t perf_mlock) /* perf buffer pages */
#endif
};

extern int uids_sysfs_init(void);
Expand Down
3 changes: 2 additions & 1 deletion include/linux/unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <linux/init.h>
#include <linux/dcache.h>
#include <linux/deepin_kabi.h>

struct utf8data;
struct utf8data_table;
Expand Down Expand Up @@ -51,7 +52,7 @@ struct unicode_map {
unsigned int version;
const struct utf8data *ntab[UTF8_NMAX];
const struct utf8data_table *tables;
struct rcu_head rcu;
DEEPIN_KABI_EXTEND(struct rcu_head rcu)
};

int utf8_validate(const struct unicode_map *um, const struct qstr *str);
Expand Down
2 changes: 1 addition & 1 deletion kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
mm_init_uprobes_state(mm);
hugetlb_count_init(mm);
#ifdef CONFIG_FUTEX
atomic64_set(&mm->futex_unique_id, 0);
atomic64_set((atomic64_t *)&mm->futex_unique_id, 0);
#endif

if (current->mm) {
Expand Down
3 changes: 2 additions & 1 deletion kernel/futex/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ int get_futex_key(u32 __user *uaddr, bool fshared, union futex_key *key,
}

key->both.offset |= FUT_OFF_MMSHARED;
key->private.mm_seq = get_object_id(&mm->futex_unique_id);
key->private.mm_seq =
get_object_id((atomic64_t *)&mm->futex_unique_id);
key->private.address = address;

} else {
Expand Down
Loading