[PATCH bpf-next v2 1/2] selftests/bpf: Add struct send_recv_arg

2024-04-07 Thread Geliang Tang
From: Geliang Tang Avoid setting total_bytes and stop as global variables, this patch adds a new struct named send_recv_arg to pass arguments between threads. Put these two variables together with fd into this struct and pass it to server thread, so that server thread can access these two variabl

[PATCH bpf-next v2 2/2] selftests/bpf: Export send_recv_data helper

2024-04-07 Thread Geliang Tang
From: Geliang Tang This patch extracts the code to send and receive data into a new helper named send_recv_data() in network_helpers.c and export it in network_helpers.h. This helper will be used for MPTCP BPF selftests. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/network_help

[PATCH bpf-next v2 0/2] export send_byte and send_recv_data

2024-04-07 Thread Geliang Tang
From: Geliang Tang Address Martin's comments for v1 (thanks.) - drop patch 1, "export send_byte helper". - drop "WRITE_ONCE(arg.stop, 0)". - rebased. send_recv_data will be re-used in MPTCP bpf tests, but not included in this set because it depends on other patches that have not been in the b

[PATCH AUTOSEL 6.1 12/13] bpf: Check bloom filter map value size

2024-04-07 Thread Sasha Levin
From: Andrei Matei [ Upstream commit a8d89feba7e54e691ca7c4efc2a6264fa83f3687 ] This patch adds a missing check to bloom filter creating, rejecting values above KMALLOC_MAX_SIZE. This brings the bloom map in line with many other map types. The lack of this protection can cause kernel crashes fo

[PATCH AUTOSEL 6.6 21/22] selftests/ftrace: Fix event filter target_func selection

2024-04-07 Thread Sasha Levin
From: Mark Rutland [ Upstream commit 8ecab2e64572f1aecdfc5a8feae748abda6e3347 ] The event filter function test has been failing in our internal test farm: | # not ok 33 event filter function - test event filtering on functions Running the test in verbose mode indicates that this is because the

[PATCH AUTOSEL 6.6 20/22] bpf: Check bloom filter map value size

2024-04-07 Thread Sasha Levin
From: Andrei Matei [ Upstream commit a8d89feba7e54e691ca7c4efc2a6264fa83f3687 ] This patch adds a missing check to bloom filter creating, rejecting values above KMALLOC_MAX_SIZE. This brings the bloom map in line with many other map types. The lack of this protection can cause kernel crashes fo

[PATCH AUTOSEL 6.8 24/25] selftests/ftrace: Fix event filter target_func selection

2024-04-07 Thread Sasha Levin
From: Mark Rutland [ Upstream commit 8ecab2e64572f1aecdfc5a8feae748abda6e3347 ] The event filter function test has been failing in our internal test farm: | # not ok 33 event filter function - test event filtering on functions Running the test in verbose mode indicates that this is because the

[PATCH AUTOSEL 6.8 23/25] bpf: Check bloom filter map value size

2024-04-07 Thread Sasha Levin
From: Andrei Matei [ Upstream commit a8d89feba7e54e691ca7c4efc2a6264fa83f3687 ] This patch adds a missing check to bloom filter creating, rejecting values above KMALLOC_MAX_SIZE. This brings the bloom map in line with many other map types. The lack of this protection can cause kernel crashes fo

Re: [PATCH bpf-next] selftests/bpf: Add F_SETFL for fcntl

2024-04-07 Thread Geliang Tang
On Thu, 2024-04-04 at 21:47 -0700, John Fastabend wrote: > Geliang Tang wrote: > > Hi Jakub, > >   > > On Wed, 2024-04-03 at 15:29 -0700, John Fastabend wrote: > > > Jakub Sitnicki wrote: > > > > Hi Geliang, > > > > > > > > On Wed, Apr 03, 2024 at 04:32 PM +08, Geliang Tang wrote: > > > > > From:

Re: [PATCH v4 4/4] selftests/bpf: Add tests for ring__consume_n and ring_buffer__consume_n

2024-04-07 Thread Andrea Righi
On Sat, Apr 06, 2024 at 10:52:10AM -0700, Andrii Nakryiko wrote: > On Sat, Apr 6, 2024 at 10:39 AM Andrii Nakryiko > wrote: > > > > On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi > > wrote: > > > > > > Add tests for new API ring__consume_n() and ring_buffer__consume_n(). > > > > > > Signed-off-by: