Skip to content

Commit e7c0219

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
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) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Reviewed-by: Alexandre Chartre <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent a3608f5 commit e7c0219

File tree

4 files changed

+157
-140
lines changed

4 files changed

+157
-140
lines changed

tools/objtool/cfi.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,20 @@ struct cfi_reg {
1919
};
2020

2121
struct cfi_init_state {
22+
struct cfi_reg regs[CFI_NUM_REGS];
2223
struct cfi_reg cfa;
24+
};
25+
26+
struct cfi_state {
2327
struct cfi_reg regs[CFI_NUM_REGS];
28+
struct cfi_reg vals[CFI_NUM_REGS];
29+
struct cfi_reg cfa;
30+
int stack_size;
31+
int drap_reg, drap_offset;
32+
unsigned char type;
33+
bool bp_scratch;
34+
bool drap;
35+
bool end;
2436
};
2537

2638
#endif /* _OBJTOOL_CFI_H */

0 commit comments

Comments
 (0)