bpf: extend bpf_trace_printk to support %i
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 2 Jul 2017 00:13:29 +0000 (02:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 09:22:52 +0000 (02:22 -0700)
commit7bda4b40c5624c3f1c69227f8ebfd46a4b83f2ef
tree6d64dd07567eaa2992d1982c70bd1322354461e3
parent9780c0ab1a4e64ef6998c4d83f9df5be806a02dc
bpf: extend bpf_trace_printk to support %i

Currently, bpf_trace_printk does not support common formatting
symbol '%i' however vsprintf does and is what eventually gets
called by bpf helper. If users are used to '%i' and currently
make use of it, then bpf_trace_printk will just return with
error without dumping anything to the trace pipe, so just add
support for '%i' to the helper.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/trace/bpf_trace.c