[PATCH v2] kunit: Fix potential null dereference in kunit_device_driver_test()

2024-11-14 Thread Gax-c
From: Zichen Xie kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for test_state. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: Zichen Xie Cc: sta...@vger.kernel.org --- v2: Add Cc tag. --

Re: [PATCH] kunit: Fix potential null dereference in kunit_device_driver_test()

2024-11-14 Thread Greg KH
On Thu, Nov 14, 2024 at 11:17:46PM -0600, Gax-c wrote: > From: Zichen Xie > > kunit_kzalloc() may return a NULL pointer, dereferencing it without > NULL check may lead to NULL dereference. > Add a NULL check for test_state. > > Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") > Signe

[PATCH] kunit: Fix potential null dereference in kunit_device_driver_test()

2024-11-14 Thread Gax-c
From: Zichen Xie kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for test_state. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: Zichen Xie --- lib/kunit/kunit-test.c | 2 ++ 1 file change

[PATCH v1] MAINTAINERS: Update KUnit email address for Brendan Higgins

2024-11-14 Thread Brendan Higgins
Update Brendan's email address for the KUnit entry. Signed-off-by: Brendan Higgins --- I am leaving Google and am going through and cleaning up my @google.com address in the relevant places. This patch updates my email address for the KUnit entry. I am removing myself from the ASPEED I2C entry in

Re: [PATCH net-next 0/5] net: make RSS+RXNFC semantics more explicit

2024-11-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 13 Nov 2024 12:13:08 + you wrote: > From: Edward Cree > > The original semantics of ntuple filters with FLOW_RSS were not > fully understood by all drivers, some ignoring the ring_cookie from > the fl

[PATCH net-next] selftests: net: netlink-dumps: validation checks

2024-11-14 Thread Jakub Kicinski
The sanity checks are going to get silently cast to unsigned and always pass. Cast the sizeof to signed size. Signed-off-by: Jakub Kicinski --- CC: linux-kselftest@vger.kernel.org --- tools/testing/selftests/net/netlink-dumps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH net 2/2] selftests: net: test extacks in netlink dumps

2024-11-14 Thread Jakub Kicinski
Test that extacks in dumps work. The test fills up the receive buffer to test both the inline dump (as part of sendmsg()) and delayed one (run during recvmsg()). Use YNL helpers to parse the messages. We need to add the test to YNL file to make sure the right include path are used. Signed-off-by:

[PATCH net-next v4 0/6] tls: implement key updates for TLS1.3

2024-11-14 Thread Sabrina Dubroca
This adds support for receiving KeyUpdate messages (RFC 8446, 4.6.3 [1]). A sender transmits a KeyUpdate message and then changes its TX key. The receiver should react by updating its RX key before processing the next message. This patchset implements key updates by: 1. pausing decryption when a

[PATCH net-next v4 1/6] tls: block decryption when a rekey is pending

2024-11-14 Thread Sabrina Dubroca
When a TLS handshake record carrying a KeyUpdate message is received, all subsequent records will be encrypted with a new key. We need to stop decrypting incoming records with the old key, and wait until userspace provides a new key. Make a note of this in the RX context just after decrypting that

[PATCH net-next v4 6/6] selftests: tls: add rekey tests

2024-11-14 Thread Sabrina Dubroca
v2: add rekey_fail test (reject changing the version/cipher) v3: add rekey_peek_splice following Jakub's comment add rekey+poll tests v4: rebase, new selftests were added check that rekey isn't supported on TLS1.2 Signed-off-by: Sabrina Dubroca --- tools/testing/selftests/net/tls.c | 460

[PATCH net-next v4 2/6] tls: implement rekey for TLS1.3

2024-11-14 Thread Sabrina Dubroca
This adds the possibility to change the key and IV when using TLS1.3. Changing the cipher or TLS version is not supported. Once we have updated the RX key, we can unblock the receive side. If the rekey fails, the context is unmodified and userspace is free to retry the update or close the socket.

[PATCH net-next v4 5/6] selftests: tls: add key_generation argument to tls_crypto_info_init

2024-11-14 Thread Sabrina Dubroca
This allows us to generate different keys, so that we can test that rekey is using the correct one. v3: update for newly added tests v4: update for newly added tests Signed-off-by: Sabrina Dubroca --- tools/testing/selftests/net/tls.c | 20 +++- 1 file changed, 11 insertions(+),

[PATCH net-next v4 4/6] docs: tls: document TLS1.3 key updates

2024-11-14 Thread Sabrina Dubroca
v3: added following Jakub's comment on the cover letter v4: add the new counters Signed-off-by: Sabrina Dubroca --- Documentation/networking/tls.rst | 31 +++ 1 file changed, 31 insertions(+) diff --git a/Documentation/networking/tls.rst b/Documentation/networking/tl

[PATCH net-next v4 3/6] tls: add counters for rekey

2024-11-14 Thread Sabrina Dubroca
This introduces 4 counters to keep track of key updates: Tls{Rx,Tx}Rekey{Ok,Error}. v4: new patch Suggested-by: Jakub Kicinski Signed-off-by: Sabrina Dubroca --- include/uapi/linux/snmp.h | 4 net/tls/tls_main.c| 27 ++- net/tls/tls_proc.c| 4

[PATCH net-next v4 3/7] selftests: net: lib: Move logging from forwarding/lib.sh here

2024-11-14 Thread Petr Machata
Many net selftests invent their own logging helpers. These really should be in a library sourced by these tests. Currently forwarding/lib.sh has a suite of perfectly fine logging helpers, but sourcing a forwarding/ library from a higher-level directory smells of layering violation. In this patch, m

[PATCH net-next v4 6/7] selftests: net: lib: Add kill_process

2024-11-14 Thread Petr Machata
A number of selftests run processes in the background and need to kill them afterwards. Instead for everyone to open-code the kill / wait / redirect mantra, add a helper in net/lib.sh. Convert existing open-code sites. Signed-off-by: Petr Machata Acked-by: Shuah Khan Reviewed-by: Amit Cohen ---

[PATCH net-next v4 7/7] selftests: net: fdb_notify: Add a test for FDB notifications

2024-11-14 Thread Petr Machata
Check that only one notification is produced for various FDB edit operations. Regarding the ip_link_add() and ip_link_master() helpers. This pattern of action plus corresponding defer is bound to come up often, and a dedicated vocabulary to capture it will be handy. tunnel_create() and vlan_create

[PATCH net-next v4 5/7] selftests: net: lib: Move checks from forwarding/lib.sh here

2024-11-14 Thread Petr Machata
For logging to be useful, something has to set RET and retmsg by calling ret_set_ksft_status(). There is a suite of functions to that end in forwarding/lib: check_err, check_fail et.al. Move them to net/lib.sh so that every net test can use them. Existing lib.sh users might be using these same nam

[PATCH net-next v4 4/7] selftests: net: lib: Move tests_run from forwarding/lib.sh here

2024-11-14 Thread Petr Machata
It would be good to use the same mechanism for scheduling and dispatching general net tests as the many forwarding tests already use. To that end, move the logging helpers to net/lib.sh so that every net test can use them. Existing lib.sh users might be using the name themselves. However lib.sh is

Re: [PATCH net-next 3/5] selftest: include dst-ip in ethtool ntuple rules

2024-11-14 Thread Martin Habets
On Wed, Nov 13, 2024 at 12:13:11PM +, edward.c...@amd.com wrote: > > From: Edward Cree > > sfc hardware does not support filters with only ipproto + dst-port; > adding dst-ip to the flow spec allows the rss_ctx test to be run on > these devices. > > Signed-off-by: Edward Cree Reviewed-b

Re: [PATCH net-next 1/5] net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in

2024-11-14 Thread Martin Habets
On Wed, Nov 13, 2024 at 12:13:09PM +, edward.c...@amd.com wrote: > > From: Edward Cree > > Ethtool ntuple filters with FLOW_RSS were originally defined as adding > the base queue ID (ring_cookie) to the value from the indirection table, > so that the same table could distribute over more t