Skip to content

RFC MPTCP KTLS support

Geliang Tang mptcp netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest17 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17tls: make tls_ctx_create and update_sk_prot staticnet/tls/tls.h net/tls/tls_main.c+2 -40 replies
2/17tls: factor out __tls_build_proto for mptcp supportnet/tls/tls_main.c+24 -220 replies
3/17tls: add protocol dimension to tls operation cachenet/tls/tls_main.c+29 -110 replies
4/17mptcp: add sendmsg_locked to proto_opsnet/mptcp/protocol.c+14 -40 replies
5/17tls: use sendmsg_locked from the underlying socketnet/tls/tls_main.c+1 -10 replies
6/17mptcp: implement peek_len for proto_opsnet/mptcp/protocol.c+34 -00 replies
7/17tls: replace tcp_inq with socket peek_lennet/tls/tls_device.c net/tls/tls_strp.c net/tls/tls_sw.c+9 -50 replies
8/17tls: store original read_sock for non-tcp socketsinclude/net/tls.h net/tls/tls_main.c net/tls/tls_strp.c+5 -10 replies
9/17tls: introduce tls protocol ops structureinclude/net/tls.h net/tls/tls_main.c+115 -10 replies
10/17tls: use protocol ops via tls_contextinclude/net/tls.h net/tls/tls_main.c net/tls/tls_strp.c +1 more+38 -110 replies
11/17mptcp: implement mptcp-specific tls protocol opsinclude/net/mptcp.h include/net/tcp.h net/ipv4/tcp.c +3 more+137 -20 replies
12/17tls: add mptcp support for sk_pollinclude/net/mptcp.h net/mptcp/protocol.c net/tls/tls_main.c+28 -30 replies
13/17tls: disable device offload for mptcp socketsnet/tls/tls_device.c+6 -00 replies
14/17mptcp: update mptcp_check_readable helpernet/mptcp/protocol.c+6 -30 replies
15/17mptcp: implement ulp getsockopt for tls supportnet/mptcp/sockopt.c+34 -00 replies
16/17mptcp: implement ulp setsockopt for tls supportnet/mptcp/protocol.c net/mptcp/sockopt.c+34 -10 replies
17/17selftests: mptcp: connect: use espintcp for ulp testtools/testing/selftests/net/mptcp/config tools/testing/selftests/net/mptcp/mptcp_connect.c+6 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC net-next 00/17] MPTCP KTLS support

From: Geliang Tang <[email protected]>

Prior to this work, MPTCP did not support TLS. The two protocols conflicted because both MPTCP and TLS use the ULP (Upper Layer Protocol) infrastructure in the Linux kernel. ULP settings, including TLS configuration, were disabled in MPTCP. If an application attempted to set TLS for an MPTCP socket, the system would return an error code indicating EOPNOTSUPP (Operation not supported).

This series adds KTLS support for MPTCP. Since no ULP is currently attached to the MPTCP socket (msk), KTLS can be configured directly on the msk rather than on individual subflows. This does not affect its existing communication, and leverages HMAC-based authentication to ensure subflow security.

RFC versions of this series have gone through many iterations on MPTCP mailing list, mainly to address Sashiko's review comments. It is now mostly stable.

A follow-up series will add MPTCP support to the TLS selftests (tools/testing/selftests/net/tls.c). All existing TCP test cases have already been verified to pass over MPTCP as well.

The primary validation use case for this work is NVMe over MPTCP with KTLS. NVMe over TCP is a storage protocol that transports NVMe commands over TCP. By combining it with MPTCP, multipath capabilities for storage traffic are gained. By adding KTLS, the storage traffic is secured with encryption. Although NVMe over MPTCP is still under active development, I have already verified that KTLS operates correctly on top of it.

All feedback is welcome.

Gang Yan (1):
mptcp: update mptcp_check_readable helper

Geliang Tang (16):
tls: make tls_ctx_create and update_sk_prot static
tls: factor out __tls_build_proto for mptcp support
tls: add protocol dimension to tls operation cache
mptcp: add sendmsg_locked to proto_ops
tls: use sendmsg_locked from the underlying socket
mptcp: implement peek_len for proto_ops
tls: replace tcp_inq with socket peek_len
tls: store original read_sock for non-tcp sockets
tls: introduce tls protocol ops structure
tls: use protocol ops via tls_context
mptcp: implement mptcp-specific tls protocol ops
tls: add mptcp support for sk_poll
tls: disable device offload for mptcp sockets
mptcp: implement ulp getsockopt for tls support
mptcp: implement ulp setsockopt for tls support
selftests: mptcp: connect: use espintcp for ulp test

 include/net/mptcp.h                           |  11 +
 include/net/tcp.h                             |   1 +
 include/net/tls.h                             |  19 ++
 net/ipv4/tcp.c                                |   9 +-
 net/mptcp/protocol.c                          | 180 +++++++++++++-
 net/mptcp/protocol.h                          |   1 +
 net/mptcp/sockopt.c                           |  68 +++++-
 net/tls/tls.h                                 |   2 -
 net/tls/tls_device.c                          |  10 +-
 net/tls/tls_main.c                            | 227 +++++++++++++++---
 net/tls/tls_strp.c                            |  35 ++-
 net/tls/tls_sw.c                              |  10 +-
 tools/testing/selftests/net/mptcp/config      |   4 +
 .../selftests/net/mptcp/mptcp_connect.c       |   4 +-
 14 files changed, 516 insertions(+), 65 deletions(-)
Signature · 1 line
2.53.0