From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.177 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== 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== 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 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 ; Mon, 30 Nov 2026 13:15:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6ED6B606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com 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 Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-55d30c054dfso103059231cf.0 for ; Mon, 30 Nov 2026 05:15:55 -0800 (PST) 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) 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) From: Andrew Stellman To: Dust Li , "D. Wythe" , Sidraya Jayagond , Mahanta Jambigi Cc: Tony Lu , Wen Gu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Willem de Bruijn , 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 Message-ID: <20261130131549.25764-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: <20261128191730.30196-1-bugs@stellman-greene.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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