diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-03-25 14:04:45 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-04-22 10:53:50 +0200 |
commit | e7c0219b328c96746767f21b9532eed6a48f61c5 (patch) | |
tree | 1947692e76fbe7f377b5cac9b674fc5027b5c44c /tools/objtool/orc_gen.c | |
parent | a3608f5954d07a40fb93764dc6d06195fa52eb14 (diff) | |
download | linux-e7c0219b328c96746767f21b9532eed6a48f61c5.tar.gz linux-e7c0219b328c96746767f21b9532eed6a48f61c5.tar.bz2 linux-e7c0219b328c96746767f21b9532eed6a48f61c5.zip |
objtool: Fix !CFI insn_state propagation
Objtool keeps per instruction CFI state in struct insn_state and will
save/restore this where required. However, insn_state has grown some
!CFI state, and this must not be saved/restored (that would
loose/destroy state).
Fix this by moving the CFI specific parts of insn_state into struct
cfi_state.
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/20200416115119.045821071@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/orc_gen.c')
-rw-r--r-- | tools/objtool/orc_gen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c index 4c0dabd28000..2cf640fca01d 100644 --- a/tools/objtool/orc_gen.c +++ b/tools/objtool/orc_gen.c @@ -16,10 +16,10 @@ int create_orc(struct objtool_file *file) for_each_insn(file, insn) { struct orc_entry *orc = &insn->orc; - struct cfi_reg *cfa = &insn->state.cfa; - struct cfi_reg *bp = &insn->state.regs[CFI_BP]; + struct cfi_reg *cfa = &insn->cfi.cfa; + struct cfi_reg *bp = &insn->cfi.regs[CFI_BP]; - orc->end = insn->state.end; + orc->end = insn->cfi.end; if (cfa->base == CFI_UNDEFINED) { orc->sp_reg = ORC_REG_UNDEFINED; @@ -75,7 +75,7 @@ int create_orc(struct objtool_file *file) orc->sp_offset = cfa->offset; orc->bp_offset = bp->offset; - orc->type = insn->state.type; + orc->type = insn->cfi.type; } return 0; |