File tree Expand file tree Collapse file tree 7 files changed +16
-5
lines changed Expand file tree Collapse file tree 7 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ static noinstr bool __do_fast_syscall_32(struct pt_regs *regs)
130
130
/* User code screwed up. */
131
131
regs -> ax = - EFAULT ;
132
132
133
- instrumentation_end ();
134
133
local_irq_disable ();
134
+ instrumentation_end ();
135
135
irqentry_exit_to_user_mode (regs );
136
136
return false;
137
137
}
@@ -269,15 +269,16 @@ __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
269
269
irqentry_state_t state = irqentry_enter (regs );
270
270
bool inhcall ;
271
271
272
+ instrumentation_begin ();
272
273
run_sysvec_on_irqstack_cond (__xen_pv_evtchn_do_upcall , regs );
273
274
274
275
inhcall = get_and_clear_inhcall ();
275
276
if (inhcall && !WARN_ON_ONCE (state .exit_rcu )) {
276
- instrumentation_begin ();
277
277
irqentry_exit_cond_resched ();
278
278
instrumentation_end ();
279
279
restore_inhcall (inhcall );
280
280
} else {
281
+ instrumentation_end ();
281
282
irqentry_exit (regs , state );
282
283
}
283
284
}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ void copy_page(void *to, void *from);
75
75
*
76
76
* With page table isolation enabled, we map the LDT in ... [stay tuned]
77
77
*/
78
- static inline unsigned long task_size_max (void )
78
+ static __always_inline unsigned long task_size_max (void )
79
79
{
80
80
unsigned long ret ;
81
81
Original file line number Diff line number Diff line change @@ -58,12 +58,16 @@ SYM_FUNC_START_NOALIGN(__x86_indirect_alt_call_\reg)
58
58
2: .skip 5 -(2b-1b), 0x90
59
59
SYM_FUNC_END(__x86_indirect_alt_call_\reg)
60
60
61
+ STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg)
62
+
61
63
SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg)
62
64
ANNOTATE_RETPOLINE_SAFE
63
65
1: jmp *%\reg
64
66
2: .skip 5 -(2b-1b), 0x90
65
67
SYM_FUNC_END(__x86_indirect_alt_jmp_\reg)
66
68
69
+ STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg)
70
+
67
71
.endm
68
72
69
73
/*
Original file line number Diff line number Diff line change @@ -592,8 +592,10 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)
592
592
DEFINE_IDTENTRY_RAW (exc_xen_unknown_trap )
593
593
{
594
594
/* This should never happen and there is no way to handle it. */
595
+ instrumentation_begin ();
595
596
pr_err ("Unknown trap in Xen PV mode." );
596
597
BUG ();
598
+ instrumentation_end ();
597
599
}
598
600
599
601
#ifdef CONFIG_X86_MCE
Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ extern int debug_locks_off(void);
27
27
int __ret = 0; \
28
28
\
29
29
if (!oops_in_progress && unlikely(c)) { \
30
+ instrumentation_begin(); \
30
31
if (debug_locks_off() && !debug_locks_silent) \
31
32
WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \
33
+ instrumentation_end(); \
32
34
__ret = 1; \
33
35
} \
34
36
__ret; \
Original file line number Diff line number Diff line change @@ -843,20 +843,22 @@ static int count_matching_names(struct lock_class *new_class)
843
843
}
844
844
845
845
/* used from NMI context -- must be lockless */
846
- static __always_inline struct lock_class *
846
+ static noinstr struct lock_class *
847
847
look_up_lock_class (const struct lockdep_map * lock , unsigned int subclass )
848
848
{
849
849
struct lockdep_subclass_key * key ;
850
850
struct hlist_head * hash_head ;
851
851
struct lock_class * class ;
852
852
853
853
if (unlikely (subclass >= MAX_LOCKDEP_SUBCLASSES )) {
854
+ instrumentation_begin ();
854
855
debug_locks_off ();
855
856
printk (KERN_ERR
856
857
"BUG: looking up invalid subclass: %u\n" , subclass );
857
858
printk (KERN_ERR
858
859
"turning off the locking correctness validator.\n" );
859
860
dump_stack ();
861
+ instrumentation_end ();
860
862
return NULL ;
861
863
}
862
864
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent);
36
36
/*
37
37
* Generic 'turn off all lock debugging' function:
38
38
*/
39
- noinstr int debug_locks_off (void )
39
+ int debug_locks_off (void )
40
40
{
41
41
if (debug_locks && __debug_locks_off ()) {
42
42
if (!debug_locks_silent ) {
You can’t perform that action at this time.
0 commit comments