hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8YPFE CVE: NA
--------------------------------
Reserve fields in tracing related structs for possible kabi compatibility processing in future.
Signed-off-by: Zheng Yejian zhengyejian1@huawei.com --- include/linux/ftrace.h | 3 +++ include/linux/trace_events.h | 3 +++ include/linux/tracepoint-defs.h | 3 +++ kernel/trace/ring_buffer.c | 7 +++++++ kernel/trace/trace.h | 6 ++++++ 5 files changed, 22 insertions(+)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e8921871ef9a..56892db7de5c 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -21,6 +21,7 @@ #include <linux/fs.h>
#include <asm/ftrace.h> +#include <linux/kabi.h>
/* * If the arch supports passing the variable contents of @@ -340,6 +341,8 @@ struct ftrace_ops { unsigned long direct_call; #endif #endif + KABI_RESERVE(1) + KABI_RESERVE(2) };
extern struct ftrace_ops __rcu *ftrace_ops_list; diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index cf9f0c61796e..172cf91a45de 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -9,6 +9,7 @@ #include <linux/hardirq.h> #include <linux/perf_event.h> #include <linux/tracepoint.h> +#include <linux/kabi.h>
struct trace_array; struct array_buffer; @@ -677,6 +678,8 @@ struct trace_event_file { atomic_t ref; /* ref count for opened files */ atomic_t sm_ref; /* soft-mode reference counter */ atomic_t tm_ref; /* trigger-mode reference counter */ + KABI_RESERVE(1) + KABI_RESERVE(2) };
#define __TRACE_EVENT_FLAGS(name, value) \ diff --git a/include/linux/tracepoint-defs.h b/include/linux/tracepoint-defs.h index 4dc4955f0fbf..66b4098f7d77 100644 --- a/include/linux/tracepoint-defs.h +++ b/include/linux/tracepoint-defs.h @@ -10,6 +10,7 @@
#include <linux/atomic.h> #include <linux/static_key.h> +#include <linux/kabi.h>
struct static_call_key;
@@ -39,6 +40,8 @@ struct tracepoint { int (*regfunc)(void); void (*unregfunc)(void); struct tracepoint_func __rcu *funcs; + KABI_RESERVE(1) + KABI_RESERVE(2) };
#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index f1ef4329343b..e70aa61539dc 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -28,6 +28,7 @@ #include <linux/oom.h>
#include <asm/local.h> +#include <linux/kabi.h>
/* * The "absolute" timestamp in the buffer is only 59 bits. @@ -537,6 +538,9 @@ struct ring_buffer_per_cpu { struct completion update_done;
struct rb_irq_work irq_work; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
struct trace_buffer { @@ -571,6 +575,9 @@ struct ring_buffer_iter { u64 page_stamp; struct ring_buffer_event *event; int missed_events; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
#ifdef RB_TIME_32 diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 52123df262b2..8eebd99cbb89 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -21,6 +21,7 @@ #include <linux/workqueue.h> #include <linux/ctype.h> #include <linux/once_lite.h> +#include <linux/kabi.h>
#include "pid_list.h"
@@ -410,6 +411,9 @@ struct trace_array { struct cond_snapshot *cond_snapshot; #endif struct trace_func_repeats __percpu *last_func_repeats; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
enum { @@ -1326,6 +1330,8 @@ struct ftrace_event_field { int size; int is_signed; int len; + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct prog_entry;