Article View: linux.kernel.netdev
Article #24624Re: [PATCH net] net/smc: cap ADD LINK v2 rkeys to the receive limit
From: Andrew Stellman
Date: Mon, 30 Nov 2026 13:15
Date: Mon, 30 Nov 2026 13:15
24 lines
12538 bytes
12538 bytes
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
Technical Details
Message-ID:
<20261130131549.25764-1-bugs@stellman-greene.com>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374210-linux-kernel-netdev=dewy.ruReferences:
<20261128191730.30196-1-bugs@stellman-greene.com> <awzd3U0ESwkeze_F@linux.alibaba.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374210-linux-kernel-netdev=dewy.ru
From: bugs@stellman-greene.com (Andrew Stellman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net/smc: cap ADD LINK v2 rkeys to the receive limit
Date: Mon, 30 Nov 2026 08:15:49 -0500
Organization: Usenet Network
Message-ID: <20261130131549.25764-1-bugs@stellman-greene.com>
References: <20261128191730.30196-1-bugs@stellman-greene.com> <awzd3U0ESwkeze_F@linux.alibaba.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1430832"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:L6SlbMxxK/Qm+KP3XfylNDi92/A= sha256:gJmJ5J48VDc9CW7Q8RCJauala3tHtvgkLhlVX+d2Qoo=
sha1:ki4OQNiZ0EskK1/tcDUDjFqMUgI= sha256:QMacns26zLgRw3YB7v3T85ZcFfjvRwFBBAPO6/ShSIc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 357F1125FE7; Mon, 30 Nov 2026 16:16:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=stellman-greene-com.20260707.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Zjs57xTPcutR;
Mon, 30 Nov 2026 16:16:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374210-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id EE965125FE2; Mon, 30 Nov 2026 16:16:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 051C925A53; Mon, 30 Nov 2026 13:16:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796044561;
b=u4E9GJpadCDg8PAXyJcAyMHpsTxrY4+DLwdU8uaxSyk0EgkKcQ0gDE78Bx4Bs2URfxPI
Ffu7rnkAfV1lJeIfP3F7wsDlMXl2Z67OETNo8nrDewUBPeVQyKEVoKztWvGw2HehsCHKt
BdR9SqQylywybXaAz6zHC5uuQ4uqxPV+D63vItxkEETB5prwPJif++Lzu0VzdEf9rvcWK
cd0hnaLaXskdsBhWxcD5wqSEeWr/9kfRIp6xoEPT/cUISOqXKrORo+M8i8yh0gCarlgPs
G+E8KYkwoKgNToQOP8B+iBS/RPlQX3DBlRllxBizN/1nJ5hriIcRu7eEjyu8laUeAwA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796044561;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Transfer-Encoding;
bh=O66PeBSm+iwUCTeXO0GOgveqYkPVo8gqRTxKoFKY+A8=;
b=i8F3TkxMbdfHYrv2QN176HPaGk3nw7iC8F74lP8W/VSK4coq0cor6s9XhAw8ybZoexR9
2Tk1y4CdvyeGWotLypmhpJoivUzNfk4hLkOI52jJI015xrFBhm9OM8geTjN1PBopyRNtQ
hyOYQ10Aj6z80IGOxfBQwZS9lDXGFyFaATE9E8lqoFef8+JvBJVamEIOsRR6RAhsrBnCs
mJNyCgWMxSw+ueAydx1mPTBzbQHyxQ3QqZ7J6mNtZ8igSX0JPPfi30OXdhP6eNynjRYcc
kZjJNBH8hLlGI1TUYpOwCVpw0bEBY00h56/Anq57udk7sTlzdkwvylvcVGaeh1Fvjfg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=k5QBC4Ld;
dmarc=none header.from=stellman-greene.com;
spf=none smtp.mailfrom=stellman-greene.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A1B4A606A32A;
Mon, 30 Nov 2026 13:16:01 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=k5QBC4Ld
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.177
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796044555;
b=ijoOidNPmCQ6DKg7Yz9nrBryStE79MOf9QVJS+JL9uVnyCA3UEd1X3C7bohGF1SFjf/m
J4yyhSRGCmFBfn1UxyqlybAU+gNhmblJ7wwL0WkEdCAjEdDIYVit+LQhup+W25mYYT/m8
fbZ9EbWnA4tGtuha0X5IFGt2R4wcw0nc0oHjhMFAeQc7ExX9QCRgQPfAOoRY/SSNf5dPc
DfyIUt7SBtxlm665+muMqyvp+qQGzvMdndg7FKv/iVQdLfx0+qma4CUE8FjbI/qD3OiZ7
PNDInMRnsW0UcLPdJSFoauL9d3gLC0cPB+fRDeVKtTobS8cMOPL4etNtLITVQkVC0qA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796044555;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
MIME-Version:Content-Transfer-Encoding;
bh=O66PeBSm+iwUCTeXO0GOgveqYkPVo8gqRTxKoFKY+A8=;
b=mRsWQ7TaMnqtaYgWnlUR1f8uRW7d9SnXG90QH8tABU5YyWzyhmTwdxj+UQokbcDb86eV
HNDFg+0sxbCXzaA++v59b1rXEwWkWNHCidpgmVuw4hAqVN73U1srOx3/IC9KYnQWLsUHj
RMRQEZtw9Tne4+XKwxEWnKDOJTlNk5nzOC2djPnvPnVUWHSRQh3+zH8EY2sYrd+cGR4RP
VqmvEvlC0q/l4Epg0MJYknZ0q6dj/8JjMbfZ57/JhwRDKwMCAzjMqidAMwNXHZ1WFjNkQ
M9b9+0LtDV9fi5bPge5fXaajTr1xf9zv86gCTXwgU1Z9t/hiXw6Nf4DvxMij3QNuL0Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=stellman-greene.com;
spf=none smtp.mailfrom=stellman-greene.com;
dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=k5QBC4Ld;
arc=none smtp.remote-ip=209.85.160.177
X-Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6ED6B606A32F
for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 13:15:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6ED6B606A32F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com
X-Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-55d30c054dfso103059231cf.0
for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 05:15:55 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1796044554; x=1796649354; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=O66PeBSm+iwUCTeXO0GOgveqYkPVo8gqRTxKoFKY+A8=;
b=k5QBC4LdT6ydJFQFyZUxwEa1NHr3rx1eTB80puLHXYT9S+BcMsqGJNoBTCvX4IR9eR
ZiTT+Qf1vqb0pckBYgk6uhyXhymineW8FSZXdXLHSwS4TLOQyXhdaqbT+y4mXgOQ/zSl
iZLj0OsDq+saWlQ1RT9lz588O4/dV8z/yxnqmZjvlL+UIq7TMAiw88VH2DM4fIWVcbLZ
GTXWhAbB7ljACH21bq53tkY/ImDNvv9bUHTbTlhvTVkbUJ8blEWpvcGw09mjI2fbJy4i
gJlZyCh97OEMSa04i1y1Z3hmiY4r4BZERlIzFVUiDSDu2fqLoVli8gB+nf3qDmXEfhkB
3sjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796044554; x=1796649354;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=O66PeBSm+iwUCTeXO0GOgveqYkPVo8gqRTxKoFKY+A8=;
b=Y98Ey6OZ3NF3IvrTww0LlsQQh0c005wKjRtLJRUI01Ni75nCVnhXFMb4pH9tc1TWCR
V3tMeD9Z/FUTx3rGFyA0kz0k/9rue1xuPmwHBcP4HrwxdDJovBOg9yu8ig9MpP89944c
G6Ote5hIW0YeYeMKiSHtYVrFOBeZttH9BbONBMrpN4s6RHaINZIBnpO1FMoKe3HudsVi
GyfURMJQCsiPM8r/5D8iduZKMz5H7AlkiAnRCH3B7AqDpRS2xhmGbsF28v90peetlCi/
nLUoTaSUzrOarwLyULiYtPk3oqzVLZPRwxk8yqBr5boNEyO40T8EnGPSI4V9iBIk0K1T
Mi0w==
X-Forwarded-Encrypted: i=1; AL+hErHCnAhjbcJmJUDcCm9jpoUmPpR6Gf4LkICNnreKwUP64RTrBRYtr/UWfM3MTP183VfAza8tPl4=@vger.kernel.org
X-Gm-Message-State: APuU4Z/rCJpvEspxsBCBAQa8Zew4LyL2Zdq8UiNtExUDmMgCtWWOXO0Q
GYsDpn8AuFo6h8EKFGgK4F69wV0HwlOv5+n+CFENbTelVOb9vpHyBvxXmKreEVw5af0=
X-Gm-Gg: AZFdTZfql6ZQzpLgmyjSIrTAG92yDunvuG0+/Rs6siWzyIZQele+C0d3VzImnK6EYvK
sWKpTci0XtPGYjGkRlDuu4fEFg6p/8BED19roE0SUTyww/Y/kYZD65NHxbPL9AdJIaCUfxoXRk8
EkXViG1mQRJLP15t4amJDcHuxyB0L1EOtTYYc+ih9mbQ54HpM6OQDyeiqqoj41ucWLOR70YStvd
gOmL4Pg5hAuufx+7s+FmKXee2Oo5HJb5k3mL7UjMbZF1ZUdrWjuQV03pjy9gIVg1u8s/22n/xVU
lHFtr4JxkIDtWnA9eEGGbY663mhw5mEIhKhEwRKlWMWyXEgakYGwhEA7OJtqZ3ttzZVuEj19mEh
aT5m73h7BMTCb3kIaIrpO3hYeJZaU53eCypwhGz6xHuaKU7Y8PDtygn40ZgOmIxbA5/Qqiuypzr
W51cJJeMvZYH3zIOn5YGfNYnOI8p+EIp2u/a+CkuI6xTJQWmxSr8XTDZ3oJMR6AsroU2VnlLdWV
+/C/T6BpQbv3la2Pew7M6h2HENbzMfqvdn00+Kbq1mAfsBxTc8VnEdaRYG/BXoNn7quJp5I1TFq
h3VKbal3nuTwnf5GWrwLnQlcSLJBz4VN0IL09azQ+zG3uX954uciJav8tqdhVo2bqLxQUagp50m
1omS6eGPQGhSpVQI/NCNYeWM=
X-Received: by 2002:a05:622a:2297:b0:535:a5fb:6446 with SMTP id d75a77b69052e-55dcd66266bmr235145961cf.64.1796044554204;
Mon, 30 Nov 2026 05:15:54 -0800 (PST)
X-Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:c430:30ff:570a:a90e])
by smtp.gmail.com with ESMTPSA id d75a77b69052e-55d7884b5e9sm283814781cf.18.2026.11.30.05.15.53
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Mon, 30 Nov 2026 05:15:53 -0800 (PST)
X-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
X-Mailer: git-send-email 2.53.0
X-In-Reply-To: <awzd3U0ESwkeze_F@linux.alibaba.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list