Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup
@ 2022-09-06 20:55 Matthieu Baerts
  2022-09-06 20:55 ` [PATCH net-next 2/5] selftests: mptcp: move prefix tests of addr_nr_ns2 together Matthieu Baerts
  2022-09-15 10:20 ` [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Matthieu Baerts @ 2022-09-06 20:55 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Mat Martineau,
	Matthieu Baerts, Paolo Abeni, Shuah Khan
  Cc: linux-kernel, linux-kselftest, mptcp, netdev

This series allows privileged Netlink operations from user namespaces. When a
non-root user configures MPTCP endpoints, the memory allocation is now accounted
to this user. See patches 4 and 5.

Apart from that, there are some cleanup:

 - Patch 1 adds a macro to improve code readability

 - Patch 2 regroups similar checks all together

 - Patch 3 uses an explicit boolean instead of a counter to do one more check

Geliang Tang (2):
  selftests: mptcp: move prefix tests of addr_nr_ns2 together
  mptcp: add do_check_data_fin to replace copied

Matthieu Baerts (1):
  mptcp: add mptcp_for_each_subflow_safe helper

Thomas Haller (2):
  mptcp: allow privileged operations from user namespaces
  mptcp: account memory allocation in mptcp_nl_cmd_add_addr() to user

 net/mptcp/pm_netlink.c                        | 22 +++++++++----------
 net/mptcp/protocol.c                          | 13 ++++++-----
 net/mptcp/protocol.h                          |  2 ++
 .../testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++-----
 4 files changed, 24 insertions(+), 23 deletions(-)


base-commit: 03fdb11da92fde0bdc0b6e9c1c642b7414d49e8d
-- 
2.37.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next 2/5] selftests: mptcp: move prefix tests of addr_nr_ns2 together
  2022-09-06 20:55 [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup Matthieu Baerts
@ 2022-09-06 20:55 ` Matthieu Baerts
  2022-09-15 10:20 ` [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2022-09-06 20:55 UTC (permalink / raw)
  To: Mat Martineau, Matthieu Baerts, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan
  Cc: Geliang Tang, netdev, mptcp, linux-kselftest, linux-kernel

From: Geliang Tang <geliang.tang@suse.com>

Move the fullmesh prefix test of addr_nr_ns2 together with its other
prefix tests.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index ff83ef426df5..2957fe414639 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -706,6 +706,7 @@ do_transfer()
 		addr_nr_ns1=${addr_nr_ns1:10}
 	fi
 
+	local flags="subflow"
 	if [[ "${addr_nr_ns2}" = "fastclose_"* ]]; then
 		# disconnect
 		extra_args="$extra_args -I ${addr_nr_ns2:10}"
@@ -713,6 +714,9 @@ do_transfer()
 	elif [[ "${addr_nr_ns2}" = "userspace_"* ]]; then
 		userspace_pm=1
 		addr_nr_ns2=${addr_nr_ns2:10}
+	elif [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then
+		flags="${flags},fullmesh"
+		addr_nr_ns2=${addr_nr_ns2:9}
 	fi
 
 	if [ $userspace_pm -eq 1 ]; then
@@ -832,12 +836,6 @@ do_transfer()
 		fi
 	fi
 
-	local flags="subflow"
-	if [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then
-		flags="${flags},fullmesh"
-		addr_nr_ns2=${addr_nr_ns2:9}
-	fi
-
 	# if newly added endpoints must be deleted, give the background msk
 	# some time to created them
 	[ $addr_nr_ns1 -gt 0 ] && [ $addr_nr_ns2 -lt 0 ] && sleep 1
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup
  2022-09-06 20:55 [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup Matthieu Baerts
  2022-09-06 20:55 ` [PATCH net-next 2/5] selftests: mptcp: move prefix tests of addr_nr_ns2 together Matthieu Baerts
@ 2022-09-15 10:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-15 10:20 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: davem, edumazet, kuba, mathew.j.martineau, pabeni, shuah,
	linux-kernel, linux-kselftest, mptcp, netdev

Hello:

This series was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue,  6 Sep 2022 22:55:38 +0200 you wrote:
> This series allows privileged Netlink operations from user namespaces. When a
> non-root user configures MPTCP endpoints, the memory allocation is now accounted
> to this user. See patches 4 and 5.
> 
> Apart from that, there are some cleanup:
> 
>  - Patch 1 adds a macro to improve code readability
> 
> [...]

Here is the summary with links:
  - [net-next,1/5] mptcp: add mptcp_for_each_subflow_safe helper
    https://git.kernel.org/netdev/net-next/c/5efbf6f7f076
  - [net-next,2/5] selftests: mptcp: move prefix tests of addr_nr_ns2 together
    https://git.kernel.org/netdev/net-next/c/a1c3bdd9c5df
  - [net-next,3/5] mptcp: add do_check_data_fin to replace copied
    https://git.kernel.org/netdev/net-next/c/0522b424c4c2
  - [net-next,4/5] mptcp: allow privileged operations from user namespaces
    https://git.kernel.org/netdev/net-next/c/d15697185404
  - [net-next,5/5] mptcp: account memory allocation in mptcp_nl_cmd_add_addr() to user
    https://git.kernel.org/netdev/net-next/c/3eb9a6b6503c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-15 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 20:55 [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup Matthieu Baerts
2022-09-06 20:55 ` [PATCH net-next 2/5] selftests: mptcp: move prefix tests of addr_nr_ns2 together Matthieu Baerts
2022-09-15 10:20 ` [PATCH net-next 0/5] mptcp: allow privileged operations from user ns & cleanup patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox