Re: [PATCH v7 tip 4/8] tracing: allow BPF programs to call bpf_trace_printk()

2015-03-19 Thread Alexei Starovoitov
On 3/19/15 8:29 AM, Steven Rostedt wrote: + /* check format string for allowed specifiers */ + for (i = 0; i < fmt_size; i++) Even though there's only a single "if" statement after the "for", it is usually considered proper to add the brackets if the next line is complex (more than

Re: [PATCH v7 tip 4/8] tracing: allow BPF programs to call bpf_trace_printk()

2015-03-19 Thread Steven Rostedt
On Mon, 16 Mar 2015 14:49:40 -0700 Alexei Starovoitov wrote: > Debugging of BPF programs needs some form of printk from the program, > so let programs call limited trace_printk() with %d %u %x %p modifiers only. > > Similar to kernel modules, during program load verifier checks whether program >

[PATCH v7 tip 4/8] tracing: allow BPF programs to call bpf_trace_printk()

2015-03-16 Thread Alexei Starovoitov
Debugging of BPF programs needs some form of printk from the program, so let programs call limited trace_printk() with %d %u %x %p modifiers only. Similar to kernel modules, during program load verifier checks whether program is calling bpf_trace_printk() and if so, kernel allocates trace_printk b