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: <20260129151241.44i6yt-r@linutronix.de>
Date: Thu, 29 Jan 2026 16:12:41 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Felix Maurer <fmaurer@...hat.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
	jkarrenpalo@...il.com, tglx@...utronix.de, mingo@...nel.org,
	allison.henderson@...cle.com, petrm@...dia.com, antonio@...nvpn.net
Subject: Re: [PATCH net-next v2 8/9] hsr: Update PRP duplicate discard KUnit
 test for new algorithm

On 2026-01-22 15:57:03 [+0100], Felix Maurer wrote:
> With the new duplicate discard algorithm from the earlier patches, the
> KUnit test for the algorithm needs to be updated. The updates are done in a
> way to match the original intends pretty closely. Currently, there is much
> knowledge about the actual algorithm baked into the tests (especially the
> expectations) which may need some redesign in the future.

So the below isn't new but I wasn't aware we have this kunit thing
earlier. It triggers even before your series, just differently now. The
problem seems to be that node member isn't properly initialized. So
lockep complains:

| 1..1
|     KTAP version 1
|     # Subtest: prp_duplicate_discard
|     # module: prp_dup_discard_test
|     1..5
| INFO: trying to register non-static key.
| The code is fine but needs lockdep annotation, or maybe
| you didn't initialize this object before use?
| turning off the locking correctness validator.
…
|  lock_acquire+0xc8/0x210
|  rt_spin_lock+0x2e/0x1e0
|  hsr_check_duplicate+0x40/0xb0
|  prp_dup_discard_forward+0x30/0x180 [prp_dup_discard_test]

It needs:

diff --git a/net/hsr/prp_dup_discard_test.c b/net/hsr/prp_dup_discard_test.c
index a7a5beb52d62f..2ab346d920bbd 100644
--- a/net/hsr/prp_dup_discard_test.c
+++ b/net/hsr/prp_dup_discard_test.c
@@ -27,6 +27,7 @@ static struct prp_test_data *build_prp_test_data(struct kunit *test)
 					     GFP_ATOMIC);
 	KUNIT_EXPECT_NOT_ERR_OR_NULL(test, data);
 	xa_init(&data->node.seq_blocks);
+	spin_lock_init(&data->node.seq_out_lock);
 
 	data->frame.node_src = &data->node;
 	data->frame.port_rcv = &data->port_rcv;

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ