]> git.baikalelectronics.ru Git - kernel.git/commit
objtool: Fully validate the stack frame
authorJulien Thierry <jthierry@redhat.com>
Wed, 14 Oct 2020 07:38:00 +0000 (08:38 +0100)
committerJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 14 Jan 2021 00:13:09 +0000 (18:13 -0600)
commit5975bfaf35966885925674e6215d2b0a40f7ca9c
tree4fab95754e67178bb0ba365ad92ddc2123cf5842
parent0de845ca16708c4f084d3b978cd0e2e7dcbb43df
objtool: Fully validate the stack frame

A valid stack frame should contain both the return address and the
previous frame pointer value.

On x86, the return value is placed on the stack by the calling
instructions. On other architectures, the callee needs to explicitly
save the return address on the stack.

Add the necessary checks to verify a function properly sets up all the
elements of the stack frame.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
tools/objtool/check.c