Commit 1032f326 authored by Adrian Hunter's avatar Adrian Hunter Committed by Borislav Petkov

perf/tests: Add CET instructions to the new instructions test

Add to the "x86 instruction decoder - new instructions" test the following
instructions:

  incsspd
  incsspq
  rdsspd
  rdsspq
  saveprevssp
  rstorssp
  wrssd
  wrssq
  wrussd
  wrussq
  setssbsy
  clrssbsy
  endbr32
  endbr64

And the notrack prefix for indirect calls and jumps.

For information about the instructions, refer Intel Control-flow
Enforcement Technology Specification May 2019 (334525-003).
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarYu-cheng Yu <yu-cheng.yu@intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Link: https://lkml.kernel.org/r/20200204171425.28073-3-yu-cheng.yu@intel.com
parent 5790921b
......@@ -2085,6 +2085,118 @@
"67 f3 0f 38 f8 1c \tenqcmds (%si),%bx",},
{{0x67, 0xf3, 0x0f, 0x38, 0xf8, 0x8c, 0x34, 0x12, }, 8, 0, "", "",
"67 f3 0f 38 f8 8c 34 12 \tenqcmds 0x1234(%si),%cx",},
{{0xf3, 0x0f, 0xae, 0xe8, }, 4, 0, "", "",
"f3 0f ae e8 \tincsspd %eax",},
{{0x0f, 0xae, 0x28, }, 3, 0, "", "",
"0f ae 28 \txrstor (%eax)",},
{{0x0f, 0xae, 0x2d, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "", "",
"0f ae 2d 78 56 34 12 \txrstor 0x12345678",},
{{0x0f, 0xae, 0xac, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "", "",
"0f ae ac c8 78 56 34 12 \txrstor 0x12345678(%eax,%ecx,8)",},
{{0x0f, 0xae, 0xe8, }, 3, 0, "", "",
"0f ae e8 \tlfence ",},
{{0xf3, 0x0f, 0x1e, 0xc8, }, 4, 0, "", "",
"f3 0f 1e c8 \trdsspd %eax",},
{{0xf3, 0x0f, 0x01, 0xea, }, 4, 0, "", "",
"f3 0f 01 ea \tsaveprevssp ",},
{{0xf3, 0x0f, 0x01, 0x28, }, 4, 0, "", "",
"f3 0f 01 28 \trstorssp (%eax)",},
{{0xf3, 0x0f, 0x01, 0x2d, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "", "",
"f3 0f 01 2d 78 56 34 12 \trstorssp 0x12345678",},
{{0xf3, 0x0f, 0x01, 0xac, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "", "",
"f3 0f 01 ac c8 78 56 34 12 \trstorssp 0x12345678(%eax,%ecx,8)",},
{{0x0f, 0x38, 0xf6, 0x08, }, 4, 0, "", "",
"0f 38 f6 08 \twrssd %ecx,(%eax)",},
{{0x0f, 0x38, 0xf6, 0x15, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "", "",
"0f 38 f6 15 78 56 34 12 \twrssd %edx,0x12345678",},
{{0x0f, 0x38, 0xf6, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "", "",
"0f 38 f6 94 c8 78 56 34 12 \twrssd %edx,0x12345678(%eax,%ecx,8)",},
{{0x66, 0x0f, 0x38, 0xf5, 0x08, }, 5, 0, "", "",
"66 0f 38 f5 08 \twrussd %ecx,(%eax)",},
{{0x66, 0x0f, 0x38, 0xf5, 0x15, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "", "",
"66 0f 38 f5 15 78 56 34 12 \twrussd %edx,0x12345678",},
{{0x66, 0x0f, 0x38, 0xf5, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 10, 0, "", "",
"66 0f 38 f5 94 c8 78 56 34 12 \twrussd %edx,0x12345678(%eax,%ecx,8)",},
{{0xf3, 0x0f, 0x01, 0xe8, }, 4, 0, "", "",
"f3 0f 01 e8 \tsetssbsy ",},
{{0x0f, 0x01, 0xee, }, 3, 0, "", "",
"0f 01 ee \trdpkru ",},
{{0x0f, 0x01, 0xef, }, 3, 0, "", "",
"0f 01 ef \twrpkru ",},
{{0xf3, 0x0f, 0xae, 0x30, }, 4, 0, "", "",
"f3 0f ae 30 \tclrssbsy (%eax)",},
{{0xf3, 0x0f, 0xae, 0x35, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "", "",
"f3 0f ae 35 78 56 34 12 \tclrssbsy 0x12345678",},
{{0xf3, 0x0f, 0xae, 0xb4, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "", "",
"f3 0f ae b4 c8 78 56 34 12 \tclrssbsy 0x12345678(%eax,%ecx,8)",},
{{0xf3, 0x0f, 0x1e, 0xfb, }, 4, 0, "", "",
"f3 0f 1e fb \tendbr32 ",},
{{0xf3, 0x0f, 0x1e, 0xfa, }, 4, 0, "", "",
"f3 0f 1e fa \tendbr64 ",},
{{0xff, 0xd0, }, 2, 0, "call", "indirect",
"ff d0 \tcall *%eax",},
{{0xff, 0x10, }, 2, 0, "call", "indirect",
"ff 10 \tcall *(%eax)",},
{{0xff, 0x15, 0x78, 0x56, 0x34, 0x12, }, 6, 0, "call", "indirect",
"ff 15 78 56 34 12 \tcall *0x12345678",},
{{0xff, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "call", "indirect",
"ff 94 c8 78 56 34 12 \tcall *0x12345678(%eax,%ecx,8)",},
{{0xf2, 0xff, 0xd0, }, 3, 0, "call", "indirect",
"f2 ff d0 \tbnd call *%eax",},
{{0xf2, 0xff, 0x10, }, 3, 0, "call", "indirect",
"f2 ff 10 \tbnd call *(%eax)",},
{{0xf2, 0xff, 0x15, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "call", "indirect",
"f2 ff 15 78 56 34 12 \tbnd call *0x12345678",},
{{0xf2, 0xff, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "call", "indirect",
"f2 ff 94 c8 78 56 34 12 \tbnd call *0x12345678(%eax,%ecx,8)",},
{{0x3e, 0xff, 0xd0, }, 3, 0, "call", "indirect",
"3e ff d0 \tnotrack call *%eax",},
{{0x3e, 0xff, 0x10, }, 3, 0, "call", "indirect",
"3e ff 10 \tnotrack call *(%eax)",},
{{0x3e, 0xff, 0x15, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "call", "indirect",
"3e ff 15 78 56 34 12 \tnotrack call *0x12345678",},
{{0x3e, 0xff, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "call", "indirect",
"3e ff 94 c8 78 56 34 12 \tnotrack call *0x12345678(%eax,%ecx,8)",},
{{0x3e, 0xf2, 0xff, 0xd0, }, 4, 0, "call", "indirect",
"3e f2 ff d0 \tnotrack bnd call *%eax",},
{{0x3e, 0xf2, 0xff, 0x10, }, 4, 0, "call", "indirect",
"3e f2 ff 10 \tnotrack bnd call *(%eax)",},
{{0x3e, 0xf2, 0xff, 0x15, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "call", "indirect",
"3e f2 ff 15 78 56 34 12 \tnotrack bnd call *0x12345678",},
{{0x3e, 0xf2, 0xff, 0x94, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "call", "indirect",
"3e f2 ff 94 c8 78 56 34 12 \tnotrack bnd call *0x12345678(%eax,%ecx,8)",},
{{0xff, 0xe0, }, 2, 0, "jmp", "indirect",
"ff e0 \tjmp *%eax",},
{{0xff, 0x20, }, 2, 0, "jmp", "indirect",
"ff 20 \tjmp *(%eax)",},
{{0xff, 0x25, 0x78, 0x56, 0x34, 0x12, }, 6, 0, "jmp", "indirect",
"ff 25 78 56 34 12 \tjmp *0x12345678",},
{{0xff, 0xa4, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "jmp", "indirect",
"ff a4 c8 78 56 34 12 \tjmp *0x12345678(%eax,%ecx,8)",},
{{0xf2, 0xff, 0xe0, }, 3, 0, "jmp", "indirect",
"f2 ff e0 \tbnd jmp *%eax",},
{{0xf2, 0xff, 0x20, }, 3, 0, "jmp", "indirect",
"f2 ff 20 \tbnd jmp *(%eax)",},
{{0xf2, 0xff, 0x25, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "jmp", "indirect",
"f2 ff 25 78 56 34 12 \tbnd jmp *0x12345678",},
{{0xf2, 0xff, 0xa4, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "jmp", "indirect",
"f2 ff a4 c8 78 56 34 12 \tbnd jmp *0x12345678(%eax,%ecx,8)",},
{{0x3e, 0xff, 0xe0, }, 3, 0, "jmp", "indirect",
"3e ff e0 \tnotrack jmp *%eax",},
{{0x3e, 0xff, 0x20, }, 3, 0, "jmp", "indirect",
"3e ff 20 \tnotrack jmp *(%eax)",},
{{0x3e, 0xff, 0x25, 0x78, 0x56, 0x34, 0x12, }, 7, 0, "jmp", "indirect",
"3e ff 25 78 56 34 12 \tnotrack jmp *0x12345678",},
{{0x3e, 0xff, 0xa4, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "jmp", "indirect",
"3e ff a4 c8 78 56 34 12 \tnotrack jmp *0x12345678(%eax,%ecx,8)",},
{{0x3e, 0xf2, 0xff, 0xe0, }, 4, 0, "jmp", "indirect",
"3e f2 ff e0 \tnotrack bnd jmp *%eax",},
{{0x3e, 0xf2, 0xff, 0x20, }, 4, 0, "jmp", "indirect",
"3e f2 ff 20 \tnotrack bnd jmp *(%eax)",},
{{0x3e, 0xf2, 0xff, 0x25, 0x78, 0x56, 0x34, 0x12, }, 8, 0, "jmp", "indirect",
"3e f2 ff 25 78 56 34 12 \tnotrack bnd jmp *0x12345678",},
{{0x3e, 0xf2, 0xff, 0xa4, 0xc8, 0x78, 0x56, 0x34, 0x12, }, 9, 0, "jmp", "indirect",
"3e f2 ff a4 c8 78 56 34 12 \tnotrack bnd jmp *0x12345678(%eax,%ecx,8)",},
{{0x0f, 0x01, 0xcf, }, 3, 0, "", "",
"0f 01 cf \tencls ",},
{{0x0f, 0x01, 0xd7, }, 3, 0, "", "",
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment