netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] bpf: add support for sys_{enter|exit}_* tracepoints
@ 2017-08-03 16:29 Yonghong Song
  2017-08-03 16:29 ` [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints Yonghong Song
  2017-08-03 16:29 ` [PATCH net-next v3 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints Yonghong Song
  0 siblings, 2 replies; 8+ messages in thread
From: Yonghong Song @ 2017-08-03 16:29 UTC (permalink / raw)
  To: peterz, rostedt, ast, daniel, netdev; +Cc: kernel-team

Currently, bpf programs cannot be attached to sys_enter_* and sys_exit_*
style tracepoints. The main reason is that syscalls/sys_enter_* and syscalls/sys_exit_*
tracepoints are treated differently from other tracepoints and there
is no bpf hook to it.

This patch set adds bpf support for these syscalls tracepoints and also
adds a test case for it.

Changes from v2:
 - Fix a build issue
Changes from v1:
 - Do not use TRACE_EVENT_FL_CAP_ANY to identify syscall tracepoint.
   Instead use trace_event_call->class.

Yonghong Song (2):
  bpf: add support for sys_enter_* and sys_exit_* tracepoints
  bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

 include/linux/syscalls.h      | 12 ++++++++
 kernel/events/core.c          |  8 +++--
 kernel/trace/trace_syscalls.c | 53 ++++++++++++++++++++++++++++++--
 samples/bpf/Makefile          |  4 +++
 samples/bpf/syscall_tp_kern.c | 62 +++++++++++++++++++++++++++++++++++++
 samples/bpf/syscall_tp_user.c | 71 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 205 insertions(+), 5 deletions(-)
 create mode 100644 samples/bpf/syscall_tp_kern.c
 create mode 100644 samples/bpf/syscall_tp_user.c

-- 
2.9.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-04 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03 16:29 [PATCH net-next v3 0/2] bpf: add support for sys_{enter|exit}_* tracepoints Yonghong Song
2017-08-03 16:29 ` [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints Yonghong Song
2017-08-04  2:08   ` Alexei Starovoitov
2017-08-04  3:09     ` Y Song
2017-08-04 18:40       ` Alexei Starovoitov
2017-08-04 18:50         ` Yonghong Song
2017-08-03 16:29 ` [PATCH net-next v3 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints Yonghong Song
2017-08-03 17:28   ` Daniel Borkmann

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).