From: Andrew Stellman <bugs@stellman-greene.com>
To: Dust Li <dust.li@linux.alibaba.com>,
"D. Wythe" <alibuda@linux.alibaba.com>,
Sidraya Jayagond <sidraya@linux.ibm.com>,
Mahanta Jambigi <mjambigi@linux.ibm.com>
Cc: Tony Lu <tonylu@linux.alibaba.com>,
Wen Gu <guwen@linux.alibaba.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>,
linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net/smc: cap ADD LINK v2 rkeys to the receive limit
Date: Mon, 30 Nov 2026 08:15:49 -0500 [thread overview]
Message-ID: <20261130131549.25764-1-bugs@stellman-greene.com> (raw)
In-Reply-To: <awzd3U0ESwkeze_F@linux.alibaba.com>
On Mon, Nov 30, 2026 at 10:22:21AM +0800, Dust Li wrote:
> How did you force the connection to 508? Connections in a link group
> are supposed to be limited to 255. Did you modified the kernel?
>
> If this comes from a malicious/non-compliant peer bypassing the 255
> limit, we should look closely at the receive path.
Yes, I modified the kernel for that test. A test-only change set the
count to 508 inside smc_llc_fill_ext_v2() and reused one real RMB for
the extra entries, so it shows what the writer does with that count.
It wasn't 508 real connections, and no peer sent anything unusual.
From reading the code, the 255 limit is only enforced for the server
role. smc_conn_create() skips the max_conns and rtoken bitmap check
for a client link group, and smc_rtoken_add() reuses a slot when the
peer repeats an RMB rkey and address. I haven't actually run a case
where a peer gets a client link group past 255, though, so I can't
say for sure it's reachable.
If you'd rather fix this on the receive side or when the connection
is created, I'm happy to rework the patch that way.
Andrew
prev parent reply other threads:[~2026-11-30 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 19:17 [PATCH net] net/smc: cap ADD LINK v2 rkeys to the receive limit Andrew Stellman
2026-11-30 2:22 ` Dust Li
2026-11-30 13:15 ` Andrew Stellman [this message]
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=20261130131549.25764-1-bugs@stellman-greene.com \
--to=bugs@stellman-greene.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@kernel.org \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sidraya@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--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