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: Yi Yang yiyang13@huawei.com --- include/linux/tty.h | 7 +++++++ include/linux/tty_buffer.h | 5 +++++ include/linux/tty_driver.h | 3 +++ include/linux/tty_ldisc.h | 3 +++ include/linux/tty_port.h | 3 +++ 5 files changed, 21 insertions(+)
diff --git a/include/linux/tty.h b/include/linux/tty.h index f002d0f25db7..daddeca8737e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -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 */ diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h index 31125e3be3c5..82c6ad8bd59f 100644 --- a/include/linux/tty_buffer.h +++ b/include/linux/tty_buffer.h @@ -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) };
/* diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 18beff0cec1a..e4883dcf1656 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -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;
/** diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index af01e89074b2..89a41873372c 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -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 { diff --git a/include/linux/tty_port.h b/include/linux/tty_port.h index 6b367eb17979..f30310a3b226 100644 --- a/include/linux/tty_port.h +++ b/include/linux/tty_port.h @@ -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 */