[PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage

Geliang Tang posted 10 patches 5 days, 14 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1788099847.git.tanggeliang@kylinos.cn
There is a newer version of this series
include/net/tcp.h                             |   1 +
net/ipv4/tcp.c                                |   9 +-
net/mptcp/fastopen.c                          |  17 +-
net/mptcp/protocol.c                          | 339 ++++++++++++------
net/mptcp/protocol.h                          |  21 +-
net/mptcp/subflow.c                           |  19 +
.../selftests/net/mptcp/mptcp_sockopt.c       |   1 +
7 files changed, 288 insertions(+), 119 deletions(-)
[PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage
Posted by Geliang Tang 5 days, 14 hours ago
From: Geliang Tang <tanggeliang@kylinos.cn>

v11:
 - __mptcp_move_skb(): gate __mptcp_sync_rcv_sequence() on
   test_and_clear_bit(MPTCP_SYNC_SEQ) so the dummy mapping is only re-based
   after ack_seq = iasn.
 - a new patch to set and test SOCK_DONE.
 - use SOCK_DONE in mptcp_inq_hint() and mptcp_inq().

v10:
 - Drop "mptcp: use atomic64_t for locklessly accessed u64 fields"
   (v9 patch 1) and the squash to bpf_burst test (v9 patch 11).
   Series reduced from 11 to 9 patches.
 - Revert all atomic64_read()/atomic64_set() on msk->ack_seq back to
   plain reads and WRITE_ONCE() in patches 1-4. Remove the local u64
   ack_seq variables that only existed to hold atomic64_read() results.
 - mptcp_inq_hint: move test_bit(MPTCP_SYNC_SEQ) inside mptcp_data_lock()
   to close the race between the flag check and the ack_seq read. Revert
   atomic64_read() to plain msk->ack_seq under the lock.
 - mptcp_inq (patch 6): use READ_ONCE() for both ack_seq and copied_seq
   instead of atomic64_read(). Add comment for the FIN subtraction,
   mirroring tcp_inq(). Update commit log.

v9:
 - Extend atomic64_t conversion from only msk->ack_seq to all locklessly
   accessed u64 fields: write_seq, snd_nxt, snd_una, wnd_end,
   bytes_received, bytes_consumed.
 - Add mptcp_data_lock() in mptcp_inq_hint() to read ack_seq and
   copied_seq atomically.
 - Add read_copied field and drain it under mptcp_data_lock() in
   mptcp_read_complete() to fix the BH vs worker data race.
 - New patches: mptcp_inq/peek_len and sendmsg_locked proto_ops.
 - Squash to "selftests/bpf: Add bpf_burst scheduler & test".
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787827525.git.tanggeliang@kylinos.cn/

v8:
 - check MPTCP_SYNC_SEQ in mptcp_inq_hint:
       if (hint_val >= INT_MAX) {
               if (test_bit(MPTCP_SYNC_SEQ, &msk->cb_flags))
                       return 0;
               return INT_MAX;
       }
 - rename mptcp_sock_rate_check_app_limited to
   mptcp_rate_check_app_limited.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787644449.git.tanggeliang@kylinos.cn/

v7:
 - Patch 1 is a new one to fix the existing issue Sashiko mentioned -
   using atomic64_t for msk->ack_seq.
 - Fix the map_subflow_seq setting in fallback mode in patch 4.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787537436.git.tanggeliang@kylinos.cn/

v6:
 - Memory ordering for MPTCP_SYNC_SEQ: Add smp_wmb() before set_bit() in
   subflow_set_remote_key() and smp_rmb() after test_and_clear_bit() in
   __mptcp_move_skb() and mptcp_release_cb() to prevent data races on
   weakly-ordered architectures, ensuring ack_seq updates are visible
   before the flag is set and readers see the updated sequence after
   observing the flag.
 - Lockdep nested locking: Use lock_sock_fast_nested(ssk) instead of
   lock_sock_fast(ssk) in mptcp_sock_rate_check_app_limited() to suppress
   false positive recursive locking warnings when acquiring subflow socket
   locks while holding the parent MPTCP socket lock.
 - Receive window advertisement order: Swap mptcp_rcv_space_adjust() and
   mptcp_cleanup_rbuf() in mptcp_read_complete() to expand the receive
   buffer before evaluating window updates, ensuring ACKs advertise the
   new (larger) window size instead of delaying the advertisement until
   the next cycle.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787446274.git.tanggeliang@kylinos.cn/

v5:
 - only patch 3 changed.
 - Fallback offset underflow: Initialize MPTCP sequence space to 0 in
   mptcp_propagate_state() when mp_opt == NULL, ensuring SKB's map_seq
   starts from 0 to match msk->copied_seq and prevent offset calculation
   underflow in fallback mode.
 - Stale peek_seq: Move peek_seq recomputation into the mptcp_move_skbs()
   continue path and add another recomputation after sk_wait_data(),
   ensuring peek_seq stays synchronized with msk->copied_seq updates from
   MPTCP_SYNC_SEQ processing in both paths.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787368526.git.tanggeliang@kylinos.cn/

v4:
 - mptcp_recvmsg: move the peek_seq recompute from after sk_wait_data()
   to before the mptcp_move_skbs() continue check.
   mptcp_move_skbs() -> __mptcp_move_skb() may shift the head skb's
   map_seq to the IASN frame via __mptcp_sync_rcv_sequence(); if
   'continue' then exits the loop, the recompute is skipped, and the
   next __mptcp_recvmsg_mskq() computes offset with peek_seq in the old
   frame minus map_seq in the new frame. The underflow makes the offset
   test fail and the skb is skipped (and mptcp_recv_skb() actually frees
   the TFO skb via mptcp_eat_recv_skb()).
 - Make all three MPTCP_SYNC_SEQ bit accesses atomic:
   - subflow_set_remote_key:   __set_bit            -> set_bit
   - __mptcp_move_skb:         __test_and_clear_bit -> test_and_clear_bit
   - mptcp_release_cb:         __test_and_clear_bit -> test_and_clear_bit
   The flag is set in BH under mptcp_data_lock() (msk slock held) and
   cleared in user context under lock_sock() slow path (only owned=1,
   slock not held). The non-atomic RMW on the two sides races, which can
   lose the IASN sync.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1787295147.git.tanggeliang@kylinos.cn/

v3:
 - Patch 2, handle "offset" in __mptcp_sync_rcv_sequence().
 - Patch 3, update __mptcp_move_skb() in response to Sashiko comments:

 	if (__test_and_clear_bit(MPTCP_SYNC_SEQ, &msk->cb_flags))
		msk->copied_seq += mptcp_iasn(msk);

 - Patch 4, replace after64() to after() in mptcp_prune_ofo_queue(). The
   pre-existing issue raised by Sashiko regarding changing the type of
   ack_seq to atomic64_t is not addressed in this series.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1786445142.git.tanggeliang@kylinos.cn/

v2:
 - Patch 3, updated in response to Sashiko comments:

        if (unlikely(msk->rcvd_dummy_seq)) {
                msk->copied_seq += mptcp_iasn(msk);
                __mptcp_sync_rcv_sequence(sk);
                /* Release cb() would otherwise re-base copied_seq
                 * again.
                 */
                test_and_clear_bit(MPTCP_SYNC_SEQ, &msk->cb_flags);
        }

        /* Skip the already peeked data. */
        if (offset >= skb->len) {
                *last = skb;
                continue;
        }
 - Patch 5, replaced with Paolo's patch.
 - Patch 6, 7, new patches addressing app-limited conditions.
 - The patch "trim the duplicated skb head at receive enqueue" has been
   dropped, as it is no longer needed after Paolo updated the "mptcp:
   out-of-order queue pruning" series.
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1786158416.git.tanggeliang@kylinos.cn/

v1:
 - https://patchwork.kernel.org/project/mptcp/cover/cover.1785150300.git.tanggeliang@kylinos.cn/

The goal of this series is to reduce the differences between TCP and MPTCP
for TLS usage, in preparation for adding TLS over MPTCP support in the
future.

In previous versions [1], a struct tls_prot_ops was defined to represent
the interface differences between TCP and MPTCP, which contained the
following callbacks:

	struct sk_buff *(*recv_skb)(struct sock *sk, u32 *off);
	bool (*lock_is_held)(struct sock *sk);
	void (*read_done)(struct sock *sk, size_t len);
	u32 (*get_skb_seq)(struct sk_buff *skb);
	int (*skb_get_header)(const struct sk_buff *skb, int offset,
	                      void *to, int len);
	bool (*epollin_ready)(const struct sock *sk);
	void (*check_app_limited)(struct sock *sk);

In reality, some of these callbacks are unnecessary. This series aims to
eliminate the get_skb_seq(), skb_get_header(), and lock_is_held()
callbacks.

The first four patches come from Paolo's "mptcp: address stall under memory
pressure" series v5 [2], with only minor cleanup from my side.

They remove the CB offset field and sync the MPTCP skb CB layout with the
TCP one, so that we can obtain the TCP or MPTCP sequence number in a
unified way, e.g.:

	struct tls_skb_cb {
	    u32 seq;
	};

	#define TLS_SKB_CB(__skb) ((struct tls_skb_cb *)&((__skb)->cb[0]))

This eliminates the need for a separate get_skb_seq() callback.

Building on the removal of the CB offset field, I also added patch 5 that
trims the duplicated skb head at receive enqueue. With that in place, KTLS
can retrieve the record header via skb_copy_bits() directly, so there is no
longer any need for a dedicated MPTCP helper like mptcp_skb_get_header().
The skb_get_header() callback can thus be removed.

Patch 6 defers sk_data_ready to the worker, which avoids recursive locking
when TLS calls back into MPTCP under mptcp_data_lock(). With this change,
the lock_is_held() callback is no longer needed and can be removed.

[1]
https://patchwork.kernel.org/project/mptcp/cover/cover.1782123118.git.tanggeliang@kylinos.cn/
[2]
https://patchwork.kernel.org/project/mptcp/cover/cover.1778446731.git.pabeni@redhat.com/

Geliang Tang (5):
  mptcp: align FIN handling with TCP via SOCK_DONE
  mptcp: implement peek_len for proto_ops
  mptcp: add sendmsg_locked to proto_ops
  mptcp: track app-limited state in mptcp_sendmsg
  selftests: mptcp: sockopt: check app_limited

Paolo Abeni (5):
  mptcp: drop the mptcp_ooo_try_coalesce() helper
  mptcp: drop the cant_coalesce CB field
  mptcp: remove CB offset field
  mptcp: sync mptcp skb cb layout with tcp one
  mptcp: defer read_sock cleanup to mptcp_worker

 include/net/tcp.h                             |   1 +
 net/ipv4/tcp.c                                |   9 +-
 net/mptcp/fastopen.c                          |  17 +-
 net/mptcp/protocol.c                          | 339 ++++++++++++------
 net/mptcp/protocol.h                          |  21 +-
 net/mptcp/subflow.c                           |  19 +
 .../selftests/net/mptcp/mptcp_sockopt.c       |   1 +
 7 files changed, 288 insertions(+), 119 deletions(-)

-- 
2.53.0
Re: [PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage
Posted by Geliang Tang 5 days, 1 hour ago
Hi Paolo, Matt,

On Sun, 2026-08-30 at 22:32 +0800, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v11:
>  - __mptcp_move_skb(): gate __mptcp_sync_rcv_sequence() on
>    test_and_clear_bit(MPTCP_SYNC_SEQ) so the dummy mapping is only
> re-based
>    after ack_seq = iasn.
>  - a new patch to set and test SOCK_DONE.
>  - use SOCK_DONE in mptcp_inq_hint() and mptcp_inq().
> 
> v10:
>  - Drop "mptcp: use atomic64_t for locklessly accessed u64 fields"
>    (v9 patch 1) and the squash to bpf_burst test (v9 patch 11).
>    Series reduced from 11 to 9 patches.
>  - Revert all atomic64_read()/atomic64_set() on msk->ack_seq back to
>    plain reads and WRITE_ONCE() in patches 1-4. Remove the local u64
>    ack_seq variables that only existed to hold atomic64_read()
> results.
>  - mptcp_inq_hint: move test_bit(MPTCP_SYNC_SEQ) inside
> mptcp_data_lock()
>    to close the race between the flag check and the ack_seq read.
> Revert
>    atomic64_read() to plain msk->ack_seq under the lock.
>  - mptcp_inq (patch 6): use READ_ONCE() for both ack_seq and
> copied_seq
>    instead of atomic64_read(). Add comment for the FIN subtraction,
>    mirroring tcp_inq(). Update commit log.
> 
> v9:
>  - Extend atomic64_t conversion from only msk->ack_seq to all
> locklessly
>    accessed u64 fields: write_seq, snd_nxt, snd_una, wnd_end,
>    bytes_received, bytes_consumed.
>  - Add mptcp_data_lock() in mptcp_inq_hint() to read ack_seq and
>    copied_seq atomically.
>  - Add read_copied field and drain it under mptcp_data_lock() in
>    mptcp_read_complete() to fix the BH vs worker data race.
>  - New patches: mptcp_inq/peek_len and sendmsg_locked proto_ops.
>  - Squash to "selftests/bpf: Add bpf_burst scheduler & test".
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787827525.git.tanggeliang@kylinos.cn/
> 
> v8:
>  - check MPTCP_SYNC_SEQ in mptcp_inq_hint:
>        if (hint_val >= INT_MAX) {
>                if (test_bit(MPTCP_SYNC_SEQ, &msk->cb_flags))
>                        return 0;
>                return INT_MAX;
>        }
>  - rename mptcp_sock_rate_check_app_limited to
>    mptcp_rate_check_app_limited.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787644449.git.tanggeliang@kylinos.cn/
> 
> v7:
>  - Patch 1 is a new one to fix the existing issue Sashiko mentioned -
>    using atomic64_t for msk->ack_seq.
>  - Fix the map_subflow_seq setting in fallback mode in patch 4.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787537436.git.tanggeliang@kylinos.cn/
> 
> v6:
>  - Memory ordering for MPTCP_SYNC_SEQ: Add smp_wmb() before set_bit()
> in
>    subflow_set_remote_key() and smp_rmb() after test_and_clear_bit()
> in
>    __mptcp_move_skb() and mptcp_release_cb() to prevent data races on
>    weakly-ordered architectures, ensuring ack_seq updates are visible
>    before the flag is set and readers see the updated sequence after
>    observing the flag.
>  - Lockdep nested locking: Use lock_sock_fast_nested(ssk) instead of
>    lock_sock_fast(ssk) in mptcp_sock_rate_check_app_limited() to
> suppress
>    false positive recursive locking warnings when acquiring subflow
> socket
>    locks while holding the parent MPTCP socket lock.
>  - Receive window advertisement order: Swap mptcp_rcv_space_adjust()
> and
>    mptcp_cleanup_rbuf() in mptcp_read_complete() to expand the
> receive
>    buffer before evaluating window updates, ensuring ACKs advertise
> the
>    new (larger) window size instead of delaying the advertisement
> until
>    the next cycle.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787446274.git.tanggeliang@kylinos.cn/
> 
> v5:
>  - only patch 3 changed.
>  - Fallback offset underflow: Initialize MPTCP sequence space to 0 in
>    mptcp_propagate_state() when mp_opt == NULL, ensuring SKB's
> map_seq
>    starts from 0 to match msk->copied_seq and prevent offset
> calculation
>    underflow in fallback mode.
>  - Stale peek_seq: Move peek_seq recomputation into the
> mptcp_move_skbs()
>    continue path and add another recomputation after sk_wait_data(),
>    ensuring peek_seq stays synchronized with msk->copied_seq updates
> from
>    MPTCP_SYNC_SEQ processing in both paths.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787368526.git.tanggeliang@kylinos.cn/
> 
> v4:
>  - mptcp_recvmsg: move the peek_seq recompute from after
> sk_wait_data()
>    to before the mptcp_move_skbs() continue check.
>    mptcp_move_skbs() -> __mptcp_move_skb() may shift the head skb's
>    map_seq to the IASN frame via __mptcp_sync_rcv_sequence(); if
>    'continue' then exits the loop, the recompute is skipped, and the
>    next __mptcp_recvmsg_mskq() computes offset with peek_seq in the
> old
>    frame minus map_seq in the new frame. The underflow makes the
> offset
>    test fail and the skb is skipped (and mptcp_recv_skb() actually
> frees
>    the TFO skb via mptcp_eat_recv_skb()).
>  - Make all three MPTCP_SYNC_SEQ bit accesses atomic:
>    - subflow_set_remote_key:   __set_bit            -> set_bit
>    - __mptcp_move_skb:         __test_and_clear_bit ->
> test_and_clear_bit
>    - mptcp_release_cb:         __test_and_clear_bit ->
> test_and_clear_bit
>    The flag is set in BH under mptcp_data_lock() (msk slock held) and
>    cleared in user context under lock_sock() slow path (only owned=1,
>    slock not held). The non-atomic RMW on the two sides races, which
> can
>    lose the IASN sync.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1787295147.git.tanggeliang@kylinos.cn/
> 
> v3:
>  - Patch 2, handle "offset" in __mptcp_sync_rcv_sequence().
>  - Patch 3, update __mptcp_move_skb() in response to Sashiko
> comments:
> 
>  	if (__test_and_clear_bit(MPTCP_SYNC_SEQ, &msk->cb_flags))
> 		msk->copied_seq += mptcp_iasn(msk);
> 
>  - Patch 4, replace after64() to after() in mptcp_prune_ofo_queue().
> The
>    pre-existing issue raised by Sashiko regarding changing the type
> of
>    ack_seq to atomic64_t is not addressed in this series.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1786445142.git.tanggeliang@kylinos.cn/
> 
> v2:
>  - Patch 3, updated in response to Sashiko comments:
> 
>         if (unlikely(msk->rcvd_dummy_seq)) {
>                 msk->copied_seq += mptcp_iasn(msk);
>                 __mptcp_sync_rcv_sequence(sk);
>                 /* Release cb() would otherwise re-base copied_seq
>                  * again.
>                  */
>                 test_and_clear_bit(MPTCP_SYNC_SEQ, &msk->cb_flags);
>         }
> 
>         /* Skip the already peeked data. */
>         if (offset >= skb->len) {
>                 *last = skb;
>                 continue;
>         }
>  - Patch 5, replaced with Paolo's patch.
>  - Patch 6, 7, new patches addressing app-limited conditions.
>  - The patch "trim the duplicated skb head at receive enqueue" has
> been
>    dropped, as it is no longer needed after Paolo updated the "mptcp:
>    out-of-order queue pruning" series.
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1786158416.git.tanggeliang@kylinos.cn/
> 
> v1:
>  -
> https://patchwork.kernel.org/project/mptcp/cover/cover.1785150300.git.tanggeliang@kylinos.cn/
> 
> The goal of this series is to reduce the differences between TCP and
> MPTCP
> for TLS usage, in preparation for adding TLS over MPTCP support in
> the
> future.
> 
> In previous versions [1], a struct tls_prot_ops was defined to
> represent
> the interface differences between TCP and MPTCP, which contained the
> following callbacks:
> 
> 	struct sk_buff *(*recv_skb)(struct sock *sk, u32 *off);
> 	bool (*lock_is_held)(struct sock *sk);
> 	void (*read_done)(struct sock *sk, size_t len);
> 	u32 (*get_skb_seq)(struct sk_buff *skb);
> 	int (*skb_get_header)(const struct sk_buff *skb, int offset,
> 	                      void *to, int len);
> 	bool (*epollin_ready)(const struct sock *sk);
> 	void (*check_app_limited)(struct sock *sk);
> 
> In reality, some of these callbacks are unnecessary. This series aims
> to
> eliminate the get_skb_seq(), skb_get_header(), and lock_is_held()
> callbacks.
> 
> The first four patches come from Paolo's "mptcp: address stall under
> memory
> pressure" series v5 [2], with only minor cleanup from my side.
> 
> They remove the CB offset field and sync the MPTCP skb CB layout with
> the
> TCP one, so that we can obtain the TCP or MPTCP sequence number in a
> unified way, e.g.:
> 
> 	struct tls_skb_cb {
> 	    u32 seq;
> 	};
> 
> 	#define TLS_SKB_CB(__skb) ((struct tls_skb_cb *)&((__skb)-
> >cb[0]))
> 
> This eliminates the need for a separate get_skb_seq() callback.
> 
> Building on the removal of the CB offset field, I also added patch 5
> that
> trims the duplicated skb head at receive enqueue. With that in place,
> KTLS
> can retrieve the record header via skb_copy_bits() directly, so there
> is no
> longer any need for a dedicated MPTCP helper like
> mptcp_skb_get_header().
> The skb_get_header() callback can thus be removed.
> 
> Patch 6 defers sk_data_ready to the worker, which avoids recursive
> locking
> when TLS calls back into MPTCP under mptcp_data_lock(). With this
> change,
> the lock_is_held() callback is no longer needed and can be removed.
> 
> [1]
> https://patchwork.kernel.org/project/mptcp/cover/cover.1782123118.git.tanggeliang@kylinos.cn/
> [2]
> https://patchwork.kernel.org/project/mptcp/cover/cover.1778446731.git.pabeni@redhat.com/
> 
> Geliang Tang (5):
>   mptcp: align FIN handling with TCP via SOCK_DONE
>   mptcp: implement peek_len for proto_ops
>   mptcp: add sendmsg_locked to proto_ops
>   mptcp: track app-limited state in mptcp_sendmsg
>   selftests: mptcp: sockopt: check app_limited
> 
> Paolo Abeni (5):
>   mptcp: drop the mptcp_ooo_try_coalesce() helper
>   mptcp: drop the cant_coalesce CB field
>   mptcp: remove CB offset field
>   mptcp: sync mptcp skb cb layout with tcp one
>   mptcp: defer read_sock cleanup to mptcp_worker

Sashiko no longer has any further review comments on these five patches
from Paolo in v11. Could you please help review them? If everything
looks good, they can be merged into the export branch first.

Thanks,
-Geliang

> 
>  include/net/tcp.h                             |   1 +
>  net/ipv4/tcp.c                                |   9 +-
>  net/mptcp/fastopen.c                          |  17 +-
>  net/mptcp/protocol.c                          | 339 ++++++++++++----
> --
>  net/mptcp/protocol.h                          |  21 +-
>  net/mptcp/subflow.c                           |  19 +
>  .../selftests/net/mptcp/mptcp_sockopt.c       |   1 +
>  7 files changed, 288 insertions(+), 119 deletions(-)
Re: [PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage
Posted by MPTCP CI 5 days, 13 hours ago
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Unstable: 1 failed test(s): packetdrill_dss ⚠️ 
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Notice: Call Traces at boot time, rebooted and continued ⚠️ 
- KVM Validation: debug (only selftest_mptcp_join): Notice: Call Traces at boot time, rebooted and continued ⚠️ 
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Notice: Call Traces at boot time, rebooted and continued - Notice: Call Traces at shutdown time, ignored and continued ⚠️ 
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/33317921888

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/3e4dc4f936bd
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1153916


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Re: [PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage
Posted by Geliang Tang 4 days, 20 hours ago
Hi Matt,

On Sun, 2026-08-30 at 15:33 +0000, MPTCP CI wrote:
> Hi Geliang,
> 
> Thank you for your modifications, that's great!
> 
> Our CI did some validations and here is its report:
> 
> - KVM Validation: normal (except selftest_mptcp_join): Unstable: 1
> failed test(s): packetdrill_dss ⚠️ 
> - KVM Validation: normal (only selftest_mptcp_join): Success! ✅
> - KVM Validation: debug (except selftest_mptcp_join): Notice: Call
> Traces at boot time, rebooted and continued ⚠️ 
> - KVM Validation: debug (only selftest_mptcp_join): Notice: Call
> Traces at boot time, rebooted and continued ⚠️ 
> - KVM Validation: btf-normal (only bpftest_all): Success! ✅
> - KVM Validation: btf-debug (only bpftest_all): Notice: Call Traces
> at boot time, rebooted and continued - Notice: Call Traces at
> shutdown time, ignored and continued ⚠️ 
> - Task:
> https://github.com/multipath-tcp/mptcp_net-next/actions/runs/33317921888

The latest code triggers a crash when running virtme:

BUG: sleeping function called from invalid context at
include/linux/sched/mm.h:322

[    4.595485][    T1] virtme-ng-init: mount devtmpfs -> /dev: EBUSY:
Device or resource busy
Waiting for the virtme-ng-init to finish
[    4.598085][    T1] virtme-ng-init: Setting hostname to mptcpdev...
[    4.630121][    T1] virtme-ng-init: running systemd-tmpfiles
[    5.434499][   T70] systemd-tmpfile (70) used greatest stack depth:
24904 bytes left
[    5.434526][   T70] BUG: sleeping function called from invalid
context at include/linux/sched/mm.h:322
[    5.434529][   T70] in_atomic(): 1, irqs_disabled(): 1, non_block:
0, pid: 70, name: systemd-tmpfile
[    5.434532][   T70] preempt_count: 2, expected: 0
[    5.434534][   T70] RCU nest depth: 0, expected: 0
[    5.434536][   T70] locks held by systemd-tmpfile/70: 5, last CPU#1:
[    5.434539][   T70]  #0: ffffffff84a3d078 (low_water_lock){+.+.}-
{3:3}, at: do_exit (include/linux/spinlock.h:347)
[    5.434558][   T70]  #1: ffffffff84badda0 (console_lock){+.+.}-
{0:0}, at: vprintk_emit (kernel/printk/printk.c:2478)
[    5.434569][   T70]  #2: ffffffff84bade18 (console_srcu){....}-
{0:0}, at: console_flush_one_record (include/linux/rcupdate.h:314
(discriminator 1))
[    5.434578][   T70]  #3: ffffffff84acd740 (console_owner){....}-
{0:0}, at: console_lock_spinning_enable (kernel/printk/printk.c:1902
(discriminator 1))
[    5.434587][   T70]  #4: ffffffff84acd640 (printk_legacy_map-wait-
type-override){....}-{3:3}, at: console_emit_next_record
(kernel/printk/printk.c:3095 (discriminator 1))
[    5.434596][   T70] irq event stamp: 273968
[    5.434598][   T70] hardirqs last  enabled at (273967):
__down_trylock_console_sem (kernel/printk/printk.c:330 (discriminator
5))
[    5.434604][   T70] hardirqs last disabled at (273968):
console_emit_next_record (kernel/printk/printk.c:3176 (discriminator
7))
[    5.434609][   T70] softirqs last  enabled at (273890):
handle_softirqs (kernel/softirq.c:491)
[    5.434614][   T70] softirqs last disabled at (273865):
__irq_exit_rcu (kernel/softirq.c:679)
[    5.434619][   T70] Preemption disabled at:

I have already fixed this over the weekend and sent the patch to the
virtualization mailing list:

https://lore.kernel.org/virtualization/e084d7ed4c03020da3de5cbe1eb3a0c2055cbbd6.1787966331.git.tanggeliang@kylinos.cn/T/#u

Please consider applying this patch first to avoid CI failures.

Thanks,
-Geliang

> 
> Initiator: Patchew Applier
> Commits:
> https://github.com/multipath-tcp/mptcp_net-next/commits/3e4dc4f936bd
> Patchwork:
> https://patchwork.kernel.org/project/mptcp/list/?series=1153916
> 
> 
> If there are some issues, you can reproduce them using the same
> environment as
> the one used by the CI thanks to a docker image, e.g.:
> 
>     $ cd [kernel source code]
>     $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm
> -it \
>         --pull always mptcp/mptcp-upstream-virtme-docker:latest \
>         auto-normal
> 
> For more details:
> 
>     https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
> 
> 
> Please note that despite all the efforts that have been already done
> to have a
> stable tests suite when executed on a public CI like here, it is
> possible some
> reported issues are not due to your modifications. Still, do not
> hesitate to
> help us improve that ;-)
> 
> Cheers,
> MPTCP GH Action bot
> Bot operated by Matthieu Baerts (NGI0 Core)
Re: [PATCH mptcp-next v11 00/10] Reduce the differences between TCP and MPTCP for TLS usage
Posted by Matthieu Baerts 4 days, 4 hours ago
Hi Geliang,

On 31/08/2026 10:50, Geliang Tang wrote:
> Hi Matt,
> 
> On Sun, 2026-08-30 at 15:33 +0000, MPTCP CI wrote:
>> Hi Geliang,
>>
>> Thank you for your modifications, that's great!
>>
>> Our CI did some validations and here is its report:
>>
>> - KVM Validation: normal (except selftest_mptcp_join): Unstable: 1
>> failed test(s): packetdrill_dss ⚠️ 
>> - KVM Validation: normal (only selftest_mptcp_join): Success! ✅
>> - KVM Validation: debug (except selftest_mptcp_join): Notice: Call
>> Traces at boot time, rebooted and continued ⚠️ 
>> - KVM Validation: debug (only selftest_mptcp_join): Notice: Call
>> Traces at boot time, rebooted and continued ⚠️ 
>> - KVM Validation: btf-normal (only bpftest_all): Success! ✅
>> - KVM Validation: btf-debug (only bpftest_all): Notice: Call Traces
>> at boot time, rebooted and continued - Notice: Call Traces at
>> shutdown time, ignored and continued ⚠️ 
>> - Task:
>> https://github.com/multipath-tcp/mptcp_net-next/actions/runs/33317921888
> 
> The latest code triggers a crash when running virtme:
> 
> BUG: sleeping function called from invalid context at
> include/linux/sched/mm.h:322
> 
> [    4.595485][    T1] virtme-ng-init: mount devtmpfs -> /dev: EBUSY:
> Device or resource busy
> Waiting for the virtme-ng-init to finish
> [    4.598085][    T1] virtme-ng-init: Setting hostname to mptcpdev...
> [    4.630121][    T1] virtme-ng-init: running systemd-tmpfiles
> [    5.434499][   T70] systemd-tmpfile (70) used greatest stack depth:
> 24904 bytes left
> [    5.434526][   T70] BUG: sleeping function called from invalid
> context at include/linux/sched/mm.h:322
> [    5.434529][   T70] in_atomic(): 1, irqs_disabled(): 1, non_block:
> 0, pid: 70, name: systemd-tmpfile
> [    5.434532][   T70] preempt_count: 2, expected: 0
> [    5.434534][   T70] RCU nest depth: 0, expected: 0
> [    5.434536][   T70] locks held by systemd-tmpfile/70: 5, last CPU#1:
> [    5.434539][   T70]  #0: ffffffff84a3d078 (low_water_lock){+.+.}-
> {3:3}, at: do_exit (include/linux/spinlock.h:347)
> [    5.434558][   T70]  #1: ffffffff84badda0 (console_lock){+.+.}-
> {0:0}, at: vprintk_emit (kernel/printk/printk.c:2478)
> [    5.434569][   T70]  #2: ffffffff84bade18 (console_srcu){....}-
> {0:0}, at: console_flush_one_record (include/linux/rcupdate.h:314
> (discriminator 1))
> [    5.434578][   T70]  #3: ffffffff84acd740 (console_owner){....}-
> {0:0}, at: console_lock_spinning_enable (kernel/printk/printk.c:1902
> (discriminator 1))
> [    5.434587][   T70]  #4: ffffffff84acd640 (printk_legacy_map-wait-
> type-override){....}-{3:3}, at: console_emit_next_record
> (kernel/printk/printk.c:3095 (discriminator 1))
> [    5.434596][   T70] irq event stamp: 273968
> [    5.434598][   T70] hardirqs last  enabled at (273967):
> __down_trylock_console_sem (kernel/printk/printk.c:330 (discriminator
> 5))
> [    5.434604][   T70] hardirqs last disabled at (273968):
> console_emit_next_record (kernel/printk/printk.c:3176 (discriminator
> 7))
> [    5.434609][   T70] softirqs last  enabled at (273890):
> handle_softirqs (kernel/softirq.c:491)
> [    5.434614][   T70] softirqs last disabled at (273865):
> __irq_exit_rcu (kernel/softirq.c:679)
> [    5.434619][   T70] Preemption disabled at:
> 
> I have already fixed this over the weekend and sent the patch to the
> virtualization mailing list:
> 
> https://lore.kernel.org/virtualization/e084d7ed4c03020da3de5cbe1eb3a0c2055cbbd6.1787966331.git.tanggeliang@kylinos.cn/T/#u
> 
> Please consider applying this patch first to avoid CI failures.
Thank you for this message and for the fix. It looks like the same patch
has already been sent before on the virtualisation ML. I took the oldest
one because I guess that's the one which will be applied:

https://lore.kernel.org/20260810-serial-v1-1-abbe51602c13@debian.org

New patches for t/upstream-net and t/upstream:
- 37d601ecd030: virtio_console: allocate the port_buffer with the
caller's gfp
- Results: 55dc409a2258..f53fe5e25d9e (export-net)
- Results: b301d9e1afdc..edf6a01ba9f7 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/0c164b6dd50adfb4bb924b9030ab3e529a1b48cc/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/52ef5e042a881a7753cad4d5e3c3f5c15676da17/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.