On Fri, Jul 10, 2020 at 7:25 AM Alan Maguire <alan.magu...@oracle.com> wrote:
>
> The bpf helper bpf_trace_printk() uses trace_printk() under the hood.
> This leads to an alarming warning message originating from trace
> buffer allocation which occurs the first time a program using
> bpf_trace_printk() is loaded.
>
> We can instead create a trace event for bpf_trace_printk() and enable
> it in-kernel when/if we encounter a program using the
> bpf_trace_printk() helper.  With this approach, trace_printk()
> is not used directly and no warning message appears.
>
> This work was started by Steven (see Link) and finished by Alan; added
> Steven's Signed-off-by with his permission.
>
> Link: https://lore.kernel.org/r/20200628194334.6238b...@oasis.local.home
> Signed-off-by: Steven Rostedt (VMware) <rost...@goodmis.org>
> Signed-off-by: Alan Maguire <alan.magu...@oracle.com>
> ---

LGTM.

Acked-by: Andrii Nakryiko <andr...@fb.com>

>  kernel/trace/Makefile    |  2 ++
>  kernel/trace/bpf_trace.c | 41 ++++++++++++++++++++++++++++++++++++-----
>  kernel/trace/bpf_trace.h | 34 ++++++++++++++++++++++++++++++++++
>  3 files changed, 72 insertions(+), 5 deletions(-)
>  create mode 100644 kernel/trace/bpf_trace.h
>

[...]

Reply via email to