Thread (16 messages) flat view 16 messages, 3 authors, 2018-03-26

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2018-03-26 21:27:20
Also in: netdev

----- On Mar 26, 2018, at 1:55 PM, Alexei Starovoitov ast@fb.com wrote:

[...]
correct. this set deals with in-kernel tracepoints only.
No attempt to do anything with tracepoints inside modules.
Please endeavor to handle in-module tracepoints properly, then we'll
be able to pursue a more constructive discussion.

[...]
quoted hunk ↗ jump to hunk
Also I hope you noticed that the patch is doing:
+++ b/include/linux/tracepoint-defs.h
@@ -33,6 +33,7 @@ struct tracepoint {
        int (*regfunc)(void);
        void (*unregfunc)(void);
        struct tracepoint_func __rcu *funcs;
+       u32 num_args;
 };
To make sure that bpf programs are safe I need to do a static check
in the verifier that programs don't access arguments beyond
those specified by the tracepoint.

That was mentioned in the commit log of patch 6 too:
"
compute number of arguments passed into tracepoint
at compile time and store it as part of 'struct tracepoint'.
The number is necessary to check safety of bpf program access that
is coming in subsequent patch.
"
This part of the patch and its associated changelog is fine
with me. Please submit it as a separate commit from the rest
of the tracepoint.{c,h} changes.

[...]

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help