netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net
Cc: kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
	john.fastabend@gmail.com, kpsingh@kernel.org,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	Alan Maguire <alan.maguire@oracle.com>
Subject: [PATCH v2 bpf-next 0/3] libbpf: uprobe name-based attach followups
Date: Wed,  6 Apr 2022 12:43:48 +0100	[thread overview]
Message-ID: <1649245431-29956-1-git-send-email-alan.maguire@oracle.com> (raw)

Follow-up series to [1] to address some suggestions from Andrii to
improve parsing and make it more robust (patches 1, 2) and to improve
validation of u[ret]probe firing by validating expected argument
and return values (patch 3).

[1] https://lore.kernel.org/bpf/164903521182.13106.12656654142629368774.git-patchwork-notify@kernel.org/

Changes since v1:
- split library name, auto-attach parsing into separate patches (Andrii, patches 1, 2)
- made str_has_sfx() static inline, avoided repeated strlen()s by storing lengths,
  used strlen() instead of strnlen() (Andrii, patch 1)
- fixed sscanf() arg to use %li, switched logging to use "prog '%s'" format,
  used direct strcmp() on probe_type instead of prefix check (Andrii, patch 2)
- switched auto-attach tests to log parameter/return values to be checked by
  user-space side of tests. Needed to add pid filtering to avoid capturing
  stray malloc()s (Andrii, patch 3) 

Alan Maguire (3):
  libbpf: improve library identification for uprobe binary path
    resolution
  libbpf: improve string parsing for uprobe auto-attach
  selftests/bpf: uprobe tests should verify param/return values

 tools/lib/bpf/libbpf.c                             | 85 +++++++++-------------
 tools/lib/bpf/libbpf_internal.h                    | 11 +++
 .../selftests/bpf/prog_tests/uprobe_autoattach.c   | 25 +++++--
 .../selftests/bpf/progs/test_uprobe_autoattach.c   | 43 ++++++++---
 4 files changed, 96 insertions(+), 68 deletions(-)

-- 
1.8.3.1


             reply	other threads:[~2022-04-06 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 11:43 Alan Maguire [this message]
2022-04-06 11:43 ` [PATCH v2 bpf-next 1/3] libbpf: improve library identification for uprobe binary path resolution Alan Maguire
2022-04-06 11:43 ` [PATCH v2 bpf-next 2/3] libbpf: improve string parsing for uprobe auto-attach Alan Maguire
2022-04-06 11:43 ` [PATCH v2 bpf-next 3/3] selftests/bpf: uprobe tests should verify param/return values Alan Maguire
2022-04-07 18:50 ` [PATCH v2 bpf-next 0/3] libbpf: uprobe name-based attach followups patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1649245431-29956-1-git-send-email-alan.maguire@oracle.com \
    --to=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).