lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 31 Jan 2022 18:36:42 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>, netdev@...r.kernel.org,
        bpf@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v7 00/10] fprobe: Introduce fprobe function entry/exit
 probe

Hi Jiri,

On Mon, 31 Jan 2022 14:00:24 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> Hi,
> 
> Here is the 7th version of fprobe. This version fixes unregister_fprobe()
> ensures that exit_handler is not called after returning from the
> unregister_fprobe(), and fixes some comments and documents.
> 
> The previous version is here[1];
> 
> [1] https://lore.kernel.org/all/164338031590.2429999.6203979005944292576.stgit@devnote2/T/#u
> 
> This series introduces the fprobe, the function entry/exit probe
> with multiple probe point support. This also introduces the rethook
> for hooking function return as same as the kretprobe does. This
> abstraction will help us to generalize the fgraph tracer,
> because we can just switch to it from the rethook in fprobe,
> depending on the kernel configuration.
> 
> The patch [1/10] is from Jiri's series[2].
> 
> [2] https://lore.kernel.org/all/20220104080943.113249-1-jolsa@kernel.org/T/#u
> 
> And the patch [9/10] adds the FPROBE_FL_KPROBE_SHARED flag for the case
> if user wants to share the same code (or share a same resource) on the
> fprobe and the kprobes.

If you want to work on this series, I pushed my working branch on here;

https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/ kprobes/fprobe

Thank you,

> 
> Thank you,
> 
> ---
> 
> Jiri Olsa (1):
>       ftrace: Add ftrace_set_filter_ips function
> 
> Masami Hiramatsu (9):
>       fprobe: Add ftrace based probe APIs
>       rethook: Add a generic return hook
>       rethook: x86: Add rethook x86 implementation
>       ARM: rethook: Add rethook arm implementation
>       arm64: rethook: Add arm64 rethook implementation
>       fprobe: Add exit_handler support
>       fprobe: Add sample program for fprobe
>       fprobe: Introduce FPROBE_FL_KPROBE_SHARED flag for fprobe
>       docs: fprobe: Add fprobe description to ftrace-use.rst
> 
> 
>  Documentation/trace/fprobe.rst                |  171 +++++++++++++
>  Documentation/trace/index.rst                 |    1 
>  arch/arm/Kconfig                              |    1 
>  arch/arm/include/asm/stacktrace.h             |    4 
>  arch/arm/kernel/stacktrace.c                  |    6 
>  arch/arm/probes/Makefile                      |    1 
>  arch/arm/probes/rethook.c                     |   71 +++++
>  arch/arm64/Kconfig                            |    1 
>  arch/arm64/include/asm/stacktrace.h           |    2 
>  arch/arm64/kernel/probes/Makefile             |    1 
>  arch/arm64/kernel/probes/rethook.c            |   25 ++
>  arch/arm64/kernel/probes/rethook_trampoline.S |   87 ++++++
>  arch/arm64/kernel/stacktrace.c                |    7 -
>  arch/x86/Kconfig                              |    1 
>  arch/x86/include/asm/unwind.h                 |    8 +
>  arch/x86/kernel/Makefile                      |    1 
>  arch/x86/kernel/kprobes/common.h              |    1 
>  arch/x86/kernel/rethook.c                     |  115 ++++++++
>  include/linux/fprobe.h                        |   97 +++++++
>  include/linux/ftrace.h                        |    3 
>  include/linux/kprobes.h                       |    3 
>  include/linux/rethook.h                       |  100 +++++++
>  include/linux/sched.h                         |    3 
>  kernel/exit.c                                 |    2 
>  kernel/fork.c                                 |    3 
>  kernel/trace/Kconfig                          |   26 ++
>  kernel/trace/Makefile                         |    2 
>  kernel/trace/fprobe.c                         |  341 +++++++++++++++++++++++++
>  kernel/trace/ftrace.c                         |   58 ++++
>  kernel/trace/rethook.c                        |  313 +++++++++++++++++++++++
>  samples/Kconfig                               |    7 +
>  samples/Makefile                              |    1 
>  samples/fprobe/Makefile                       |    3 
>  samples/fprobe/fprobe_example.c               |  120 +++++++++
>  34 files changed, 1572 insertions(+), 14 deletions(-)
>  create mode 100644 Documentation/trace/fprobe.rst
>  create mode 100644 arch/arm/probes/rethook.c
>  create mode 100644 arch/arm64/kernel/probes/rethook.c
>  create mode 100644 arch/arm64/kernel/probes/rethook_trampoline.S
>  create mode 100644 arch/x86/kernel/rethook.c
>  create mode 100644 include/linux/fprobe.h
>  create mode 100644 include/linux/rethook.h
>  create mode 100644 kernel/trace/fprobe.c
>  create mode 100644 kernel/trace/rethook.c
>  create mode 100644 samples/fprobe/Makefile
>  create mode 100644 samples/fprobe/fprobe_example.c
> 
> --
> Masami Hiramatsu (Linaro) <mhiramat@...nel.org>


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ