Skip to content

x86: Prohibit kprobes on XEN_EMULATE_PREFIX

Masami Hiramatsu lkml xen-devel 1 version In review

Get series with b4
b4 am 156759754770.24473.11832897710080799131.stgit@devnote2

Versions newest first

  1. v1 Latest2 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86: xen: insn: Decode XEN_EMULATE_PREFIX correctlyarch/x86/include/asm/insn.h arch/x86/include/asm/xen/interface.h arch/x86/include/asm/xen/prefix.h +5 more+117 -30 replies
2/2x86: kprobes: Prohibit probing on instruction which has Xen prefixarch/x86/kernel/kprobes/core.c+4 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter Zijlstra (Intel)
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX

Hi,

These patches allow x86 instruction decoder to decode xen-cpuid which has XEN_EMULATE_PREFIX, and prohibit kprobes to probe on it.

Josh reported that the objtool can not decode such special prefixed instructions, and I found that we also have to prohibit kprobes to probe on such instruction.

This series can be applied on -tip master branch which has merged Josh's objtool/perf sharing common x86 insn decoder series.

Thank you,

---

Masami Hiramatsu (2):
x86: xen: insn: Decode XEN_EMULATE_PREFIX correctly
x86: kprobes: Prohibit probing on instruction which has Xen prefix

 arch/x86/include/asm/insn.h             |    2 +
 arch/x86/include/asm/xen/interface.h    |    7 ++++-
 arch/x86/include/asm/xen/prefix.h       |   10 +++++++
 arch/x86/kernel/kprobes/core.c          |    4 +++
 arch/x86/lib/insn.c                     |   43 +++++++++++++++++++++++++++++++
 tools/arch/x86/include/asm/insn.h       |    2 +
 tools/arch/x86/include/asm/xen/prefix.h |   10 +++++++
 tools/arch/x86/lib/insn.c               |   43 +++++++++++++++++++++++++++++++
 tools/objtool/sync-check.sh             |    3 +-
 9 files changed, 121 insertions(+), 3 deletions(-)
 create mode 100644 arch/x86/include/asm/xen/prefix.h
 create mode 100644 tools/arch/x86/include/asm/xen/prefix.h

--
Masami Hiramatsu (Linaro) <[email protected]>