aboutsummaryrefslogtreecommitdiff
path: root/tools/arch
diff options
context:
space:
mode:
authorPeter Zijlstra2020-04-01 16:38:19 +0200
committerIngo Molnar2020-04-22 10:53:50 +0200
commite25eea89bb8853763a22fa2547199cf96b571ba1 (patch)
treef766e439a5bb171c5c71a56943a684f0e6716723 /tools/arch
parentb746046238bb99b8f703c79f6d95357428fb6476 (diff)
objtool: Introduce HINT_RET_OFFSET
Normally objtool ensures a function keeps the stack layout invariant. But there is a useful exception, it is possible to stuff the return stack in order to 'inject' a 'call': push $fun ret In this case the invariant mentioned above is violated. Add an objtool HINT to annotate this and allow a function exit with a modified stack frame. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200416115118.690601403@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/arch')
-rw-r--r--tools/arch/x86/include/asm/orc_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/arch/x86/include/asm/orc_types.h b/tools/arch/x86/include/asm/orc_types.h
index 6e060907c163..5f18ca7ac51a 100644
--- a/tools/arch/x86/include/asm/orc_types.h
+++ b/tools/arch/x86/include/asm/orc_types.h
@@ -60,6 +60,7 @@
#define ORC_TYPE_REGS_IRET 2
#define UNWIND_HINT_TYPE_SAVE 3
#define UNWIND_HINT_TYPE_RESTORE 4
+#define UNWIND_HINT_TYPE_RET_OFFSET 5
#ifndef __ASSEMBLY__
/*