aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-13 16:35:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-13 16:35:26 -0400
commitf24d6f2654d39355cdf8285e21409ed8d56d4284 (patch)
treee6d2c683e61f30147bf73eba8d9fbf2c05865f03 /tools
parentb9b8e5b76386da8d0795fa143bb012f1bf993733 (diff)
parent6709812f094d96543b443645c68daaa32d3d3e77 (diff)
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 asm updates from Thomas Gleixner: "The lowlevel and ASM code updates for x86: - Make stack trace unwinding more reliable - ASM instruction updates for better code generation - Various cleanups" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/64: Add two more instruction suffixes x86/asm/64: Use 32-bit XOR to zero registers x86/build/vdso: Simplify 'cmd_vdso2c' x86/build/vdso: Remove unused vdso-syms.lds x86/stacktrace: Enable HAVE_RELIABLE_STACKTRACE for the ORC unwinder x86/unwind/orc: Detect the end of the stack x86/stacktrace: Do not fail for ORC with regs on stack x86/stacktrace: Clarify the reliable success paths x86/stacktrace: Remove STACKTRACE_DUMP_ONCE x86/stacktrace: Do not unwind after user regs x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg8b_double() to micro-optimize code generation
Diffstat (limited to 'tools')
-rw-r--r--tools/objtool/arch/x86/include/asm/orc_types.h2
-rw-r--r--tools/objtool/check.c1
-rw-r--r--tools/objtool/check.h2
-rw-r--r--tools/objtool/orc_dump.c3
-rw-r--r--tools/objtool/orc_gen.c2
5 files changed, 8 insertions, 2 deletions
diff --git a/tools/objtool/arch/x86/include/asm/orc_types.h b/tools/objtool/arch/x86/include/asm/orc_types.h
index 9c9dc579bd7d..46f516dd80ce 100644
--- a/tools/objtool/arch/x86/include/asm/orc_types.h
+++ b/tools/objtool/arch/x86/include/asm/orc_types.h
@@ -88,6 +88,7 @@ struct orc_entry {
88 unsigned sp_reg:4; 88 unsigned sp_reg:4;
89 unsigned bp_reg:4; 89 unsigned bp_reg:4;
90 unsigned type:2; 90 unsigned type:2;
91 unsigned end:1;
91} __packed; 92} __packed;
92 93
93/* 94/*
@@ -101,6 +102,7 @@ struct unwind_hint {
101 s16 sp_offset; 102 s16 sp_offset;
102 u8 sp_reg; 103 u8 sp_reg;
103 u8 type; 104 u8 type;
105 u8 end;
104}; 106};
105#endif /* __ASSEMBLY__ */ 107#endif /* __ASSEMBLY__ */
106 108
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f4a25bd1871f..2928939b98ec 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1157,6 +1157,7 @@ static int read_unwind_hints(struct objtool_file *file)
1157 1157
1158 cfa->offset = hint->sp_offset; 1158 cfa->offset = hint->sp_offset;
1159 insn->state.type = hint->type; 1159 insn->state.type = hint->type;
1160 insn->state.end = hint->end;
1160 } 1161 }
1161 1162
1162 return 0; 1163 return 0;
diff --git a/tools/objtool/check.h b/tools/objtool/check.h
index c6b68fcb926f..95700a2bcb7c 100644
--- a/tools/objtool/check.h
+++ b/tools/objtool/check.h
@@ -31,7 +31,7 @@ struct insn_state {
31 int stack_size; 31 int stack_size;
32 unsigned char type; 32 unsigned char type;
33 bool bp_scratch; 33 bool bp_scratch;
34 bool drap; 34 bool drap, end;
35 int drap_reg, drap_offset; 35 int drap_reg, drap_offset;
36 struct cfi_reg vals[CFI_NUM_REGS]; 36 struct cfi_reg vals[CFI_NUM_REGS];
37}; 37};
diff --git a/tools/objtool/orc_dump.c b/tools/objtool/orc_dump.c
index c3343820916a..faa444270ee3 100644
--- a/tools/objtool/orc_dump.c
+++ b/tools/objtool/orc_dump.c
@@ -203,7 +203,8 @@ int orc_dump(const char *_objname)
203 203
204 print_reg(orc[i].bp_reg, orc[i].bp_offset); 204 print_reg(orc[i].bp_reg, orc[i].bp_offset);
205 205
206 printf(" type:%s\n", orc_type_name(orc[i].type)); 206 printf(" type:%s end:%d\n",
207 orc_type_name(orc[i].type), orc[i].end);
207 } 208 }
208 209
209 elf_end(elf); 210 elf_end(elf);
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index 18384d9be4e1..3f98dcfbc177 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -31,6 +31,8 @@ int create_orc(struct objtool_file *file)
31 struct cfi_reg *cfa = &insn->state.cfa; 31 struct cfi_reg *cfa = &insn->state.cfa;
32 struct cfi_reg *bp = &insn->state.regs[CFI_BP]; 32 struct cfi_reg *bp = &insn->state.regs[CFI_BP];
33 33
34 orc->end = insn->state.end;
35
34 if (cfa->base == CFI_UNDEFINED) { 36 if (cfa->base == CFI_UNDEFINED) {
35 orc->sp_reg = ORC_REG_UNDEFINED; 37 orc->sp_reg = ORC_REG_UNDEFINED;
36 continue; 38 continue;