mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hang Nan <2122295973@qq.com>
To: netdev-bot+sinfo@kernel.org
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	matttbe@kernel.org, martineau@kernel.org, geliang@kernel.org,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, kuniyu@google.com,
	willemb@google.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, 2122295973@qq.com
Subject: Re: [PATCH net v4 0/3] mptcp token hash ordering and token 0 lookups
Date: Mon, 16 Nov 2026 22:58:20 +0800	[thread overview]
Message-ID: <tencent_5497455DD4DAF310EB3F8121517EE9A69B0A@qq.com> (raw)
In-Reply-To: <20261115155747.178858-1-2122295973@qq.com>

Thanks.  The missing information is now in the cover letter of v5, which I
am posting for a different reason as well (a new KUnit case, see below),
so this is not a repost just to answer this mail.

Short version, per patch:

1/3 acquire ordering: theoretical.  No syzbot report, no KCSAN splat, no
    reproducer.  KCSAN cannot observe it (it does not model reordering of
    marked accesses), and on x86-64 both variants compile to the same
    lock cmpxchg, so there is nothing to observe on that hardware.  The
    evidence is instruction level: on arm64 the CAS becomes CASA.

2/3 token 0: theoretical, found by static analysis.  It now carries a
    KUnit case, which is the closest thing to a trigger that exists
    without winning the race: the test builds the state a dying or
    freshly allocated socket presents to a reader (hashed in bucket 0,
    carrying token 0) and asserts that the lookup does not return it.

      # Subtest: mptcp-token
      ok 1 mptcp_token_test_req_basic
      ok 2 mptcp_token_test_msk_basic
      ok 3 mptcp_token_test_accept
      ok 4 mptcp_token_test_destroyed
      ok 5 mptcp_token_test_zero
      # mptcp-token: pass:5 fail:0 skip:0 total:5

    With the guard reverted, the same kernel reports

      # mptcp_token_test_zero: EXPECTATION FAILED at net/mptcp/token_test.c:180
      not ok 5 mptcp_token_test_zero
      # mptcp-token: pass:4 fail:1 skip:0 total:5

    so the case does fail without the fix; it is not a test that passes
    either way.

3/3 iterator slot check: theoretical as well, and the consumers are
    netlink paths that need privileges in the target network namespace.

Both runs are a defconfig x86-64 kernel with CONFIG_MPTCP=y and
CONFIG_MPTCP_KUNIT_TEST=y, booted under qemu with
kunit.filter_glob=mptcp-token.


  parent reply	other threads:[~2026-11-16 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261115155747.178858-1-2122295973@qq.com>
2026-11-15 15:57 ` [PATCH net v4 1/3] net: mptcp: take token lookup references with acquire ordering Hang Nan
2026-11-15 15:57 ` [PATCH net v4 2/3] net: mptcp: reject token 0 in mptcp_token_get_sock() Hang Nan
2026-11-15 15:57 ` [PATCH net v4 3/3] net: mptcp: verify the token slot in mptcp_token_iter_next() Hang Nan
2026-11-16 12:20 ` [PATCH net v4 0/3] mptcp token hash ordering and token 0 lookups Hang Nan
2026-11-16 14:58 ` Hang Nan [this message]
2026-11-15 15:57 Hang Nan
2026-11-15 20:12 ` netdev-bot+sinfo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_5497455DD4DAF310EB3F8121517EE9A69B0A@qq.com \
    --to=2122295973@qq.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®