[F][PATCH 0/2] Enable proper kprobes on ftrace support (LP: 1865858)

frank.heimes at canonical.com frank.heimes at canonical.com
Tue Mar 3 16:37:11 UTC 2020


Buglink: https://bugs.launchpad.net/bugs/1865858

The s390x architecture already provides kprobes on ftrace support by allowing to set a kprobe on the first instruction,
even if it is the ftrace nop or ftrace mcount instruction block.
However, this still means that an illegal instruction is placed to the first instruction,
which causes an exception and subsequent single stepping of the replaced instruction.
With proper kprobes on ftrace support there won't be an exception nor any single stepping,
which means that kprobes placed at the first instruction will be much faster than now.
As a side effect by implementing this both the ftrace as well as the kprobes code will get a bit simpler.

Sven Schnelle (1):
  From: Sven Schnelle <svens at linux.ibm.com>

Vasily Gorbik (1):
  From: Vasily Gorbik <gor at linux.ibm.com>

 .../debug/kprobes-on-ftrace/arch-support.txt  |  2 +-
 arch/s390/Kconfig                             |  1 +
 arch/s390/include/asm/kprobes.h               |  1 -
 arch/s390/kernel/ftrace.c                     | 80 +++++++++++--------
 arch/s390/kernel/kprobes.c                    | 61 ++------------
 arch/s390/kernel/mcount.S                     |  7 ++
 6 files changed, 60 insertions(+), 92 deletions(-)

-- 
2.25.0




More information about the kernel-team mailing list