lkml.org 
[lkml]   [2020]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: objtool/core] objtool: Use arch specific values in restore_reg()
The following commit has been merged into the objtool/core branch of tip:

Commit-ID: aff5e16918c3706622b138ea82391d6c597c5660
Gitweb: https://git.kernel.org/tip/aff5e16918c3706622b138ea82391d6c597c5660
Author: Julien Thierry <jthierry@redhat.com>
AuthorDate: Fri, 27 Mar 2020 15:28:43
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 22 Apr 2020 10:53:49 +02:00

objtool: Use arch specific values in restore_reg()

The initial register state is set up by arch specific code. Use the
value the arch code has set when restoring registers from the stack.

Suggested-by: Raphael Gault <raphael.gault@arm.com>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/check.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index efb9640..229d61e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1486,8 +1486,8 @@ static void save_reg(struct insn_state *state, unsigned char reg, int base,

static void restore_reg(struct insn_state *state, unsigned char reg)
{
- state->regs[reg].base = CFI_UNDEFINED;
- state->regs[reg].offset = 0;
+ state->regs[reg].base = initial_func_cfi.regs[reg].base;
+ state->regs[reg].offset = initial_func_cfi.regs[reg].offset;
}

/*
\
 
 \ /
  Last update: 2020-04-23 09:51    [W:1.365 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site