linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE
@ 2016-11-02  8:53 Ravi Bangoria
  2016-11-02  8:53 ` [PATCH 1/3] " Ravi Bangoria
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Ravi Bangoria @ 2016-11-02  8:53 UTC (permalink / raw)
  To: linuxppc-dev, linux-kernel, mpe
  Cc: benh, paulus, lsorense, oohall, naveen.n.rao, ast, chris,
	aneesh.kumar, bsingharora, anton, paul.gortmaker, bauerman, viro,
	christophe.leroy, duwe, oss, Ravi Bangoria

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 w.r.t. RFC:
  - Enable emulation support for all types of (Normal, Floating Point,
    Vector and Vector Scalar) load/store instructions.
  - Introduce selftest to test emulate_step for load/store instructions.

Ravi Bangoria (3):
  powerpc: Emulation support for load/store instructions on LE
  powerpc: Add encoding for couple of load/store instructions
  powerpc: emulate_step test 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-11-06 18:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-02  8:53 [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria
2016-11-02  8:53 ` [PATCH 1/3] " Ravi Bangoria
2016-11-02 21:04   ` Anton Blanchard
2016-11-03  5:41     ` Ravi Bangoria
2016-11-03  9:48       ` Michael Ellerman
2016-11-03 10:27         ` Ravi Bangoria
2016-11-04  2:07           ` Andrew Donnellan
2016-11-04  5:31             ` Ravi Bangoria
2016-11-05 19:31               ` Anton Blanchard
2016-11-06 18:59                 ` Ravi Bangoria
2016-11-02  8:53 ` [PATCH 2/3] powerpc: Add encoding for couple of load/store instructions Ravi Bangoria
2016-11-02  8:53 ` [PATCH 3/3] powerpc: emulate_step test for " Ravi Bangoria
2016-11-02 10:30   ` Naveen N. Rao
2016-11-03  7:03 ` [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE Naveen N. Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).