mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] mptcp: refactor first subflow init
@ 2023-04-14 14:07 Matthieu Baerts
  2023-04-14 14:08 ` [PATCH net-next 1/5] mptcp: drop unneeded argument Matthieu Baerts
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matthieu Baerts @ 2023-04-14 14:07 UTC (permalink / raw)
  To: mptcp, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Ondrej Mosnacek, netdev, linux-kernel, Matthieu Baerts

This series refactors the initialisation of the first subflow of a
listen socket. The first subflow allocation is no longer done at the
initialisation of the socket but later, when the connection request is
received or when requested by the userspace.

This is needed not just because Paolo likes to refactor things but
because this simplifies the code and makes the behaviour more consistent
with the rest. Also, this is a prerequisite for future patches adding
proper support of SELinux/LSM labels with MPTCP and accept(2).

In [1], Ondrej Mosnacek explained they discovered the (userspace-facing)
sockets returned by accept(2) when using MPTCP always end up with the
label representing the kernel (typically system_u:system_r:kernel_t:s0),
while it would make more sense to inherit the context from the parent
socket (the one that is passed to accept(2)).

Before being able to properly support that on SELinux/LSM side, patches
2-3/5 prepare the code to simplify the patch 4/5 moving the allocation.

Patch 1/5 is a small clean-up seen while working on the series and patch
5/5 is a small improvement when closing unaccepted sockets.

[1] https://lore.kernel.org/netdev/CAFqZXNs2LF-OoQBUiiSEyranJUXkPLcCfBkMkwFeM6qEwMKCTw@mail.gmail.com/

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Paolo Abeni (5):
      mptcp: drop unneeded argument
      mptcp: avoid unneeded __mptcp_nmpc_socket() usage
      mptcp: move fastopen subflow check inside mptcp_sendmsg_fastopen()
      mptcp: move first subflow allocation at mpc access time
      mptcp: fastclose msk when cleaning unaccepted sockets

 net/mptcp/options.c    |  2 +-
 net/mptcp/pm.c         |  4 +--
 net/mptcp/pm_netlink.c |  4 +--
 net/mptcp/protocol.c   | 97 +++++++++++++++++++++++++++++++++-----------------
 net/mptcp/protocol.h   |  4 +--
 net/mptcp/sockopt.c    | 24 +++++++------
 net/mptcp/subflow.c    |  2 +-
 7 files changed, 86 insertions(+), 51 deletions(-)
---
base-commit: e473ea818bfe42cbdf872c41593cbaf24dbf1297
change-id: 20230414-upstream-net-next-20230414-mptcp-refactor-first-subflow-init-ae4659df6ab9

Best regards,
-- 
Matthieu Baerts <matthieu.baerts@tessares.net>


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

end of thread, other threads:[~2023-04-17  7:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 14:07 [PATCH net-next 0/5] mptcp: refactor first subflow init Matthieu Baerts
2023-04-14 14:08 ` [PATCH net-next 1/5] mptcp: drop unneeded argument Matthieu Baerts
2023-04-14 14:08 ` [PATCH net-next 2/5] mptcp: avoid unneeded __mptcp_nmpc_socket() usage Matthieu Baerts
2023-04-14 14:08 ` [PATCH net-next 3/5] mptcp: move fastopen subflow check inside mptcp_sendmsg_fastopen() Matthieu Baerts
2023-04-14 14:08 ` [PATCH net-next 4/5] mptcp: move first subflow allocation at mpc access time Matthieu Baerts
2023-04-14 14:08 ` [PATCH net-next 5/5] mptcp: fastclose msk when cleaning unaccepted sockets Matthieu Baerts
2023-04-17  7:20 ` [PATCH net-next 0/5] mptcp: refactor first subflow init 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

all inboxes | Powered by JetHome®