File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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)
130130 /* User code screwed up. */
131131 regs -> ax = - EFAULT ;
132132
133- instrumentation_end ();
134133 local_irq_disable ();
134+ instrumentation_end ();
135135 irqentry_exit_to_user_mode (regs );
136136 return false;
137137 }
@@ -269,15 +269,16 @@ __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
269269 irqentry_state_t state = irqentry_enter (regs );
270270 bool inhcall ;
271271
272+ instrumentation_begin ();
272273 run_sysvec_on_irqstack_cond (__xen_pv_evtchn_do_upcall , regs );
273274
274275 inhcall = get_and_clear_inhcall ();
275276 if (inhcall && !WARN_ON_ONCE (state .exit_rcu )) {
276- instrumentation_begin ();
277277 irqentry_exit_cond_resched ();
278278 instrumentation_end ();
279279 restore_inhcall (inhcall );
280280 } else {
281+ instrumentation_end ();
281282 irqentry_exit (regs , state );
282283 }
283284}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ void copy_page(void *to, void *from);
7575 *
7676 * With page table isolation enabled, we map the LDT in ... [stay tuned]
7777 */
78- static inline unsigned long task_size_max (void )
78+ static __always_inline unsigned long task_size_max (void )
7979{
8080 unsigned long ret ;
8181
Original file line number Diff line number Diff line change @@ -58,12 +58,16 @@ SYM_FUNC_START_NOALIGN(__x86_indirect_alt_call_\reg)
58582: .skip 5 -(2b-1b), 0x90
5959SYM_FUNC_END(__x86_indirect_alt_call_\reg)
6060
61+ STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg)
62+
6163SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg)
6264 ANNOTATE_RETPOLINE_SAFE
63651: jmp *%\reg
64662: .skip 5 -(2b-1b), 0x90
6567SYM_FUNC_END(__x86_indirect_alt_jmp_\reg)
6668
69+ STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg)
70+
6771.endm
6872
6973/*
Original file line number Diff line number Diff line change @@ -592,8 +592,10 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)
592592DEFINE_IDTENTRY_RAW (exc_xen_unknown_trap )
593593{
594594 /* This should never happen and there is no way to handle it. */
595+ instrumentation_begin ();
595596 pr_err ("Unknown trap in Xen PV mode." );
596597 BUG ();
598+ instrumentation_end ();
597599}
598600
599601#ifdef CONFIG_X86_MCE
Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ extern int debug_locks_off(void);
2727 int __ret = 0; \
2828 \
2929 if (!oops_in_progress && unlikely(c)) { \
30+ instrumentation_begin(); \
3031 if (debug_locks_off() && !debug_locks_silent) \
3132 WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \
33+ instrumentation_end(); \
3234 __ret = 1; \
3335 } \
3436 __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)
843843}
844844
845845/* used from NMI context -- must be lockless */
846- static __always_inline struct lock_class *
846+ static noinstr struct lock_class *
847847look_up_lock_class (const struct lockdep_map * lock , unsigned int subclass )
848848{
849849 struct lockdep_subclass_key * key ;
850850 struct hlist_head * hash_head ;
851851 struct lock_class * class ;
852852
853853 if (unlikely (subclass >= MAX_LOCKDEP_SUBCLASSES )) {
854+ instrumentation_begin ();
854855 debug_locks_off ();
855856 printk (KERN_ERR
856857 "BUG: looking up invalid subclass: %u\n" , subclass );
857858 printk (KERN_ERR
858859 "turning off the locking correctness validator.\n" );
859860 dump_stack ();
861+ instrumentation_end ();
860862 return NULL ;
861863 }
862864
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent);
3636/*
3737 * Generic 'turn off all lock debugging' function:
3838 */
39- noinstr int debug_locks_off (void )
39+ int debug_locks_off (void )
4040{
4141 if (debug_locks && __debug_locks_off ()) {
4242 if (!debug_locks_silent ) {
You can’t perform that action at this time.
0 commit comments