Commit 219b647a authored by Zheng Yejian's avatar Zheng Yejian
Browse files

tracing: Reserve kabi fields

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: default avatarZheng Yejian <zhengyejian1@huawei.com>
parent 34a4a473
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
+3 −0
Original line number Diff line number Diff line
@@ -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)				\
+3 −0
Original line number Diff line number Diff line
@@ -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
+7 −0
Original line number Diff line number Diff line
@@ -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
+6 −0
Original line number Diff line number Diff line
@@ -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;