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: <87k15vs60i.fsf@cloudflare.com>
Date:   Mon, 13 Jan 2020 16:58:05 +0100
From:   Jakub Sitnicki <jakub@...udflare.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        kernel-team@...udflare.com, Eric Dumazet <edumazet@...gle.com>,
        Lorenz Bauer <lmb@...udflare.com>,
        Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH bpf-next v2 11/11] selftests/bpf: Tests for SOCKMAP holding listening sockets

On Sun, Jan 12, 2020 at 02:06 AM CET, John Fastabend wrote:
> Jakub Sitnicki wrote:
>> Now that SOCKMAP can store listening sockets, user-space and BPF API is
>> open to a new set of potential pitfalls. Exercise the map operations (with
>> extra attention to code paths susceptible to races between map ops and
>> socket cloning), and BPF helpers that work with SOCKMAP to gain confidence
>> that all works as expected.
>> 
>> Signed-off-by: Jakub Sitnicki <jakub@...udflare.com>
>> ---
>
> [...]
>
>> +static void test_sockmap_insert_listening(int family, int sotype, int mapfd)
>> +{
>> +	u64 value;
>> +	u32 key;
>> +	int s;
>> +
>> +	s = listen_loopback(family, sotype);
>> +	if (s < 0)
>> +		return;
>
> Will the test be marked OK if listen fails here? Should we mark it skipped or
> maybe even failed? Just concerned it may be passing even if the update doesn't
> actually happen.

Yes, it will be marked as failed if we don't succeed in creating a
listening socket. The listen_loopback helper uses x{socket,bind,listen}
wrappers, which in turn use the CHECK_FAIL macro to fail the test.

Thanks for going through this series till the end :-)

-jkbs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ