On Tue, Mar 21, 2017 at 1:08 PM, Chenbo Feng <chenbofeng.ker...@gmail.com> wrote: > + if (!sk || !sk_fullsock(sk)) > + return overflowuid; > + kuid = sock_net_uid(sock_net(sk), sk); > + return from_kuid_munged(current_user_ns(), kuid);
Is current_user_ns() correct in all the contexts you'll want to run this code from? For packets sent by userspace applications it's likely to be correct, but what about received packets, and packets processed by the xt_ebpf module?