aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/cfi.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-03-25 14:04:45 +0100
committerIngo Molnar <mingo@kernel.org>2020-04-22 10:53:50 +0200
commite7c0219b328c96746767f21b9532eed6a48f61c5 (patch)
tree1947692e76fbe7f377b5cac9b674fc5027b5c44c /tools/objtool/cfi.h
parentobjtool: Rename struct cfi_state (diff)
downloadlinux-dev-e7c0219b328c96746767f21b9532eed6a48f61c5.tar.xz
linux-dev-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/cfi.h')
-rw-r--r--tools/objtool/cfi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/objtool/cfi.h b/tools/objtool/cfi.h
index 6faf97666d6b..c7c59c6a44ee 100644
--- a/tools/objtool/cfi.h
+++ b/tools/objtool/cfi.h
@@ -19,8 +19,20 @@ struct cfi_reg {
};
struct cfi_init_state {
+ struct cfi_reg regs[CFI_NUM_REGS];
struct cfi_reg cfa;
+};
+
+struct cfi_state {
struct cfi_reg regs[CFI_NUM_REGS];
+ struct cfi_reg vals[CFI_NUM_REGS];
+ struct cfi_reg cfa;
+ int stack_size;
+ int drap_reg, drap_offset;
+ unsigned char type;
+ bool bp_scratch;
+ bool drap;
+ bool end;
};
#endif /* _OBJTOOL_CFI_H */