From: Julien Thierry Date: Fri, 27 Mar 2020 15:28:43 +0000 (+0000) Subject: objtool: Use arch specific values in restore_reg() X-Git-Tag: block-5.8-2020-06-11~52^2~48 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=aff5e16918c3706622b138ea82391d6c597c5660;p=linux-2.6-block.git 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 Signed-off-by: Julien Thierry Acked-by: Peter Zijlstra (Intel) Reviewed-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index efb964013552..229d61eba176 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; } /*