Thread (8 messages) flat view 8 messages, 3 authors, 2017-03-21

Re: [PATCH net-next v6 2/3] Add a eBPF helper function to retrieve socket uid

From: Lorenzo Colitti <hidden>
Date: 2017-03-21 07:00:48

On Tue, Mar 21, 2017 at 1:08 PM, Chenbo Feng
[off-list ref] 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help