Skip to content

mptcp: annotate lockless access

Paolo Abeni mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mptcp: annotate access for msk keysnet/mptcp/options.c net/mptcp/protocol.c net/mptcp/protocol.h +1 more+17 -130 replies
2/5mptcp: annotate lockless access for the tx pathnet/mptcp/options.c net/mptcp/protocol.c net/mptcp/protocol.h+8 -104 replies
3/5mptcp: annotate lockless access for RX path fields.net/mptcp/options.c net/mptcp/protocol.c+14 -110 replies
4/5mptcp: annotate lockless access for tokennet/mptcp/pm.c net/mptcp/pm_netlink.c net/mptcp/protocol.c+7 -70 replies
5/5mptcp: annotate lockless accesses around read-mostly fieldsnet/mptcp/protocol.c net/mptcp/sockopt.c+8 -84 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMat Martineau
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH mptcp-next 0/5] mptcp: annotate lockless access

This is the 2nd preparatory series for the TCP_NOTSENT_LOWAT support. The latter will need tracking more state under the msk data lock

The mptcp locking schema is already quite complex. We need to clarify and make consistent the lockless access already there or later changes will be even harder to follow and understand.

This series goes through all the msk fields accessed in the RX and TX path and makes the lockless annotation consistent with the in-use locking schema.

As a bonus this should fix data races possibly found by fuzzers - even if we haven't seen many such reports so far.

Patch 1/5 hints we could remove local_key and remote_key from the subflow context, and always use the ones in the msk socket, possibly reducing the context memory usage. That change is left over as a possible follow-up.

Paolo Abeni (5):
mptcp: annotate access for msk keys
mptcp: annotate lockless access for the tx path
mptcp: annotate lockless access for RX path fields.
mptcp: annotate lockless access for token
mptcp: annotate lockless accesses around read-mostly fields

 net/mptcp/options.c    | 20 ++++++++---------
 net/mptcp/pm.c         |  2 +-
 net/mptcp/pm_netlink.c | 10 ++++-----
 net/mptcp/protocol.c   | 51 +++++++++++++++++++++---------------------
 net/mptcp/protocol.h   |  8 ++++---
 net/mptcp/sockopt.c    |  2 +-
 net/mptcp/subflow.c    | 10 +++++----
 7 files changed, 54 insertions(+), 49 deletions(-)
Signature · 1 line
2.43.0