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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 7 Jul 2021 14:00:38 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...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>,
        Alan Maguire <alan.maguire@...cle.com>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCHv2 bpf-next 0/7] bpf, x86: Add bpf_get_func_ip helper

On Wed, Jul 7, 2021 at 1:42 PM Jiri Olsa <jolsa@...hat.com> wrote:
>
> ugh forgot to cc Masami.. sorry, I can resend if needed

Can you please also add v2, v3, etc tags to *each patch*, not just
cover letter? It makes tracking different versions much easier.
Thanks!

>
> jirka
>
> On Wed, Jul 07, 2021 at 09:46:12PM +0200, Jiri Olsa wrote:
> > hi,
> > adding bpf_get_func_ip helper that returns IP address of the
> > caller function for trampoline and krobe programs.
> >
> > There're 2 specific implementation of the bpf_get_func_ip
> > helper, one for trampoline progs and one for kprobe/kretprobe
> > progs.
> >
> > The trampoline helper call is replaced/inlined by verifier
> > with simple move instruction. The kprobe/kretprobe is actual
> > helper call that returns prepared caller address.
> >
> > Also available at:
> >   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> >   bpf/get_func_ip
> >
> > v2 changes:
> >   - use kprobe_running to get kprobe instead of cpu var [Masami]
> >   - added support to add kprobe on function+offset
> >     and test for that [Alan]
> >
> > thanks,
> > jirka
> >
> >
> > ---
> > Alan Maguire (1):
> >       libbpf: allow specification of "kprobe/function+offset"
> >
> > Jiri Olsa (6):
> >       bpf, x86: Store caller's ip in trampoline stack
> >       bpf: Enable BPF_TRAMP_F_IP_ARG for trampolines with call_get_func_ip
> >       bpf: Add bpf_get_func_ip helper for tracing programs
> >       bpf: Add bpf_get_func_ip helper for kprobe programs
> >       selftests/bpf: Add test for bpf_get_func_ip helper
> >       selftests/bpf: Add test for bpf_get_func_ip in kprobe+offset probe
> >
> >  arch/x86/net/bpf_jit_comp.c                               | 19 +++++++++++++++++++
> >  include/linux/bpf.h                                       |  5 +++++
> >  include/linux/filter.h                                    |  3 ++-
> >  include/uapi/linux/bpf.h                                  |  7 +++++++
> >  kernel/bpf/trampoline.c                                   | 12 +++++++++---
> >  kernel/bpf/verifier.c                                     | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  kernel/trace/bpf_trace.c                                  | 32 ++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h                            |  7 +++++++
> >  tools/lib/bpf/libbpf.c                                    | 20 +++++++++++++++++---
> >  tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> >  tools/testing/selftests/bpf/progs/get_func_ip_test.c      | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  11 files changed, 270 insertions(+), 7 deletions(-)
> >  create mode 100644 tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c
> >  create mode 100644 tools/testing/selftests/bpf/progs/get_func_ip_test.c
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ