Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580373

[PATCH v2 0/2] powerpc: Emulation support for load/store instructions on LE

From Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v2 0/2] powerpc: Emulation support for load/store instructions on LE
Date 2017-02-14 09:10 +0100
Message-ID <taGls-7GR-29@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


emulate_step is the basic infrastructure which is used by number of other
kernel infrastructures like kprobe, hw-breakpoint(data breakpoint) etc.
In case of kprobe, enabling emulation of load/store instructions will
speedup the execution of probed instruction. In case of kernel-space
breakpoint, causative instruction is first get emulated before executing
user registered handler. If emulation fails, hw-breakpoint is disabled
with error. As emulate_step does not support load/store instructions on
LE, kernel-space hw-breakpoint infrastructure is broken on LE.

emulate_step() uses a number of underlying kernel functions that were
initially not enabled for LE. This has been rectified since. So, fix
emulate_step() for LE for the corresponding instructions.

Also add selftest which will run at boot if CONFIG_KPROBES_SANITY_TEST
and CONFIG_PPC64 is set.

Changes in v2:
  - Folded 2nd and 3rd patch of v1 into one patch, as suggested by Naveen

v1 link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg110671.html

Ravi Bangoria (2):
  powerpc: Emulation support for load/store instructions on LE
  powerpc: emulate_step tests for load/store instructions

 arch/powerpc/include/asm/ppc-opcode.h |   7 +
 arch/powerpc/include/asm/sstep.h      |   8 +
 arch/powerpc/kernel/kprobes.c         |   2 +
 arch/powerpc/lib/Makefile             |   4 +
 arch/powerpc/lib/sstep.c              |  20 --
 arch/powerpc/lib/test_emulate_step.c  | 439 ++++++++++++++++++++++++++++++++++
 6 files changed, 460 insertions(+), 20 deletions(-)
 create mode 100644 arch/powerpc/lib/test_emulate_step.c

-- 
1.8.3.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 09:10 +0100
  [PATCH v2 2/2] powerpc: emulate_step tests for load/store instructions Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 09:10 +0100
  [PATCH v2 1/2] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 09:10 +0100
    Re: [PATCH v2 1/2] powerpc: Emulation support for load/store  instructions on LE "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-02-14 10:00 +0100
      Re: [PATCH v2 1/2] powerpc: Emulation support for load/store  instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 10:20 +0100

csiph-web