Commit 9bc9a5c9 authored by Yi Yang's avatar Yi Yang
Browse files

tty: kabi: KABI reservation for tty

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T231



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

Reserve space for tty module in advance to prepare for merging new
feature in the future.

Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
parent 21b6ad68
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <uapi/linux/tty.h>
#include <linux/rwsem.h>
#include <linux/llist.h>
#include <linux/kabi.h>


/*
@@ -248,6 +249,12 @@ struct tty_struct {

#define N_TTY_BUF_SIZE 4096
	struct work_struct SAK_work;
	KABI_RESERVE(0)
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
} __randomize_layout;

/* Each of a tty's open files has private_data pointing to tty_file_private */
+5 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#include <linux/llist.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/kabi.h>

struct tty_buffer {
	union {
@@ -18,6 +19,8 @@ struct tty_buffer {
	unsigned int lookahead;		/* Lazy update on recv, can become less than "read" */
	unsigned int read;
	bool flags;
	KABI_RESERVE(0)
	KABI_RESERVE(1)
	/* Data points here */
	u8 data[] __aligned(sizeof(unsigned long));
};
@@ -42,6 +45,8 @@ struct tty_bufhead {
	atomic_t	   mem_used;    /* In-use buffers excluding free list */
	int		   mem_limit;
	struct tty_buffer *tail;	/* Active buffer */
	KABI_RESERVE(0)
	KABI_RESERVE(1)
};

/*
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/uaccess.h>
#include <linux/termios.h>
#include <linux/seq_file.h>
#include <linux/kabi.h>

struct tty_struct;
struct tty_driver;
@@ -391,6 +392,8 @@ struct tty_operations {
	void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
#endif
	int (*proc_show)(struct seq_file *m, void *driver);
	KABI_RESERVE(0)
	KABI_RESERVE(1)
} __randomize_layout;

/**
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ struct tty_struct;
#include <linux/list.h>
#include <linux/lockdep.h>
#include <linux/seq_file.h>
#include <linux/kabi.h>

/*
 * the semaphore definition
@@ -264,6 +265,8 @@ struct tty_ldisc_ops {
				 const u8 *fp, size_t count);

	struct  module *owner;
	KABI_RESERVE(0)
	KABI_RESERVE(1)
};

struct tty_ldisc {
+3 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#include <linux/mutex.h>
#include <linux/tty_buffer.h>
#include <linux/wait.h>
#include <linux/kabi.h>

struct attribute_group;
struct tty_driver;
@@ -121,6 +122,8 @@ struct tty_port {
	int			drain_delay;
	struct kref		kref;
	void			*client_data;
	KABI_RESERVE(0)
	KABI_RESERVE(1)
};

/* tty_port::iflags bits -- use atomic bit ops */