+++ /dev/null
-From 746e07b3f2176a625ba494e91d855f2c3a1e9ca1 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sat, 27 Jul 2024 11:04:01 +0200
-Subject: selftests: mptcp: add explicit test case for remove/readd
-
-From: Paolo Abeni <pabeni@redhat.com>
-
-[ Upstream commit b5e2fb832f48bc01d937a053e0550a1465a2f05d ]
-
-Delete and re-create a signal endpoint and ensure that the PM
-actually deletes and re-create the subflow.
-
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Stable-dep-of: 1c2326fcae4f ("selftests: mptcp: join: check re-adding init endp with != id")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- .../testing/selftests/net/mptcp/mptcp_join.sh | 29 +++++++++++++++++++
- 1 file changed, 29 insertions(+)
-
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index a73358d753aa7..4f8b0c0faac96 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3281,6 +3281,35 @@ endpoint_tests()
- chk_subflow_nr "" "after re-add" 2
- kill_tests_wait
- fi
-+
-+ # remove and re-add
-+ if reset "delete re-add signal" &&
-+ mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
-+ pm_nl_set_limits $ns1 1 1
-+ pm_nl_set_limits $ns2 1 1
-+ pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
-+ test_linkfail=4 speed=20 \
-+ run_tests $ns1 $ns2 10.0.1.1 &
-+ local tests_pid=$!
-+
-+ wait_mpj $ns2
-+ pm_nl_check_endpoint "creation" \
-+ $ns1 10.0.2.1 id 1 flags signal
-+ chk_subflow_nr "before delete" 2
-+ chk_mptcp_info subflows 1 subflows 1
-+
-+ pm_nl_del_endpoint $ns1 1 10.0.2.1
-+ sleep 0.5
-+ chk_subflow_nr "after delete" 1
-+ chk_mptcp_info subflows 0 subflows 0
-+
-+ pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
-+ wait_mpj $ns2
-+ chk_subflow_nr "after re-add" 2
-+ chk_mptcp_info subflows 1 subflows 1
-+ mptcp_lib_kill_wait $tests_pid
-+ fi
-+
- }
-
- # [$1: error message]
---
-2.43.0
-
+++ /dev/null
-From 258989bf2bae0317055be62110dde3fa35f0b466 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 28 Aug 2024 08:14:30 +0200
-Subject: selftests: mptcp: join: check re-adding init endp with != id
-
-From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-
-[ Upstream commit 1c2326fcae4f0c5de8ad0d734ced43a8e5f17dac ]
-
-The initial subflow has a special local ID: 0. It is specific per
-connection.
-
-When a global endpoint is deleted and re-added later, it can have a
-different ID, but the kernel should still use the ID 0 if it corresponds
-to the initial address.
-
-This test validates this behaviour: the endpoint linked to the initial
-subflow is removed, and re-added with a different ID.
-
-Note that removing the initial subflow will not decrement the 'subflows'
-counters, which corresponds to the *additional* subflows. On the other
-hand, when the same endpoint is re-added, it will increment this
-counter, as it will be seen as an additional subflow this time.
-
-The 'Fixes' tag here below is the same as the one from the previous
-commit: this patch here is not fixing anything wrong in the selftests,
-but it validates the previous fix for an issue introduced by this commit
-ID.
-
-Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking")
-Cc: stable@vger.kernel.org
-Reviewed-by: Mat Martineau <martineau@kernel.org>
-Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/net/mptcp/mptcp_join.sh | 21 ++++++++++++++++-----
- 1 file changed, 16 insertions(+), 5 deletions(-)
-
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3285,11 +3285,12 @@ endpoint_tests()
- # remove and re-add
- if reset "delete re-add signal" &&
- mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
-- pm_nl_set_limits $ns1 0 2
-- pm_nl_set_limits $ns2 2 2
-+ pm_nl_set_limits $ns1 0 3
-+ pm_nl_set_limits $ns2 3 3
- pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
- # broadcast IP: no packet for this address will be received on ns1
- pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
-+ pm_nl_add_endpoint $ns1 10.0.1.1 id 42 flags signal
- test_linkfail=4 speed=20 \
- run_tests $ns1 $ns2 10.0.1.1 &
- local tests_pid=$!
-@@ -3311,11 +3312,21 @@ endpoint_tests()
- wait_mpj $ns2
- chk_subflow_nr "after re-add" 3
- chk_mptcp_info subflows 2 subflows 2
-+
-+ pm_nl_del_endpoint $ns1 42 10.0.1.1
-+ sleep 0.5
-+ chk_subflow_nr "after delete ID 0" 2
-+ chk_mptcp_info subflows 2 subflows 2
-+
-+ pm_nl_add_endpoint $ns1 10.0.1.1 id 99 flags signal
-+ wait_mpj $ns2
-+ chk_subflow_nr "after re-add" 3
-+ chk_mptcp_info subflows 3 subflows 3
- mptcp_lib_kill_wait $tests_pid
-
-- chk_join_nr 3 3 3
-- chk_add_nr 4 4
-- chk_rm_nr 2 1 invert
-+ chk_join_nr 4 4 4
-+ chk_add_nr 5 5
-+ chk_rm_nr 3 2 invert
- fi
-
- }
+ chk_rm_nr 3 2 invert
fi
- }
+ # flush and re-add
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3312,7 +3312,7 @@ endpoint_tests()
+@@ -3341,7 +3341,7 @@ endpoint_tests()
pm_nl_set_limits $ns2 0 3
pm_nl_add_endpoint $ns2 10.0.1.2 id 1 dev ns2eth1 flags subflow
pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow
wait_mpj $ns2
pm_nl_del_endpoint $ns2 2 10.0.2.2
-@@ -3333,18 +3333,21 @@ endpoint_tests()
+@@ -3362,18 +3362,21 @@ endpoint_tests()
wait_mpj $ns2
chk_subflow_nr "" "after no reject" 3
+ chk_join_nr 6 6 6
+ chk_rm_nr 4 4
fi
+ }
- # remove and re-add
+ chk_join_nr 3 3 3
+ chk_rm_nr 1 1
fi
+ }
- # remove and re-add
+++ /dev/null
-From e506695da52a62d4badd38b4862a98c6c2034e36 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 19 Aug 2024 21:45:20 +0200
-Subject: selftests: mptcp: join: check re-using ID of unused ADD_ADDR
-
-From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-
-[ Upstream commit a13d5aad4dd9a309eecdc33cfd75045bd5f376a3 ]
-
-This test extends "delete re-add signal" to validate the previous
-commit. An extra address is announced by the server, but this address
-cannot be used by the client. The result is that no subflow will be
-established to this address.
-
-Later, the server will delete this extra endpoint, and set a new one,
-with a valid address, but re-using the same ID. Before the previous
-commit, the server would not have been able to announce this new
-address.
-
-While at it, extra checks have been added to validate the expected
-numbers of MPJ, ADD_ADDR and RM_ADDR.
-
-The 'Fixes' tag here below is the same as the one from the previous
-commit: this patch here is not fixing anything wrong in the selftests,
-but it validates the previous fix for an issue introduced by this commit
-ID.
-
-Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink")
-Cc: stable@vger.kernel.org
-Reviewed-by: Mat Martineau <martineau@kernel.org>
-Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
-Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-2-38035d40de5b@kernel.org
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Stable-dep-of: 1c2326fcae4f ("selftests: mptcp: join: check re-adding init endp with != id")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- .../testing/selftests/net/mptcp/mptcp_join.sh | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index 4f8b0c0faac96..0dbbc9e9ed6f6 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3285,9 +3285,11 @@ endpoint_tests()
- # remove and re-add
- if reset "delete re-add signal" &&
- mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
-- pm_nl_set_limits $ns1 1 1
-- pm_nl_set_limits $ns2 1 1
-+ pm_nl_set_limits $ns1 0 2
-+ pm_nl_set_limits $ns2 2 2
- pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
-+ # broadcast IP: no packet for this address will be received on ns1
-+ pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
- test_linkfail=4 speed=20 \
- run_tests $ns1 $ns2 10.0.1.1 &
- local tests_pid=$!
-@@ -3299,15 +3301,21 @@ endpoint_tests()
- chk_mptcp_info subflows 1 subflows 1
-
- pm_nl_del_endpoint $ns1 1 10.0.2.1
-+ pm_nl_del_endpoint $ns1 2 224.0.0.1
- sleep 0.5
- chk_subflow_nr "after delete" 1
- chk_mptcp_info subflows 0 subflows 0
-
-- pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
-+ pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
-+ pm_nl_add_endpoint $ns1 10.0.3.1 id 2 flags signal
- wait_mpj $ns2
-- chk_subflow_nr "after re-add" 2
-- chk_mptcp_info subflows 1 subflows 1
-+ chk_subflow_nr "after re-add" 3
-+ chk_mptcp_info subflows 2 subflows 2
- mptcp_lib_kill_wait $tests_pid
-+
-+ chk_join_nr 3 3 3
-+ chk_add_nr 4 4
-+ chk_rm_nr 2 1 invert
- fi
-
- }
---
-2.43.0
-
+ chk_rm_nr 2 1 invert
fi
- }
+ # flush and re-add
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3308,19 +3308,20 @@ endpoint_tests()
+@@ -3337,19 +3337,20 @@ endpoint_tests()
if reset_with_tcp_filter "delete and re-add" ns2 10.0.3.2 REJECT OUTPUT &&
mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
pm_nl_add_endpoint $ns2 10.0.3.2 id 3 flags subflow
wait_attempt_fail $ns2
-@@ -3332,10 +3333,18 @@ endpoint_tests()
+@@ -3361,10 +3362,18 @@ endpoint_tests()
wait_mpj $ns2
chk_subflow_nr "" "after no reject" 3
+ chk_join_nr 4 4 4
+ chk_rm_nr 2 2
fi
+ }
- # remove and re-add
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -3368,6 +3368,35 @@ endpoint_tests()
- chk_rm_nr 3 2 invert
+@@ -3262,6 +3262,35 @@ userspace_tests()
+ kill_tests_wait
fi
+ # flush and re-add
+ fi
}
- # [$1: error message]
+ endpoint_tests()
asoc-amd-yc-support-mic-on-lenovo-thinkpad-e14-gen-6.patch
mptcp-make-pm_remove_addrs_and_subflows-static.patch
mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch
-selftests-mptcp-add-explicit-test-case-for-remove-re.patch
-selftests-mptcp-join-check-re-using-id-of-unused-add.patch
-selftests-mptcp-join-check-re-adding-init-endp-with-.patch
pci-msi-fix-uaf-in-msi_capability_init.patch
f2fs-fix-to-truncate-preallocated-blocks-in-f2fs_file_open.patch
mptcp-pm-fullmesh-select-the-right-id-later.patch