Skip to content

Commit cf76553

Browse files
author
Peter Zijlstra
committed
entry,unwind/deferred: Fix unwind_reset_info() placement
Stephen reported that on KASAN builds he's seeing: vmlinux.o: warning: objtool: user_exc_vmm_communication+0x15a: call to __kasan_check_read() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_debug_user+0x182: call to __kasan_check_read() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_int3+0x123: call to __kasan_check_read() leaves .noinstr.text section vmlinux.o: warning: objtool: noist_exc_machine_check+0x17a: call to __kasan_check_read() leaves .noinstr.text section vmlinux.o: warning: objtool: fred_exc_machine_check+0x17e: call to __kasan_check_read() leaves .noinstr.text section This turns out to be atomic ops from unwind_reset_info() that have explicit instrumentation. Place unwind_reset_info() in the preceding instrumentation_begin() section. Fixes: c6439bf ("Merge tag 'trace-deferred-unwind-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20251105100014.GY4068168@noisy.programming.kicks-ass.net
1 parent aa7387e commit cf76553

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/irq-entry-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ static __always_inline void exit_to_user_mode_prepare(struct pt_regs *regs)
253253
static __always_inline void exit_to_user_mode(void)
254254
{
255255
instrumentation_begin();
256+
unwind_reset_info();
256257
trace_hardirqs_on_prepare();
257258
lockdep_hardirqs_on_prepare();
258259
instrumentation_end();
259260

260-
unwind_reset_info();
261261
user_enter_irqoff();
262262
arch_exit_to_user_mode();
263263
lockdep_hardirqs_on(CALLER_ADDR0);

0 commit comments

Comments
 (0)