[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr30K4Yi8U0bnTOq60rPW6aYY1Vb4xxmRgZdz319UmLmRw@mail.gmail.com>
Date: Fri, 3 Feb 2017 09:00:26 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Chenbo Feng <chenbofeng.kernel@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Alexei Starovoitov <ast@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Willem de Bruijn <willemb@...gle.com>,
Chenbo Feng <fengc@...gle.com>
Subject: Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve
socket uid
On Fri, Feb 3, 2017 at 6:32 AM, Daniel Borkmann <daniel@...earbox.net> wrote:
>> + sk = skb->sk;
>> + kuid = sock_net_uid(dev_net(skb->dev), sk);
>
>
> Don't you need to test for fullsock? Do you mean something like below?
It should be safe to call sock_net_uid on any type of socket
(including NULL). sk_uid was added to struct sock in 86741ec25462
("net: core: Add a UID field to struct sock.")
Powered by blists - more mailing lists