On Tue, 2017-10-10 at 19:56 -0700, Alexei Starovoitov wrote: > actually we hit that too for completely different tracing use case. > Indeed would be good to generate socket cookie unconditionally > for all sockets. I don't think there is any harm. >
Simply call sock_gen_cookie() when needed. If a tracepoint needs the cookie and the cookie was not yet generated, it will be generated at this point.