提交 3e8b1a29 编写于 作者: S Steven Rostedt (VMware)

tracing: Have eprobes use filtering logic of trace events

The eprobes open code the reserving of the event on the ring buffer for
ftrace instead of using the ftrace event wrappers, which means that it
doesn't get affected by the filters, breaking the filtering logic on user
space.

Link: https://lkml.kernel.org/r/20211130024319.068451680@goodmis.orgSigned-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 6c536d76
...@@ -489,18 +489,12 @@ __eprobe_trace_func(struct eprobe_data *edata, void *rec) ...@@ -489,18 +489,12 @@ __eprobe_trace_func(struct eprobe_data *edata, void *rec)
if (trace_trigger_soft_disabled(edata->file)) if (trace_trigger_soft_disabled(edata->file))
return; return;
fbuffer.trace_ctx = tracing_gen_ctx();
fbuffer.trace_file = edata->file;
dsize = get_eprobe_size(&edata->ep->tp, rec); dsize = get_eprobe_size(&edata->ep->tp, rec);
fbuffer.regs = NULL;
entry = trace_event_buffer_reserve(&fbuffer, edata->file,
fbuffer.event = sizeof(*entry) + edata->ep->tp.size + dsize);
trace_event_buffer_lock_reserve(&fbuffer.buffer, edata->file,
call->event.type, if (!entry)
sizeof(*entry) + edata->ep->tp.size + dsize,
fbuffer.trace_ctx);
if (!fbuffer.event)
return; return;
entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event); entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册