@@ -21,16 +21,16 @@ ex_fixup_handler(const struct exception_table_entry *x)
21
21
return (ex_handler_t )((unsigned long )& x -> handler + x -> handler );
22
22
}
23
23
24
- bool ex_handler_default (const struct exception_table_entry * fixup ,
25
- struct pt_regs * regs , int trapnr )
24
+ __visible bool ex_handler_default (const struct exception_table_entry * fixup ,
25
+ struct pt_regs * regs , int trapnr )
26
26
{
27
27
regs -> ip = ex_fixup_addr (fixup );
28
28
return true;
29
29
}
30
30
EXPORT_SYMBOL (ex_handler_default );
31
31
32
- bool ex_handler_fault (const struct exception_table_entry * fixup ,
33
- struct pt_regs * regs , int trapnr )
32
+ __visible bool ex_handler_fault (const struct exception_table_entry * fixup ,
33
+ struct pt_regs * regs , int trapnr )
34
34
{
35
35
regs -> ip = ex_fixup_addr (fixup );
36
36
regs -> ax = trapnr ;
@@ -42,8 +42,8 @@ EXPORT_SYMBOL_GPL(ex_handler_fault);
42
42
* Handler for UD0 exception following a failed test against the
43
43
* result of a refcount inc/dec/add/sub.
44
44
*/
45
- bool ex_handler_refcount (const struct exception_table_entry * fixup ,
46
- struct pt_regs * regs , int trapnr )
45
+ __visible bool ex_handler_refcount (const struct exception_table_entry * fixup ,
46
+ struct pt_regs * regs , int trapnr )
47
47
{
48
48
/* First unconditionally saturate the refcount. */
49
49
* (int * )regs -> cx = INT_MIN / 2 ;
@@ -95,8 +95,8 @@ EXPORT_SYMBOL(ex_handler_refcount);
95
95
* of vulnerability by restoring from the initial state (essentially, zeroing
96
96
* out all the FPU registers) if we can't restore from the task's FPU state.
97
97
*/
98
- bool ex_handler_fprestore (const struct exception_table_entry * fixup ,
99
- struct pt_regs * regs , int trapnr )
98
+ __visible bool ex_handler_fprestore (const struct exception_table_entry * fixup ,
99
+ struct pt_regs * regs , int trapnr )
100
100
{
101
101
regs -> ip = ex_fixup_addr (fixup );
102
102
@@ -108,8 +108,8 @@ bool ex_handler_fprestore(const struct exception_table_entry *fixup,
108
108
}
109
109
EXPORT_SYMBOL_GPL (ex_handler_fprestore );
110
110
111
- bool ex_handler_ext (const struct exception_table_entry * fixup ,
112
- struct pt_regs * regs , int trapnr )
111
+ __visible bool ex_handler_ext (const struct exception_table_entry * fixup ,
112
+ struct pt_regs * regs , int trapnr )
113
113
{
114
114
/* Special hack for uaccess_err */
115
115
current -> thread .uaccess_err = 1 ;
@@ -118,8 +118,8 @@ bool ex_handler_ext(const struct exception_table_entry *fixup,
118
118
}
119
119
EXPORT_SYMBOL (ex_handler_ext );
120
120
121
- bool ex_handler_rdmsr_unsafe (const struct exception_table_entry * fixup ,
122
- struct pt_regs * regs , int trapnr )
121
+ __visible bool ex_handler_rdmsr_unsafe (const struct exception_table_entry * fixup ,
122
+ struct pt_regs * regs , int trapnr )
123
123
{
124
124
if (pr_warn_once ("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pF)\n" ,
125
125
(unsigned int )regs -> cx , regs -> ip , (void * )regs -> ip ))
@@ -133,8 +133,8 @@ bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup,
133
133
}
134
134
EXPORT_SYMBOL (ex_handler_rdmsr_unsafe );
135
135
136
- bool ex_handler_wrmsr_unsafe (const struct exception_table_entry * fixup ,
137
- struct pt_regs * regs , int trapnr )
136
+ __visible bool ex_handler_wrmsr_unsafe (const struct exception_table_entry * fixup ,
137
+ struct pt_regs * regs , int trapnr )
138
138
{
139
139
if (pr_warn_once ("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pF)\n" ,
140
140
(unsigned int )regs -> cx , (unsigned int )regs -> dx ,
@@ -147,8 +147,8 @@ bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup,
147
147
}
148
148
EXPORT_SYMBOL (ex_handler_wrmsr_unsafe );
149
149
150
- bool ex_handler_clear_fs (const struct exception_table_entry * fixup ,
151
- struct pt_regs * regs , int trapnr )
150
+ __visible bool ex_handler_clear_fs (const struct exception_table_entry * fixup ,
151
+ struct pt_regs * regs , int trapnr )
152
152
{
153
153
if (static_cpu_has (X86_BUG_NULL_SEG ))
154
154
asm volatile ("mov %0, %%fs" : : "rm" (__USER_DS ));
@@ -157,7 +157,7 @@ bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
157
157
}
158
158
EXPORT_SYMBOL (ex_handler_clear_fs );
159
159
160
- bool ex_has_fault_handler (unsigned long ip )
160
+ __visible bool ex_has_fault_handler (unsigned long ip )
161
161
{
162
162
const struct exception_table_entry * e ;
163
163
ex_handler_t handler ;
0 commit comments