summaryrefslogtreecommitdiff
path: root/tools/objtool/arch/x86
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-01-13 10:20:59 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-01-13 10:20:59 -0300
commit1aa77e716c6f2332f2d4664f747ff4eba731825b (patch)
treebffb043cec73da6c79d4ec652e531f86344b160b /tools/objtool/arch/x86
parentc0dd94558d0e473aa92254e1c48a47900c911e69 (diff)
parent455e73a07f6e288b0061dfcf4fcf54fa9fe06458 (diff)
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes and get in line with other trees, powerpc kernel mostly this time, but BPF as well. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/objtool/arch/x86')
-rw-r--r--tools/objtool/arch/x86/decode.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index 4d6d7fc13255..c10ef78df050 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -531,6 +531,11 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
}
break;
+ case 0xcc:
+ /* int3 */
+ *type = INSN_TRAP;
+ break;
+
case 0xe3:
/* jecxz/jrcxz */
*type = INSN_JUMP_CONDITIONAL;
@@ -697,10 +702,10 @@ const char *arch_ret_insn(int len)
{
static const char ret[5][5] = {
{ BYTE_RET },
- { BYTE_RET, BYTES_NOP1 },
- { BYTE_RET, BYTES_NOP2 },
- { BYTE_RET, BYTES_NOP3 },
- { BYTE_RET, BYTES_NOP4 },
+ { BYTE_RET, 0xcc },
+ { BYTE_RET, 0xcc, BYTES_NOP1 },
+ { BYTE_RET, 0xcc, BYTES_NOP2 },
+ { BYTE_RET, 0xcc, BYTES_NOP3 },
};
if (len < 1 || len > 5) {