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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e4f52604cc94_18d22b0a1febc5b8e7@john-XPS-13-9370.notmuch>
Date:   Thu, 20 Feb 2020 19:45:36 -0800
From:   John Fastabend <john.fastabend@...il.com>
To:     Jakub Sitnicki <jakub@...udflare.com>, bpf@...r.kernel.org
Cc:     netdev@...r.kernel.org, kernel-team@...udflare.com,
        John Fastabend <john.fastabend@...il.com>,
        Lorenz Bauer <lmb@...udflare.com>, Martin Lau <kafai@...com>
Subject: RE: [PATCH bpf-next v7 06/11] bpf, sockmap: Return socket cookie on
 lookup from syscall

Jakub Sitnicki wrote:
> Tooling that populates the SOCK{MAP,HASH} with sockets from user-space
> needs a way to inspect its contents. Returning the struct sock * that the
> map holds to user-space is neither safe nor useful. An approach established
> by REUSEPORT_SOCKARRAY is to return a socket cookie (a unique identifier)
> instead.
> 
> Since socket cookies are u64 values, SOCK{MAP,HASH} need to support such a
> value size for lookup to be possible. This requires special handling on
> update, though. Attempts to do a lookup on a map holding u32 values will be
> met with ENOSPC error.
> 
> Signed-off-by: Jakub Sitnicki <jakub@...udflare.com>
> ---

Acked-by: John Fastabend <john.fastabend@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ