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-next>] [day] [month] [year] [list]
Message-Id: <1642004329-23514-1-git-send-email-alan.maguire@oracle.com>
Date:   Wed, 12 Jan 2022 16:18:45 +0000
From:   Alan Maguire <alan.maguire@...cle.com>
To:     ast@...nel.org, daniel@...earbox.net, andrii@...nel.org
Cc:     kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org, jolsa@...nel.org,
        sunyucong@...il.com, netdev@...r.kernel.org, bpf@...r.kernel.org,
        Alan Maguire <alan.maguire@...cle.com>
Subject: [RFC bpf-next 0/4] libbpf: userspace attach by name

This patch series is a rough attempt to support attach by name for
uprobes and USDT (Userland Static Defined Tracing) probes.
Currently attach for such probes is done by determining the offset
manually, so the aim is to try and mimic the simplicity of kprobe
attach, making use of uprobe opts.

One restriction applies: uprobe attach supports system-wide probing
by specifying "-1" for the pid.  That functionality is not supported,
since we need a running process to determine the base address to
subtract to get the uprobe-friendly offset.  There may be a way
to do this without a running process, so any suggestions would
be greatly appreciated.

There are probably a bunch of subtleties missing here; the aim
is to see if this is useful and if so hopefully we can refine
it to deal with more complex cases.  I tried to handle one case
that came to mind - weak library symbols - but there are probably
other issues when determining which address to use I haven't
thought of.

Alan Maguire (4):
  libbpf: support function name-based attach for uprobes
  libbpf: support usdt provider/probe name-based attach for uprobes
  selftests/bpf: add tests for u[ret]probe attach by name
  selftests/bpf: add test for USDT uprobe attach by name

 tools/lib/bpf/libbpf.c                             | 244 +++++++++++++++++++++
 tools/lib/bpf/libbpf.h                             |  17 +-
 tools/testing/selftests/bpf/Makefile               |  34 +++
 .../selftests/bpf/prog_tests/attach_probe.c        |  74 ++++++-
 .../selftests/bpf/progs/test_attach_probe.c        |  24 ++
 5 files changed, 391 insertions(+), 2 deletions(-)

-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ