objtool fixes
Subsystems (5)
Linus,
Please pull the latest objtool/urgent git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2021-06-24
# HEAD: 49faa77759b211fff344898edc23bb780707fff5 locking/lockdep: Improve noinstr vs errors
Address a number of objtool warnings that got reported.
No change in behavior intended, but code generation might be impacted by:
1f008d46f124: ("x86: Always inline task_size_max()")
Thanks,
Ingo
------------------>
Peter Zijlstra (6):
objtool/x86: Ignore __x86_indirect_alt_* symbols x86/entry: Fix noinstr fail in __do_fast_syscall_32() x86/xen: Fix noinstr fail in xen_pv_evtchn_do_upcall() x86/xen: Fix noinstr fail in exc_xen_unknown_trap()
x86: Always inline task_size_max() locking/lockdep: Improve noinstr vs errors
arch/x86/entry/common.c | 5 +++-- arch/x86/include/asm/page_64.h | 2 +- arch/x86/lib/retpoline.S | 4 ++++ arch/x86/xen/enlighten_pv.c | 2 ++ include/linux/debug_locks.h | 2 ++ kernel/locking/lockdep.c | 4 +++- lib/debug_locks.c | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-)
arch/x86/entry/common.c +3 -2
@@ -130,8 +130,8 @@ static noinstr bool __do_fast_syscall_32(struct pt_regs *regs)/* User code screwed up. */ regs->ax = -EFAULT ; -instrumentation_end ();local_irq_disable (); +instrumentation_end ();irqentry_exit_to_user_mode (regs);return false; }
@@ -269,15 +269,16 @@ __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)irqentry_state_t state =irqentry_enter (regs);bool inhcall; +instrumentation_begin ();run_sysvec_on_irqstack_cond (__xen_pv_evtchn_do_upcall, regs); inhcall =get_and_clear_inhcall ();if (inhcall && !WARN_ON_ONCE (state.exit_rcu)) { -instrumentation_begin ();irqentry_exit_cond_resched ();instrumentation_end ();restore_inhcall (inhcall); }else { +instrumentation_end ();irqentry_exit (regs, state); } }
arch/x86/include/asm/page_64.h +1 -1
@@ -75,7 +75,7 @@ void copy_page(void *to, void *from);* * With page table isolation enabled, we map the LDT in ... [stay tuned] */ -static inline unsigned long task_size_max (void ) +static __always_inline unsigned long task_size_max (void ) {unsigned long ret;
arch/x86/lib/retpoline.S +4 -0
@@ -58,12 +58,16 @@ SYM_FUNC_START_NOALIGN(__x86_indirect_alt_call_\reg) 2: .skip 5-(2b-1b), 0x90 SYM_FUNC_END(__x86_indirect_alt_call_\reg) +STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg) + SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg) ANNOTATE_RETPOLINE_SAFE 1: jmp *%\reg 2: .skip 5-(2b-1b), 0x90 SYM_FUNC_END(__x86_indirect_alt_jmp_\reg) +STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg) + .endm /*
arch/x86/xen/enlighten_pv.c +2 -0
@@ -592,8 +592,10 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)DEFINE_IDTENTRY_RAW (exc_xen_unknown_trap) {/* This should never happen and there is no way to handle it. */ +instrumentation_begin ();pr_err ("Unknown trap in Xen PV mode." );BUG (); +instrumentation_end (); }#ifdef CONFIG_X86_MCE
include/linux/debug_locks.h +2 -0
@@ -27,8 +27,10 @@ extern int debug_locks_off(void);int __ret =0 ; \ \if (!oops_in_progress &&unlikely (c)) { \ +instrumentation_begin (); \if (debug_locks_off () && !debug_locks_silent) \ WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \ +instrumentation_end (); \ __ret =1 ; \ } \ __ret; \
kernel/locking/lockdep.c +3 -1
@@ -843,7 +843,7 @@ static int count_matching_names(struct lock_class *new_class) }/* used from NMI context -- must be lockless */ -static __always_inline struct lock_class * +static noinstr struct lock_class *look_up_lock_class (const struct lockdep_map *lock,unsigned int subclass) {struct lockdep_subclass_key *key;
@@ -851,12 +851,14 @@ look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)struct lock_class *class;if (unlikely (subclass >=MAX_LOCKDEP_SUBCLASSES )) { +instrumentation_begin ();debug_locks_off ();printk (KERN_ERR "BUG: looking up invalid subclass: %u\n" , subclass);printk (KERN_ERR "turning off the locking correctness validator.\n" );dump_stack (); +instrumentation_end ();return NULL ; }
lib/debug_locks.c +1 -1
@@ -36,7 +36,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent);/* * Generic 'turn off all lock debugging' function: */ -noinstr int debug_locks_off(void) +int debug_locks_off (void ) {if (debug_locks &&__debug_locks_off ()) {if (!debug_locks_silent) {
The pull request you sent on Thu, 24 Jun 2021 08:54:41 +0200:
The pull request you sent on Thu, 24 Jun 2021 08:54:41 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitobjtool-urgent-2021-06-24
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c0e457851fffd90eac14ad2528dfea3994945c28
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html