[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200109160300.26150-17-jthierry@redhat.com>
Date: Thu, 9 Jan 2020 16:02:19 +0000
From: Julien Thierry <jthierry@...hat.com>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: jpoimboe@...hat.com, peterz@...radead.org, raphael.gault@....com,
catalin.marinas@....com, will@...nel.org,
Julien Thierry <jthierry@...hat.com>
Subject: [RFC v5 16/57] objtool: Support restoring BP from the stack without POP
Support instruction that set BP to its previous value (base on the
current CFA state) from the stack without modifying the stack pointer.
Signed-off-by: Julien Thierry <jthierry@...hat.com>
---
tools/objtool/check.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 5b2539eaccba..0a5c51e4e24c 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1507,6 +1507,12 @@ static int update_insn_state(struct instruction *insn, struct insn_state *state)
cfa->base = state->drap_reg;
cfa->offset = 0;
state->drap_offset = -1;
+ } else if (!state->drap && op->src.reg == CFI_SP &&
+ op->dest.reg == cfa->base) {
+
+ /* mov disp(%rsp), %rbp */
+ cfa->base = CFI_SP;
+ cfa->offset += op->src.offset;
}
if (state->drap && op->src.reg == CFI_BP &&
--
2.21.0
Powered by blists - more mailing lists