lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKD1Yr3SyKQ23P8F++cpS129kw5tUssCpPJyh8R+JTujNw0Nqg@mail.gmail.com>
Date:   Mon, 6 Feb 2017 12:25:33 +0900
From:   Lorenzo Colitti <lorenzo@...gle.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        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 10:51 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> if (sk) {
>     sk = sk_to_full_sk(sk);
>     if (sk_fullsock(sk))
>         return sk->sk_uid;
> }

Sure, though sk_to_full_sk is in inet_sock.h so I have to move some
core around. Options I see:

1. Move sk_to_full_sk from inet_sock.h to sock.h.
2. Move sock_net_uid to inet_sock.h.
3. Move sock_net_uid to sock.c and EXPORT_SYMBOL_GPL it.

Thoughts? #1 seems reasonable, since sk_fullsock is already in sock.h.
#2 would mean that we can't call sock_net_uid from non-inet code.
Currently the only code that accesses sk->sk_uid is inet code, but in
the future perhaps some of the code around the tree that calls
sock_i_uid could be migrated to use at sk->sk_uid instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ