mbox series

[0/4] arm64: KPROBES_ON_FTRACE

Message ID 20190819192422.5ed79702@xhacker.debian (mailing list archive)
Headers show
Series arm64: KPROBES_ON_FTRACE | expand

Message

Jisheng Zhang Aug. 19, 2019, 11:35 a.m. UTC
Implement KPROBES_ON_FTRACE for arm64.

Applied after FTRACE_WITH_REGS:
http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674404.html

Jisheng Zhang (4):
  kprobes: adjust kprobe addr for KPROBES_ON_FTRACE
  kprobes/x86: use instruction_pointer and instruction_pointer_set
  kprobes: move kprobe_ftrace_handler() from x86 and make it weak
  arm64: implement KPROBES_ON_FTRACE

 arch/arm64/Kconfig                |  1 +
 arch/arm64/kernel/probes/Makefile |  1 +
 arch/arm64/kernel/probes/ftrace.c | 16 +++++++++++
 arch/x86/kernel/kprobes/ftrace.c  | 43 ----------------------------
 kernel/kprobes.c                  | 47 +++++++++++++++++++++++++++++++
 5 files changed, 65 insertions(+), 43 deletions(-)
 create mode 100644 arch/arm64/kernel/probes/ftrace.c

Comments

Mark Rutland Aug. 19, 2019, 12:53 p.m. UTC | #1
Hi,

On Mon, Aug 19, 2019 at 11:35:27AM +0000, Jisheng Zhang wrote:
> Implement KPROBES_ON_FTRACE for arm64.

It would be very helpful if the cover letter could explain what
KPROBES_ON_FTRACE is, and why it is wanted.

It's not clear to me whether this is enabling new functionality for
kprobes via ftrace, or whether this is an optimization for kprobes using
ftrace under the hood.

Thanks,
Mark.

> 
> Applied after FTRACE_WITH_REGS:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674404.html
> 
> Jisheng Zhang (4):
>   kprobes: adjust kprobe addr for KPROBES_ON_FTRACE
>   kprobes/x86: use instruction_pointer and instruction_pointer_set
>   kprobes: move kprobe_ftrace_handler() from x86 and make it weak
>   arm64: implement KPROBES_ON_FTRACE
> 
>  arch/arm64/Kconfig                |  1 +
>  arch/arm64/kernel/probes/Makefile |  1 +
>  arch/arm64/kernel/probes/ftrace.c | 16 +++++++++++
>  arch/x86/kernel/kprobes/ftrace.c  | 43 ----------------------------
>  kernel/kprobes.c                  | 47 +++++++++++++++++++++++++++++++
>  5 files changed, 65 insertions(+), 43 deletions(-)
>  create mode 100644 arch/arm64/kernel/probes/ftrace.c
> 
> -- 
> 2.23.0.rc1
>
Masami Hiramatsu (Google) Aug. 19, 2019, 1:10 p.m. UTC | #2
Hi Jisheng,

On Mon, 19 Aug 2019 11:35:27 +0000
Jisheng Zhang <Jisheng.Zhang@synaptics.com> wrote:

> Implement KPROBES_ON_FTRACE for arm64.
> 
> Applied after FTRACE_WITH_REGS:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2019-August/674404.html

Looks interesting! thanks for working on it.
I'll check it.

Thanks,

> 
> Jisheng Zhang (4):
>   kprobes: adjust kprobe addr for KPROBES_ON_FTRACE
>   kprobes/x86: use instruction_pointer and instruction_pointer_set
>   kprobes: move kprobe_ftrace_handler() from x86 and make it weak
>   arm64: implement KPROBES_ON_FTRACE
> 
>  arch/arm64/Kconfig                |  1 +
>  arch/arm64/kernel/probes/Makefile |  1 +
>  arch/arm64/kernel/probes/ftrace.c | 16 +++++++++++
>  arch/x86/kernel/kprobes/ftrace.c  | 43 ----------------------------
>  kernel/kprobes.c                  | 47 +++++++++++++++++++++++++++++++
>  5 files changed, 65 insertions(+), 43 deletions(-)
>  create mode 100644 arch/arm64/kernel/probes/ftrace.c
> 
> -- 
> 2.23.0.rc1
>