This source file includes following definitions.
- trace_bounds_exception_mpx
1
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM mpx
4
5 #if !defined(_TRACE_MPX_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_MPX_H
7
8 #include <linux/tracepoint.h>
9
10 #ifdef CONFIG_X86_INTEL_MPX
11
12 TRACE_EVENT(mpx_bounds_register_exception,
13
14 TP_PROTO(void __user *addr_referenced,
15 const struct mpx_bndreg *bndreg),
16 TP_ARGS(addr_referenced, bndreg),
17
18 TP_STRUCT__entry(
19 __field(void __user *, addr_referenced)
20 __field(u64, lower_bound)
21 __field(u64, upper_bound)
22 ),
23
24 TP_fast_assign(
25 __entry->addr_referenced = addr_referenced;
26 __entry->lower_bound = bndreg->lower_bound;
27 __entry->upper_bound = bndreg->upper_bound;
28 ),
29
30
31
32
33
34
35
36
37
38
39 TP_printk("address referenced: 0x%p bounds: lower: 0x%llx ~upper: 0x%llx",
40 __entry->addr_referenced,
41 __entry->lower_bound,
42 ~__entry->upper_bound
43 )
44 );
45
46 TRACE_EVENT(bounds_exception_mpx,
47
48 TP_PROTO(const struct mpx_bndcsr *bndcsr),
49 TP_ARGS(bndcsr),
50
51 TP_STRUCT__entry(
52 __field(u64, bndcfgu)
53 __field(u64, bndstatus)
54 ),
55
56 TP_fast_assign(
57
58 __entry->bndcfgu = (u64)bndcsr->bndcfgu;
59 __entry->bndstatus = (u64)bndcsr->bndstatus;
60 ),
61
62 TP_printk("bndcfgu:0x%llx bndstatus:0x%llx",
63 __entry->bndcfgu,
64 __entry->bndstatus)
65 );
66
67 DECLARE_EVENT_CLASS(mpx_range_trace,
68
69 TP_PROTO(unsigned long start,
70 unsigned long end),
71 TP_ARGS(start, end),
72
73 TP_STRUCT__entry(
74 __field(unsigned long, start)
75 __field(unsigned long, end)
76 ),
77
78 TP_fast_assign(
79 __entry->start = start;
80 __entry->end = end;
81 ),
82
83 TP_printk("[0x%p:0x%p]",
84 (void *)__entry->start,
85 (void *)__entry->end
86 )
87 );
88
89 DEFINE_EVENT(mpx_range_trace, mpx_unmap_zap,
90 TP_PROTO(unsigned long start, unsigned long end),
91 TP_ARGS(start, end)
92 );
93
94 DEFINE_EVENT(mpx_range_trace, mpx_unmap_search,
95 TP_PROTO(unsigned long start, unsigned long end),
96 TP_ARGS(start, end)
97 );
98
99 TRACE_EVENT(mpx_new_bounds_table,
100
101 TP_PROTO(unsigned long table_vaddr),
102 TP_ARGS(table_vaddr),
103
104 TP_STRUCT__entry(
105 __field(unsigned long, table_vaddr)
106 ),
107
108 TP_fast_assign(
109 __entry->table_vaddr = table_vaddr;
110 ),
111
112 TP_printk("table vaddr:%p", (void *)__entry->table_vaddr)
113 );
114
115 #else
116
117
118
119
120 static inline
121 void trace_bounds_exception_mpx(const struct mpx_bndcsr *bndcsr)
122 {
123 }
124
125 #endif
126
127 #undef TRACE_INCLUDE_PATH
128 #define TRACE_INCLUDE_PATH asm/trace/
129 #undef TRACE_INCLUDE_FILE
130 #define TRACE_INCLUDE_FILE mpx
131 #endif
132
133
134 #include <trace/define_trace.h>