Revert "x86/unwind: Detect bad stack return address"

Revert the following commit:

b6959a362177 ("x86/unwind: Detect bad stack return address")

... because Andrey Konovalov reported an unwinder warning:

WARNING: unrecognized kernel stack return address ffffffffa0000001 at ffff88006377fa18 in a.out:4467

The unwind was initiated from an interrupt which occurred while running in the
generated code for a kprobe. The unwinder printed the warning because it
expected regs->ip to point to a valid text address, but instead it pointed to
the generated code.

Eventually we may want come up with a way to identify generated kprobe
code so the unwinder can know that it's a valid return address. Until
then, just remove the warning.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/02f296848fbf49fb72dfeea706413ecbd9d4caf6.1482418739.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by Josh Poimboeuf and committed by Ingo Molnar c280f773 cef4402d

+1 -10
+1 -10
arch/x86/kernel/unwind_frame.c
··· 51 51 addr = ftrace_graph_ret_addr(state->task, &state->graph_idx, *addr_p, 52 52 addr_p); 53 53 54 - if (!__kernel_text_address(addr)) { 55 - printk_deferred_once(KERN_WARNING 56 - "WARNING: unrecognized kernel stack return address %p at %p in %s:%d\n", 57 - (void *)addr, addr_p, state->task->comm, 58 - state->task->pid); 59 - unwind_dump(state, addr_p); 60 - return 0; 61 - } 62 - 63 - return addr; 54 + return __kernel_text_address(addr) ? addr : 0; 64 55 } 65 56 EXPORT_SYMBOL_GPL(unwind_get_return_address); 66 57