objtool: Add support for intra-function calls
authorAlexandre Chartre <alexandre.chartre@oracle.com>
Tue, 14 Apr 2020 10:36:12 +0000 (12:36 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 30 Apr 2020 18:14:33 +0000 (20:14 +0200)
commit8aa8eb2a8f5b3305a95f39957dd2b715fa668e21
treeed624343256478e97b84d39fac09bdc3228512e8
parentb490f45362002fef57996388e395efc974b013f4
objtool: Add support for intra-function calls

Change objtool to support intra-function calls. On x86, an intra-function
call is represented in objtool as a push onto the stack (of the return
address), and a jump to the destination address. That way the stack
information is correctly updated and the call flow is still accurate.

Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200414103618.12657-4-alexandre.chartre@oracle.com
include/linux/frame.h
tools/objtool/Documentation/stack-validation.txt
tools/objtool/arch/x86/decode.c
tools/objtool/check.c