linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Beau Belgrave <beaub@linux.microsoft.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [RFC PATCH] udiag - User mode to trace_event (ftrace, perf, eBPF) ABI
Date: Tue, 3 Aug 2021 17:17:43 -0400	[thread overview]
Message-ID: <20210803171743.36115d4c@oasis.local.home> (raw)
In-Reply-To: <20210727193535.10326-1-beaub@linux.microsoft.com>


Hi Beau,

BTW, feel free to Cc LKML too (linux-kernel@vger.kernel.org)


On Tue, 27 Jul 2021 12:35:35 -0700
Beau Belgrave <beaub@linux.microsoft.com> wrote:

> User mode processes that require emitting diagnostic data are currently
> limited to using uprobes to get data into trace_events. The udiag ABI
> offers a way for user mode processes to write diagnostic data to
> trace_events much faster than the uprobe die chain handler.
> 
> In addition a shared page is exposed out to registered user processes
> that is used to enable single branch checking for if the trace_event is
> being traced. This allows equivalent overhead as a uprobe site when
> tracing is not enabled.
> 
> User processes register a trace_event to use via a device exposed at
> /dev/udiag. System owners can write udev rules to decide the security
> boundary. udiag is limited to only a page size worth of trace_events
> that are isolated and put under the udiag subsystem. User processes
> write events out via /dev/udiag. This allows for many languages and
> processes to contribute the same events regardless of where in the code
> the event was generated. This allows common code to be shared and
> centrally processed on the machine within a eBPF program regardless how
> the code has evolved as long as the data within the event follows the
> same data format as before.
> 
> An example of this is common error conditions that can happen across a
> suite of processes. A single eBPF program can watch for the single event
> across all processes, regardless of binary location or language used to
> create the process. Once problems are found, additional eBPF programs
> can be launched to impose further tracing, run mitigations, etc.
> 
> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
>

Can you provide user space code that would show a use case of this
implementation. Understanding exactly what is expected on the user side
will help tremendously with understanding the kernel side.

Thanks,

-- Steve

  reply	other threads:[~2021-08-03 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 19:35 [RFC PATCH] udiag - User mode to trace_event (ftrace, perf, eBPF) ABI Beau Belgrave
2021-08-03 21:17 ` Steven Rostedt [this message]
2021-08-03 22:52   ` Beau Belgrave
2021-08-04  0:17     ` Steven Rostedt
2021-08-04 16:37       ` Beau Belgrave

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=20210803171743.36115d4c@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=beaub@linux.microsoft.com \
    --cc=linux-trace-devel@vger.kernel.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 NNTP newsgroup(s).