aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.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/check.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/check.h')
-rw-r--r--tools/objtool/check.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/objtool/check.h b/tools/objtool/check.h
index 7c30760bee74..99413d4ca4b1 100644
--- a/tools/objtool/check.h
+++ b/tools/objtool/check.h
@@ -14,15 +14,10 @@
#include <linux/hashtable.h>
struct insn_state {
- struct cfi_reg cfa;
- struct cfi_reg regs[CFI_NUM_REGS];
- int stack_size;
- unsigned char type;
- bool bp_scratch;
- bool drap, end, uaccess, df;
+ struct cfi_state cfi;
unsigned int uaccess_stack;
- int drap_reg, drap_offset;
- struct cfi_reg vals[CFI_NUM_REGS];
+ bool uaccess;
+ bool df;
};
struct instruction {
@@ -45,7 +40,7 @@ struct instruction {
struct list_head alts;
struct symbol *func;
struct list_head stack_ops;
- struct insn_state state;
+ struct cfi_state cfi;
struct orc_entry orc;
};