linux_old1/tools/objtool
Josh Poimboeuf 4855022a52 objtool: Fix sibling call detection logic
With some configs, objtool reports the following warning:

  arch/x86/kernel/ftrace.o: warning: objtool: ftrace_modify_code_direct()+0x2d: sibling call from callable instruction with modified stack frame

The instruction it's complaining about isn't actually a sibling call.
It's just a normal jump to an address inside the function.  Objtool
thought it was a sibling call because the instruction's jump_dest wasn't
initialized because the function was supposed to be ignored due to its
use of sync_core().

Objtool ended up validating the function instead of ignoring it because
it didn't properly recognize a sibling call to the function.  So fix the
sibling call logic.  Also add a warning to catch ignored functions being
validated so we'll get a more useful error message next time.

Reported-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/96cc8ecbcdd8cb29ddd783817b4af918a6a171b0.1499437107.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-07-08 10:29:48 +02:00
..
Documentation objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
arch/x86 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-07-03 12:40:46 -07:00
.gitignore objtool: Add 'fixdep' to objtool/.gitignore 2016-07-27 11:07:11 +02:00
Build objtool: Move checking code to check.c 2017-06-30 10:19:19 +02:00
Makefile objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
arch.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
builtin-check.c objtool: Move checking code to check.c 2017-06-30 10:19:19 +02:00
builtin.h
cfi.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
check.c objtool: Fix sibling call detection logic 2017-07-08 10:29:48 +02:00
check.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
elf.c objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
elf.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
objtool.c objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now 2017-04-19 13:01:44 -03:00
special.c objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
special.h
warn.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00