public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug tapsets/28443] New: Provide syscall_any tapset for bpf
Date: Mon, 11 Oct 2021 15:53:47 +0000	[thread overview]
Message-ID: <bug-28443-6586@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28443

            Bug ID: 28443
           Summary: Provide syscall_any tapset for bpf
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

A number of systemtap examples use the syscall_any tapset.  Providing a BPF
version of the syscall_any tapset would allow additional examples to run with
as BPF.

Looked into how to implement this.  The raw tracepoints sys_enter and sys_exit
make the pt_regs available.  The sys_enter also has $id (don't know why they
didn't decide to include $id in the sys_exit). A helper function can pick out
the appropriate register from the pt_regs to get the syscall number. The bpf
backend also provides information about which target architecture the machine
is.  As experiment I was ableo to put guards around the initiatization code in
each of the tapset/linux/*/syscall_num.stp files to made the initializer only
run on the specific architecture and then have symbolic links from tapset/bpf
to the arch-specific syscall_num.stp files.  Will need to add the generation of
these guards to scripts/dump-syscalls.sh.

Haven't seen a way to get information whether this is 32-bit user-space code
running on 64-bit platform.  The existing tapset code to do that is using C
include files to get bit mask to determine whether things are running in compat
mode.  There doesn't seem to be a BPF function to extract that information.

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2021-10-11 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 15:53 wcohen at redhat dot com [this message]
2021-10-11 15:57 ` [Bug tapsets/28443] " dichen at redhat dot com
2021-10-11 21:35 ` wcohen at redhat dot com
2021-10-27 13:37 ` wcohen at redhat dot com

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=bug-28443-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).