Re: [PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests

2024-11-13 Thread Alexis Lothoré
Hello Stanislas, thanks for the reviews ! On 11/13/24 18:42, Stanislav Fomichev wrote: > On 11/13, Alexis Lothoré (eBPF Foundation) wrote: >> The flow_dissector runs plenty of tests over diffent kind of packets, >> grouped into three categories: skb mode, non-skb mode with direct >> attach, and no

Re: [PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr

2024-11-13 Thread Hangbin Liu
On Wed, Nov 13, 2024 at 01:03:13PM -0800, Sam Edwards wrote: > On Wed, Nov 13, 2024 at 4:52 AM Hangbin Liu wrote: > > > > RFC8981 section 3.4 says that existing temporary addresses must have their > > lifetimes adjusted so that no temporary addresses should ever remain "valid" > > or "preferred" l

Re: [PATCH v2 2/2] kunit: tool: print failed tests only

2024-11-13 Thread David Gow
On Thu, 14 Nov 2024 at 06:24, Rae Moar wrote: > > Add flag --failed to kunit.py to print only failed tests. This printing > is done after running is over. > > This patch also adds the method print_test() that will also print your > Test object. Before, all printing of tests occurred during parsing

Re: [PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test

2024-11-13 Thread Jakub Kicinski
On Thu, 14 Nov 2024 02:00:01 + Hangbin Liu wrote: > > # [+300.25] tempaddr not deleted for 2001:db8::1 > > # [+0.16] tempaddr not deleted for 2003:db8::1 > > # [+0.07] FAIL: mngtmpaddr add/remove incorrect > > not ok 1 selftests: net: rtnetlink.sh # exit=1 > > Is this tested with patched ker

Re: [PATCH] net/unix: pass pidfd flags via SCM_PIDFD cmsg

2024-11-13 Thread Kuniyuki Iwashima
From: Stas Sergeev Date: Thu, 14 Nov 2024 00:02:05 +0300 > @@ -154,7 +157,12 @@ static __inline__ void scm_pidfd_recv(struct msghdr > *msg, struct scm_cookie *scm > if (!scm->pid) > return; > > - pidfd = pidfd_prepare(scm->pid, 0, &pidfd_file); > + err = pidfd_valida

Re: [PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test

2024-11-13 Thread Hangbin Liu
On Wed, Nov 13, 2024 at 11:56:12AM -0800, Jakub Kicinski wrote: > On Wed, 13 Nov 2024 12:51:52 + Hangbin Liu wrote: > > Add a test to check the temporary address could be added/removed > > correctly when mngtempaddr is set or removed/unmanaged. > > Doesn't seem to work for us: > > # [+300.25]

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Lizhi Xu
On Thu, 14 Nov 2024 09:00:25 +0800, Lizhi Xu wrote: > On Wed, 13 Nov 2024 13:29:55 +0300, Dmitry Antipov wrote: > > On 11/12/24 4:41 PM, Lizhi Xu wrote: > > > > > mutex_lock(&sdata->local->iflist_mtx); > > > + if (list_empty(&sdata->local->interfaces)) { > > > + mutex_unlock(&sdat

Re: [PATCH v5 01/19] scripts: move genksyms crc32 implementation to a common include

2024-11-13 Thread Neal Gompa
On Wed, Nov 13, 2024 at 2:35 PM Luis Chamberlain wrote: > > On Wed, Nov 13, 2024 at 09:04:51AM -0500, Neal Gompa wrote: > > On Mon, Nov 11, 2024 at 11:06 PM Masahiro Yamada > > wrote: > > > > > > On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen > > > wrote: > > > > > > > > Suggested-by: Petr Pavl

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Lizhi Xu
On Wed, 13 Nov 2024 13:29:55 +0300, Dmitry Antipov wrote: > On 11/12/24 4:41 PM, Lizhi Xu wrote: > > > mutex_lock(&sdata->local->iflist_mtx); > > + if (list_empty(&sdata->local->interfaces)) { > > + mutex_unlock(&sdata->local->iflist_mtx); > > + return; > > + } > >

[PATCH v2 2/2] kunit: tool: print failed tests only

2024-11-13 Thread Rae Moar
Add flag --failed to kunit.py to print only failed tests. This printing is done after running is over. This patch also adds the method print_test() that will also print your Test object. Before, all printing of tests occurred during parsing. This method could be useful in the future when convertin

[PATCH v2 1/2] kunit: tool: Only print the summary

2024-11-13 Thread Rae Moar
From: David Gow Allow only printing the summary at the end of a test run, rather than all individual test results. This summary will list a few failing tests if there are any. To use: ./tools/testing/kunit/kunit.py run --summary Signed-off-by: Rae Moar Signed-off-by: David Gow --- Changes si

[PATCH] net/unix: pass pidfd flags via SCM_PIDFD cmsg

2024-11-13 Thread Stas Sergeev
Currently SCM_PIDFD cmsg cannot be sent via unix socket (returns -EINVAL) and SO_PASSPIDFD doesn't support flags. The created pidfd always has flags set to 0. This patch implements SCM_PIDFD cmsg in AF_UNIX socket, which can be used to send flags to SO_PASSPIDFD-enabled recipient. Self-test is ad

Re: [PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr

2024-11-13 Thread Sam Edwards
On Wed, Nov 13, 2024 at 4:52 AM Hangbin Liu wrote: > > RFC8981 section 3.4 says that existing temporary addresses must have their > lifetimes adjusted so that no temporary addresses should ever remain "valid" > or "preferred" longer than the incoming SLAAC Prefix Information. This would > strongly

Re: [PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test

2024-11-13 Thread Sam Edwards
On Wed, Nov 13, 2024 at 4:52 AM Hangbin Liu wrote: > > Add a test to check the temporary address could be added/removed > correctly when mngtempaddr is set or removed/unmanaged. > > Suggested-by: Sam Edwards > Signed-off-by: Hangbin Liu > --- Hi Hangbin, Ahh, you beat me to it! I was starting

Re: [PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test

2024-11-13 Thread Jakub Kicinski
On Wed, 13 Nov 2024 12:51:52 + Hangbin Liu wrote: > Add a test to check the temporary address could be added/removed > correctly when mngtempaddr is set or removed/unmanaged. Doesn't seem to work for us: # [+300.25] tempaddr not deleted for 2001:db8::1 # [+0.16] tempaddr not deleted for 2003:

Re: [PATCH v5 01/19] scripts: move genksyms crc32 implementation to a common include

2024-11-13 Thread Luis Chamberlain
On Wed, Nov 13, 2024 at 09:04:51AM -0500, Neal Gompa wrote: > On Mon, Nov 11, 2024 at 11:06 PM Masahiro Yamada wrote: > > > > On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen > > wrote: > > > > > > Suggested-by: Petr Pavlu > > > Signed-off-by: Sami Tolvanen > > > Acked-by: Neal Gompa > > > > Doe

Re: [PATCH bpf-next 10/10] selftests/bpf: remove test_flow_dissector.sh

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > Now that test_flow_dissector.sh has been converted to test_progs, remove > the legacy test. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: LKFT CI: improving Networking selftests results when validating stable kernels

2024-11-13 Thread Shuah Khan
On 11/8/24 11:21, Matthieu Baerts wrote: Hello LKFT maintainers, CI operators, First, I would like to say thank you to the people behind the LKFT project for validating stable kernels (and more), and including some Network selftests in their tests suites. A lot of improvements around the networ

Re: [PATCH bpf-next 09/10] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > test_flow_dissector.sh loads flow_dissector program and subprograms, > creates and configured relevant tunnels and interfaces, and ensure that > the bpf dissection is actually performed correctly. Similar tests exist > in test_progs (thanks to flo

Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré wrote: > On 11/13/24 14:53, Alexis Lothoré (eBPF Foundation) wrote: > > [...] > > > + ns = open_netns(TEST_NS); > > + bpf_prog_detach2(prog_fd, 0, BPF_FLOW_DISSECTOR); > > + close_netns(ns); > > I would like to mention that I initially planned to directly delete th

Re: [PATCH bpf-next 02/10] selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The flow_dissector program currently compares flow keys returned by bpf > program with the expected one thanks to a custom macro using memcmp. > > Use the new ASSERT_MEMEQ macro to perform this comparision. This update > also allows to get rid of

Re: [PATCH v5 01/19] scripts: move genksyms crc32 implementation to a common include

2024-11-13 Thread Sami Tolvanen
Hi, On Mon, Nov 11, 2024 at 8:06 PM Masahiro Yamada wrote: > > On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen wrote: > > > > To avoid duplication between host programs, move the crc32 code to a > > shared header file. > > > Only the motivation to use this long table is to keep compatibility > bet

Re: [PATCH bpf-next 08/10] selftests/bpf: Enable generic tc actions in selftests config

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > Enable CONFIG_NET_ACT_GACT to allow adding simple actions with tc > filters. This is for example needed to migrate test_flow_dissector into > the automated testing performed in CI. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: S

Re: [PATCH v5 18/19] kbuild: Add gendwarfksyms as an alternative to genksyms

2024-11-13 Thread Sami Tolvanen
Hi Masahiro, On Mon, Nov 11, 2024 at 8:09 PM Masahiro Yamada wrote: > > On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen wrote: > > > > # These mirror gensymtypes_c and co above, keep them in synch. > > -cmd_gensymtypes_S = > > \ > > - { e

Re: [PATCH bpf-next 06/10] selftests/bpf: add gre packets testing to flow_dissector

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The bpf_flow program is able to handle GRE headers in IP packets. Add a > few test data input simulating those GRE packets, with 2 different > cases: > - parse GRE and the encapsulated packet > - parse GRE only Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 05/10] selftests/bpf: expose all subtests from flow_dissector

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The flow_dissector test integrated in test_progs actually runs a wide > matrix of tests over different packets types and bpf programs modes, but > exposes only 3 main tests, preventing tests users from running specific > subtests with a specific i

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 15:19:50 +0100, Antonio Quartulli wrote: > On 04/11/2024 16:14, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, > > > + struct genl_info *info, > > > +

Re: [PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The flow_dissector runs plenty of tests over diffent kind of packets, > grouped into three categories: skb mode, non-skb mode with direct > attach, and non-skb with indirect attach. > > Re-split the main function into dedicated tests. Each test n

Re: [PATCH bpf-next 03/10] selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The flow dissector test currently relies on generic CHECK macros to > perform tests. Update those to newer, more-specific ASSERT macros. > > This update allows to get rid of the global duration variable, which was > needed by the CHECK macros >

Re: [PATCH bpf-next 01/10] selftests/bpf: add a macro to compare raw memory

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > We sometimes need to compare whole structures in an assert. It is > possible to use the existing macros on each field, but when the whole > structure has to be checked, it is more convenient to simply compare the > whole structure memory > > Add

Re: LKFT CI: improving Networking selftests results when validating stable kernels

2024-11-13 Thread Dan Carpenter
On Fri, Nov 08, 2024 at 07:21:59PM +0100, Matthieu Baerts wrote: > KSelftests from the same version > > > According to the doc [2], kselftests should support all previous kernel > versions. The LKFT CI is then using the kselftests from the last stable > release to

Re: [PATCH v3] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-13 Thread Dave Jiang
On 11/13/24 5:51 AM, Suraj Sonawane wrote: > Fix an issue detected by syzbot with KASAN: > > BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ > core.c:416 [inline] > BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e8/0x24a0 > drivers/acpi/nfit/core.c:459 > > The issue

Re: [PATCH v2 2/2] rcuscale: Remove redundant WARN_ON_ONCE() splat

2024-11-13 Thread Neeraj Upadhyay
On 11/13/2024 4:30 PM, Uladzislau Rezki (Sony) wrote: > There are two places where WARN_ON_ONCE() is called two times > in the error paths. One which is encapsulated into if() condition > and another one, which is unnecessary, is placed in the brackets. > > Remove an extra WARN_ON_ONCE() splat

Re: [PATCH v2 1/2] rcuscale: Do a proper cleanup if kfree_scale_init() fails

2024-11-13 Thread Neeraj Upadhyay
On 11/13/2024 4:30 PM, Uladzislau Rezki (Sony) wrote: > A static analyzer for C, Smatch, reports and triggers below > warnings: > >kernel/rcu/rcuscale.c:1215 rcu_scale_init() >warn: inconsistent returns 'global &fullstop_mutex'. > > The checker complains about, we do not unlock the "fu

Re: [PATCH v5 01/19] scripts: move genksyms crc32 implementation to a common include

2024-11-13 Thread Neal Gompa
On Mon, Nov 11, 2024 at 11:06 PM Masahiro Yamada wrote: > > On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen wrote: > > > > Suggested-by: Petr Pavlu > > Signed-off-by: Sami Tolvanen > > Acked-by: Neal Gompa > > Does this Ack add any value? > > Acked-by is meaningful only when it is given by someo

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 04:01:05PM +0100, Dragos Tatulea wrote: > > > On 13.11.24 15:49, Michael S. Tsirkin wrote: > > On Wed, Nov 13, 2024 at 03:33:35PM +0100, Dragos Tatulea wrote: > >> > >> > >> On 13.11.24 07:32, Michael S. Tsirkin wrote: > >>> On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Dragos Tatulea
On 13.11.24 15:49, Michael S. Tsirkin wrote: > On Wed, Nov 13, 2024 at 03:33:35PM +0100, Dragos Tatulea wrote: >> >> >> On 13.11.24 07:32, Michael S. Tsirkin wrote: >>> On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: From: Si-Wei Liu The starting iova address to i

[PATCH v6 3/3] vsock/test: verify socket options after setting them

2024-11-13 Thread Konstantin Shkolnyy
Replace setsockopt() calls with calls to functions that follow setsockopt() with getsockopt() and check that the returned value and its size are the same as have been set. (Except in vsock_perf.) Signed-off-by: Konstantin Shkolnyy --- tools/testing/vsock/control.c | 9 +- tools/tes

Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-13 Thread Alexis Lothoré
On 11/13/24 14:53, Alexis Lothoré (eBPF Foundation) wrote: [...] > + ns = open_netns(TEST_NS); > + bpf_prog_detach2(prog_fd, 0, BPF_FLOW_DISSECTOR); > + close_netns(ns); I would like to mention that I initially planned to directly delete the namespace to perform the test cleanup, ass

[PATCH v6 0/3] vsock/test: fix wrong setsockopt() parameters

2024-11-13 Thread Konstantin Shkolnyy
Parameters were created using wrong C types, which caused them to be of wrong size on some architectures, causing problems. The problem with SO_RCVLOWAT was found on s390 (big endian), while x86-64 didn't show it. After the fix, all tests pass on s390. Then Stefano Garzarella pointed out that SO_V

[PATCH v6 1/3] vsock/test: fix failures due to wrong SO_RCVLOWAT parameter

2024-11-13 Thread Konstantin Shkolnyy
This happens on 64-bit big-endian machines. SO_RCVLOWAT requires an int parameter. However, instead of int, the test uses unsigned long in one place and size_t in another. Both are 8 bytes long on 64-bit machines. The kernel, having received the 8 bytes, doesn't test for the exact size of the param

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 03:33:35PM +0100, Dragos Tatulea wrote: > > > On 13.11.24 07:32, Michael S. Tsirkin wrote: > > On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: > >> From: Si-Wei Liu > >> > >> The starting iova address to iterate iotlb map entry within a range > >> was set

Re: [syzbot] [mm?] WARNING: locking bug in __rmqueue_pcplist

2024-11-13 Thread Sebastian Andrzej Siewior
On 2024-11-04 12:47:26 [+0100], Peter Zijlstra wrote: > On Mon, Nov 04, 2024 at 12:45:06PM +0100, Peter Zijlstra wrote: > > diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c > > index 6310a180278b..ac9f6682bb2f 100644 > > --- a/mm/kasan/generic.c > > +++ b/mm/kasan/generic.c > > @@ -521,12 +521,

[PATCH v6 2/3] vsock/test: fix parameter types in SO_VM_SOCKETS_* calls

2024-11-13 Thread Konstantin Shkolnyy
Change parameters of SO_VM_SOCKETS_* to unsigned long long as documented in the vm_sockets.h, because the corresponding kernel code requires them to be at least 64-bit, no matter what architecture. Otherwise they are too small on 32-bit machines. Fixes: 5c338112e48a ("test/vsock: rework message bo

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Dragos Tatulea
On 13.11.24 07:32, Michael S. Tsirkin wrote: > On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: >> From: Si-Wei Liu >> >> The starting iova address to iterate iotlb map entry within a range >> was set to an irrelevant value when passing to the itree_next() >> iterator, although l

Re: [PATCH net-next v11 20/23] ovpn: kill key and notify userspace in case of IV exhaustion

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 16:44:09 +0100, Antonio Quartulli wrote: > On 05/11/2024 11:33, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:33 +0100, Antonio Quartulli wrote: > > > +int ovpn_nl_key_swap_notify(struct ovpn_peer *peer, u8 key_id) > > > +{ > > [...] > > > + > > > + nla_nest_end(msg, k_attr); > > > + gen

[PATCH bpf-next 03/10] selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test

2024-11-13 Thread eBPF Foundation
The flow dissector test currently relies on generic CHECK macros to perform tests. Update those to newer, more-specific ASSERT macros. This update allows to get rid of the global duration variable, which was needed by the CHECK macros Signed-off-by: Alexis Lothoré (eBPF Foundation) --- .../self

[PATCH bpf-next 01/10] selftests/bpf: add a macro to compare raw memory

2024-11-13 Thread eBPF Foundation
We sometimes need to compare whole structures in an assert. It is possible to use the existing macros on each field, but when the whole structure has to be checked, it is more convenient to simply compare the whole structure memory Add a dedicated assert macro, ASSERT_MEMEQ, to allow bare memory c

[PATCH bpf-next 09/10] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-13 Thread eBPF Foundation
test_flow_dissector.sh loads flow_dissector program and subprograms, creates and configured relevant tunnels and interfaces, and ensure that the bpf dissection is actually performed correctly. Similar tests exist in test_progs (thanks to flow_dissector.c) and run the same programs, but those are on

[PATCH bpf-next 10/10] selftests/bpf: remove test_flow_dissector.sh

2024-11-13 Thread eBPF Foundation
Now that test_flow_dissector.sh has been converted to test_progs, remove the legacy test. Signed-off-by: Alexis Lothoré (eBPF Foundation) --- tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_

[PATCH bpf-next 08/10] selftests/bpf: Enable generic tc actions in selftests config

2024-11-13 Thread eBPF Foundation
Enable CONFIG_NET_ACT_GACT to allow adding simple actions with tc filters. This is for example needed to migrate test_flow_dissector into the automated testing performed in CI. Signed-off-by: Alexis Lothoré (eBPF Foundation) --- tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 inserti

[PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-13 Thread eBPF Foundation
Commit a11c397c43d5 ("bpf/flow_dissector: add mode to enforce global BPF flow dissector") is currently tested in test_flow_dissector.sh, which is not part of test_progs. Add the corresponding test to flow_dissector.c, which is part of test_progs. The new test reproduces the behavior implemented in

[PATCH bpf-next 06/10] selftests/bpf: add gre packets testing to flow_dissector

2024-11-13 Thread eBPF Foundation
The bpf_flow program is able to handle GRE headers in IP packets. Add a few test data input simulating those GRE packets, with 2 different cases: - parse GRE and the encapsulated packet - parse GRE only Signed-off-by: Alexis Lothoré (eBPF Foundation) --- .../selftests/bpf/prog_tests/flow_dissect

[PATCH bpf-next 05/10] selftests/bpf: expose all subtests from flow_dissector

2024-11-13 Thread eBPF Foundation
The flow_dissector test integrated in test_progs actually runs a wide matrix of tests over different packets types and bpf programs modes, but exposes only 3 main tests, preventing tests users from running specific subtests with a specific input only. Expose all subtests executed by flow_dissector

[PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests

2024-11-13 Thread eBPF Foundation
The flow_dissector runs plenty of tests over diffent kind of packets, grouped into three categories: skb mode, non-skb mode with direct attach, and non-skb with indirect attach. Re-split the main function into dedicated tests. Each test now must have its own setup/teardown, but for the advantage o

[PATCH bpf-next 02/10] selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys

2024-11-13 Thread eBPF Foundation
The flow_dissector program currently compares flow keys returned by bpf program with the expected one thanks to a custom macro using memcmp. Use the new ASSERT_MEMEQ macro to perform this comparision. This update also allows to get rid of the unused bpf_test_run_opts variable in run_tests_skb_less

[PATCH bpf-next 00/10] selftests/bpf: migrate test_flow_dissector.sh to test_progs

2024-11-13 Thread eBPF Foundation
Hello, this new series aims to migrate test_flow_dissector.sh into test_progs. There are 2 "main" parts in test_flow_dissector.sh: - a set of tests checking flow_dissector programs attachment to either root namespace or non-root namespace - dissection test The first set is integrated in flow_dis

Re: [PATCH net-next v11 17/23] ovpn: add support for peer floating

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 15:03:00 +0100, Antonio Quartulli wrote: > On 12/11/2024 11:56, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:30 +0100, Antonio Quartulli wrote: > > > diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c > > > index > > > 63c140138bf98e5d1df79a2565b666d86513323d..0e8a6f2c76bc7b2cc

[PATCH v3] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-13 Thread Suraj Sonawane
Fix an issue detected by syzbot with KASAN: BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ core.c:416 [inline] BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e8/0x24a0 drivers/acpi/nfit/core.c:459 The issue occurs in cmd_to_func when the call_pkg->nd_reserved2 array i

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Dmitry Antipov
On 11/13/24 1:58 PM, Miquel Raynal wrote: Note https://syzkaller.appspot.com/text?tag=ReproC&x=12a9f74058 makes an attempt to connect the only device. How this is expected to work if there are more than one device? Isn't sdata already specific enough? What do you mean by "device"? Well,

[PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test

2024-11-13 Thread Hangbin Liu
Add a test to check the temporary address could be added/removed correctly when mngtempaddr is set or removed/unmanaged. Suggested-by: Sam Edwards Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/rtnetlink.sh | 89 1 file changed, 89 insertions(+) diff --git

[PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr

2024-11-13 Thread Hangbin Liu
RFC8981 section 3.4 says that existing temporary addresses must have their lifetimes adjusted so that no temporary addresses should ever remain "valid" or "preferred" longer than the incoming SLAAC Prefix Information. This would strongly imply in Linux's case that if the "mngtmpaddr" address is del

[PATCH net 0/2] ipv6: fix temporary address not removed correctly

2024-11-13 Thread Hangbin Liu
Currently the temporary address is not removed when mngtmpaddr is deleted or becomes unmanaged. The patch set fixed this issue and add a related test. Hangbin Liu (2): net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr selftests/rtnetlink.sh: add mngtempaddr test

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-13 Thread Christophe Leroy
Le 12/11/2024 à 21:28, Luis Chamberlain a écrit : On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: diff --git a/kernel/module/main.c b/kernel/module/main.c index 1bf4b0db291b..b603c9647e73 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2582,7 +2582,7 @@ stat

Re: [syzbot] [acpi?] [nvdimm?] KASAN: vmalloc-out-of-bounds Read in acpi_nfit_ctl (2)

2024-11-13 Thread Suraj Sonawane
#syz test On Tue, Nov 5, 2024 at 8:58 PM syzbot < syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com> wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:2e1b3cc9d7f7 Merge tag 'arm-fixes-6.12-2' of > git://git.ker.. > git tree: upstream > console output: https:/

Re: [syzbot] [acpi?] [nvdimm?] KASAN: vmalloc-out-of-bounds Read in acpi_nfit_ctl (2)

2024-11-13 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com Tested-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com Tested on: commit: f1b785f4 Merge tag 'for_linus' of git://git.k

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Dmitry Antipov
On 11/12/24 4:41 PM, Lizhi Xu wrote: mutex_lock(&sdata->local->iflist_mtx); + if (list_empty(&sdata->local->interfaces)) { + mutex_unlock(&sdata->local->iflist_mtx); + return; + } list_del_rcu(&sdata->list); mutex_unlock(&sdata->loc

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 15:26:59 +0100, Antonio Quartulli wrote: > On 11/11/2024 16:41, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > +void ovpn_peer_hash_vpn_ip(struct ovpn_peer *peer) > > > + __must_hold(&peer->ovpn->peers->lock) > > > > Changes to peer->vpn_addrs are

[PATCH v2 1/2] rcuscale: Do a proper cleanup if kfree_scale_init() fails

2024-11-13 Thread Uladzislau Rezki (Sony)
A static analyzer for C, Smatch, reports and triggers below warnings: kernel/rcu/rcuscale.c:1215 rcu_scale_init() warn: inconsistent returns 'global &fullstop_mutex'. The checker complains about, we do not unlock the "fullstop_mutex" mutex, in case of hitting below error path: ... if

[PATCH v2 2/2] rcuscale: Remove redundant WARN_ON_ONCE() splat

2024-11-13 Thread Uladzislau Rezki (Sony)
There are two places where WARN_ON_ONCE() is called two times in the error paths. One which is encapsulated into if() condition and another one, which is unnecessary, is placed in the brackets. Remove an extra WARN_ON_ONCE() splat which is in brackets. Reviewed-by: Paul E. McKenney Signed-off-by

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 13/11/2024 at 13:29:55 +03, Dmitry Antipov wrote: > On 11/12/24 4:41 PM, Lizhi Xu wrote: > >> mutex_lock(&sdata->local->iflist_mtx); >> +if (list_empty(&sdata->local->interfaces)) { >> +mutex_unlock(&sdata->local->iflist_mtx); >> +return; >> +} >> list

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 14:20:45 +0100, Antonio Quartulli wrote: > On 05/11/2024 19:10, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: > > > @@ -105,6 +132,9 @@ void ovpn_decrypt_post(void *data, int ret) > > > goto drop; > > > } > > > + /* keep trac

Re: [PATCH net-next v11 06/23] ovpn: introduce the ovpn_peer object

2024-11-13 Thread Sabrina Dubroca
2024-11-13, 03:37:13 +0200, Sergey Ryazanov wrote: > On 12.11.2024 19:31, Sabrina Dubroca wrote: > > 2024-11-10, 15:38:27 +0200, Sergey Ryazanov wrote: > > > On 29.10.2024 12:47, Antonio Quartulli wrote: > > > > An ovpn_peer object holds the whole status of a remote peer > > > > (regardless whether

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-13 Thread Luis Chamberlain
On Wed, Nov 13, 2024 at 07:49:24AM +0100, Christophe Leroy wrote: > > > Le 12/11/2024 à 21:28, Luis Chamberlain a écrit : > > On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: > > > diff --git a/kernel/module/main.c b/kernel/module/main.c > > > index 1bf4b0db291b..b603c9647e73 100

[PATCH V2] mac802154: check local interfaces before deleting sdata list

2024-11-13 Thread Lizhi Xu
syzkaller reported a corrupted list in ieee802154_if_remove. [1] Remove an IEEE 802.15.4 network interface after unregister an IEEE 802.15.4 hardware device from the system. CPU0CPU1 genl_family_rcv_msg_doit

Re: [PATCHv2 net] selftests: wireguard: load nf_conntrack if it's not present

2024-11-13 Thread Simon Horman
On Tue, Nov 12, 2024 at 09:48:27AM +, Hangbin Liu wrote: > Some distros may not load nf_conntrack by default, which will cause > subsequent nf_conntrack settings to fail. Let's load this module if it's > not loaded by default. > > Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") >

Re: [PATCH v2] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-13 Thread Suraj Sonawane
On 13/11/24 10:21, Alison Schofield wrote: On Tue, Nov 12, 2024 at 10:50:35AM +0530, Suraj Sonawane wrote: Fix an issue detected by syzbot with KASAN: BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ core.c:416 [inline] BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 12/11/2024 at 21:41:45 +08, Lizhi Xu wrote: > On Tue, 12 Nov 2024 12:01:21 +0100, Miquel Raynal wrote: >>On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: >> >>> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: > syzkaller re

Re: [PATCH v2] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-13 Thread Suraj Sonawane
On 13/11/24 10:08, Alison Schofield wrote: On Tue, Nov 12, 2024 at 10:50:35AM +0530, Suraj Sonawane wrote: Fix an issue detected by syzbot with KASAN: BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ core.c:416 [inline] BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e