[PATCH mptcp-next 0/3] mptcp: check the protocol with DEBUG_NET

Matthieu Baerts (NGI0) posted 3 patches 5 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20240131-mptcp-check-protocol-v1-0-a06067f0bd08@kernel.org
There is a newer version of this series
include/linux/tcp.h    | 9 +++++++++
net/mptcp/protocol.h   | 9 +++++++++
net/mptcp/token_test.c | 7 ++++++-
3 files changed, 24 insertions(+), 1 deletion(-)
[PATCH mptcp-next 0/3] mptcp: check the protocol with DEBUG_NET
Posted by Matthieu Baerts (NGI0) 5 months, 3 weeks ago
Recently, Paolo fixed a bug where a TCP-specific helper was used with an
MPTCP socket [1]. The bug was not detected by fuzzer or static analysis.

Following this, it has been suggested to add a check, only in debug
mode. This is what this series is doing.

The series has been split to be upstreamed: a preparation patch for
MPTCP, the modification for TCP, then for MPTCP. It is not clear if it
would be OK to add that upstream. If not, we can squash these three
patches in "DO-NOT-MERGE: mptcp: improve code coverage for CI" commit we
have in our export tree.

Note that the MPTCP Token kUnit test needs to be adapted for this new
check. This is what is done in patch 1/3.

Currently, 'WARN_ON()' helper is used. Maybe we want to use the '_ONCE'
version? I didn't use it because this is a DEBUG check, but I can if we
prefer. Or something similar.

Link: https://lore.kernel.org/mptcp/35875ef9cb7194563b580e14c71cc8cb065f846c.1706043786.git.pabeni@redhat.com/ [1]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (3):
      mptcp: token kunit: set protocol
      tcp: check the protocol with DEBUG_NET
      mptcp: check the protocol with DEBUG_NET

 include/linux/tcp.h    | 9 +++++++++
 net/mptcp/protocol.h   | 9 +++++++++
 net/mptcp/token_test.c | 7 ++++++-
 3 files changed, 24 insertions(+), 1 deletion(-)
---
base-commit: 12837771007b672717901b90aa9eb97a0a8c31fa
change-id: 20240131-mptcp-check-protocol-e32e53d04a75

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>