Article View: linux.kernel.netdev
Article #24552Re: [PATCH net v3 2/2] net/smc: do not reuse the DMB of a nocopy device
From: Alexandra Winter
Date: Mon, 30 Nov 2026 10:24
Date: Mon, 30 Nov 2026 10:24
49 lines
14411 bytes
14411 bytes
On 28.11.26 16:05, Bryam Vargas via B4 Relay wrote:
> From: Bryam Vargas <hexlabsecurity@proton.me>
>
> With DMB nocopy (the dibs loopback device) the peer writes into the RMB
> through its own attachment, and it can attach late. smc_buf_unuse() puts
> the DMB back in the link group's pool with its token still registered
> while the old peer can still write to it: the next connection that takes
> it gets the old peer's CDCs, and a peer that attaches after the other
> end gave up lands in another connection's DMB.
>
I think the same concept applies when the smcd device does not support
nocopy (ISM devices). When the dmb is in link group's unused pool, while
it is still registered with the dibs device, the peer can write into the
dmb.
> Unregister a nocopy DMB when the connection ends instead of pooling it:
> the next connection gets a new DMB and token, a peer still attached
> keeps the old one until it detaches, and a later attach fails. When the
> link group is off its list smc_conn_free() skips smc_buf_unuse() and the
> link group's free unregisters the DMB: clear conn->rmb_desc there, or a
> retried connect() that cannot allocate its RMB unlinks and frees the
> stale descriptor. Devices without nocopy keep their pool.
>
This idea seems to defeat the whole concept of a reuse pool. If that is
necessary, you may as well remove the whole pool concept for SMC-D (not
sure about SMC-R).
Isn't there some mechanism in SMC that makes sure old date can never be
read in a re-used dmb?
I don't understand all the observed issues in v3 0/2, but maybe some of
them can be solved in __smc_buf_create() instead of smc_buf_unuse() ?
Some of the issues (link group fee or link group terminate) may allpy to
loopback only.
Would it make sense to postpone 2/2 and proceed with 1/2?
smc maintainers please chime in, maybe I misunderstood something here.
> Fixes: ae2be35cbed2 ("net/smc: {at|de}tach sndbuf to peer DMB if supported")
> Cc: stable@vger.kernel.org
> Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
> ---
Technical Details
Message-ID:
<25c88570-8cd6-4058-b82e-cde76dd6cac8@linux.ibm.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374104-linux-kernel-netdev=dewy.ruReferences:
<20261128-b4-disp-2c190c90-v3-0-c566f64196c8@proton.me> <20261128-b4-disp-2c190c90-v3-2-c566f64196c8@proton.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374104-linux-kernel-netdev=dewy.ru
From: wintera@linux.ibm.com (Alexandra Winter)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 2/2] net/smc: do not reuse the DMB of a nocopy
device
Date: Mon, 30 Nov 2026 11:24:41 +0100
Organization: Usenet Network
Message-ID: <25c88570-8cd6-4058-b82e-cde76dd6cac8@linux.ibm.com>
References: <20261128-b4-disp-2c190c90-v3-0-c566f64196c8@proton.me>
<20261128-b4-disp-2c190c90-v3-2-c566f64196c8@proton.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1402824"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8DzyHcBfJ1y4gKZFU/JMblJfEYU= sha256:pOIirwRJKsIYf1HnrwLnvExuoHEDbjDPZefsPjPUbI0=
sha1:oUPoSoJROGOFY5HLCnpHzwIaj1I= sha256:CncsGg/ulSi9uUg9U/dGpoqd3fs8wmsTUuRIOB6ubGI=
Content-Language: en-US
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 398AA125FDC; Mon, 30 Nov 2026 13:25:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
tests=[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=ibm.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 k6hNm0qa3llp;
Mon, 30 Nov 2026 13:25:25 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-374104-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=linux.ibm.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 2CE15125FD9; Mon, 30 Nov 2026 13:25:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 2F062601400; Mon, 30 Nov 2026 10:25:15 +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=1796034310;
b=eVm8xjUBBqTlfw+SqL7qkYw5xGkQez2IWvpPCzX6tzRs2YZ2WFSeIL5xj0S+w6WZ+7lL
Of6td2pogGR/otwY12WjKvMZhD1ItordJXGX0I34eMV1zmmqgCRjkAJJ6OkJ1VZ6tioh0
hjuWiF8OzbamFM5n8ib4U//HP2UrKYorRJ+MgEIb00v6R77TBH2cJ4S2LtgbTt2OmbV/x
DyB0sB5AB0ylIdTr4s6hLZ+DxxkgBkxJupjJ3dy3b932Tfwxv+MmCT0rP02jRdcsSNbYO
yTSOpoQ8f83BFBt9xTd4EXyZE80QQCL9yMEjCtoCaogAlfK38Pk5SLF6E6p4S46vpPQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796034310;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
Received:Received:Received:Received:Received:Received:Message-ID:Date:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:
X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=tehBptJgSjhN6IqqgQrLTsoWypkVnrvjNeB/aRamPYw=;
b=W4R/NHU+6GwCCU0kNIn6+OfTdXN9lB5o5w3DKlzSsT0KxXWmpbbdsn//8Z3VTcuWM0rK
M90julJ5J+JYSllmI6bbVojprio5Bk22INpP/EvqNAxXO9azYkDFhVRzFm8PFcHgXq4Ju
19BH9gsG9skEYU7ImyCjtUxiB8WUGXDw4n/J6a+kSdhfcGmTvQoKtAgsZdm3Ax+UMhYhC
PdZbJChowRY3b9WhPWvsWyWgV+97TEKdrNI1WrrM3LTHi0au8wVus+439N++DLl3Pu7aC
rY3DmRpwH296iv7+IQ5gOM39QyPfUA1rZnbVA5o9b/D1ac1Ti4goqFd27bVRgJppJpA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=pXHShYCy;
dmarc=pass header.from=linux.ibm.com;
spf=pass smtp.mailfrom=linux.ibm.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 C2998606A33B;
Mon, 30 Nov 2026 10:25:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=pXHShYCy
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.156.1
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796034309;
b=d9SWiiFvDb2NCP9t2rji0W+SS69JIxc4AmeZyqB05poiET//rCbUgudeB4NZP40kRdTF
pedirKNJ106eDlWAtEMwoA0UNiqL00Xfy9parP8waaBfhUpfQ260kpmcE110xnTjPOesF
yNjXRpAoUhvIDvoKpjifQjAm3NrTTQacKE2Z8181504y+1C7iJ/jcOHIAMuubn9YdELHo
fIaYzCUxwTTU+mghzkagxPGSHbhxZAMEFVZuqwQnxQk6B202Bx7g9HDWVZMM/l0ZeaGp+
93vvITMyv25RWjwGuY7160pROwyzsEN6y43mu9weOjN+e44WhQJjsv3rXgrulPkFVnQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796034309;
h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:
Received:Received:Received:Received:Message-ID:Date:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:
X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=tehBptJgSjhN6IqqgQrLTsoWypkVnrvjNeB/aRamPYw=;
b=HaQV9EHFBToJbHtw1C9Q77eMJEemIFGWd9IyPXNVz+isV2qI7ZpgAFxfpEDVwmWRmwmg
jxwWaEHffwoq2Lew6FGborlCISxTgBH4pxBeqtfu0HlSOU4yFJksOo/Cq4eW6GOEQ75KT
us0vlZMj2xcKvPf79kTfHoyri5nTti30rVnWwG5Qq5YoxQP6/ItjLK6cWn2Fu/Dg8gGOg
eqAkeRtElV45b632THjU4rXBGRIwY2+XwcyVxJEGOvyPgUWuVcvpELMEqV6u80gmBwzOM
bYP6evcpKYEqbwy04qqm5j/N0WGf/J/IScB9B4D3awdwTyd71BdYutabTmEhU4/WZyA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=linux.ibm.com;
spf=pass smtp.mailfrom=linux.ibm.com;
dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=pXHShYCy;
arc=none smtp.remote-ip=148.163.156.1
X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8277F606A329;
Mon, 30 Nov 2026 10:25:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8277F606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
X-Received: from pps.filterd (m0360083.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU9YYns2931603;
Mon, 30 Nov 2026 10:24:47 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=tehBpt
JgSjhN6IqqgQrLTsoWypkVnrvjNeB/aRamPYw=; b=pXHShYCysxvDazUj09udEM
BR4+zEa90R4gth713GObC/Xk+xaFyQ7I60T9sLffDAr3h5F0x5N3Qy+NMqt+RV6g
eABMm7GM2SnIsv3TnahJvF0rl7GVbAMUySSUzZ/8XMOPfAy6hRfUWpkJQc6MoydR
O/HXqYjOEB9301ikQFYNAsZ4YaGSV0FoziIthZHbuRgn4EeuuqoSmHPJcp+j2X9e
dpvJs4UUqsgb6hEAjai1wJTENyDzx94xg511c0eS1EhbB+knAZNK5jhvf4C4lx0m
2lII3VNgaCJdh4ZeNqGgUy8eqoKHJ62YyCod1JvGtajT5yoTYY8pzROBSzv2Yc+A
==
X-Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4j7pf3qag3-1
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Mon, 30 Nov 2026 10:24:46 +0000 (GMT)
X-Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])
by ppma22.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU9YQQl3289256;
Mon, 30 Nov 2026 10:24:46 GMT
X-Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224])
by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4j89nvckk3-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Mon, 30 Nov 2026 10:24:45 +0000 (GMT)
X-Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105])
by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6AUAOgsj49545622
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Mon, 30 Nov 2026 10:24:42 GMT
X-Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 0C8532004D;
Mon, 30 Nov 2026 10:24:42 +0000 (GMT)
X-Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id B739C2004B;
Mon, 30 Nov 2026 10:24:41 +0000 (GMT)
X-Received: from [9.68.25.8] (unknown [9.68.25.8])
by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP;
Mon, 30 Nov 2026 10:24:41 +0000 (GMT)
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
X-User-Agent: Mozilla Thunderbird
X-Cc: Hidayath Khan <hidayath@linux.ibm.com>, Simon Horman <horms@kernel.org>,
Julian Ruess <julianr@linux.ibm.com>, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, Wenjia Zhang <wenjia@linux.ibm.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Tony Lu <tonylu@linux.alibaba.com>, Wen Gu <guwen@linux.alibaba.com>
X-In-Reply-To: <20261128-b4-disp-2c190c90-v3-2-c566f64196c8@proton.me>
X-TM-AS-GCONF: 00
X-Proofpoint-Reinject: loops=2 maxloops=12
X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA0MCBTYWx0ZWRfX6/mKzSuEVHOU
bYIh+4GF10oPIrxrtkneNGuqGBEhY0IMkfbBYOGJ8K/W76NdxeIanZjv+1D5dBkRBeh1aJNJrf/
fC8OzBnPRWmz3fuBrnNk2eRUdJFd6lA=
X-Proofpoint-ORIG-GUID: xNMxhg-zxQcaGi_xyv71W3xUswOla3Iu
X-Proofpoint-GUID: 2zbAeDO4SCpAo3nUyNOhMyTq7lg5JERC
X-Authority-Analysis: v=2.4 cv=R6eWitRX c=1 sm=1 tr=0 ts=6b0d4eef cx=c_pps
a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17
a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22
a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VwQbUJbxAAAA:8
a=LUNE6GlwEK1ry7LBa5AA:9 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA0MCBTYWx0ZWRfXxlWep+fm8KVW
Rua47r2Vh8UarecsfgUhHc/S4p7ePVGK3MwyJVkBaFd8t5znfvbzG0YjqogZlttXAHY/2eXw5Jz
yRVIfGK93UgWJw/mDkK7fC8MO4kQhN14nDFExKX7h7o2oYV+Y35sIN3L1qGtZIu+4bkumjebxVU
t/jwnTfXr+gyzE/i1g/ktKFBrvXaaRX8pNGnW0PdvatdJQKV60jPvQvG+sJE5P1QbnZcqHSd+ay
Ygiw0PFNxW58HaFU5w6K2kJN5CW36QpSyA9R10dqN7aiahYx9WUw0r2IAqdv9xhEqP/mhHPTROT
auh8vd+aIjAusOgQXhJQaslwmCERg939Ck3qTCMVV/jQ2jFu6gWesEbVRmKOMdl0rNDGuRdRlrN
5pXCk4r8bYqzErNiVwnE0Tq96CEvCe6rmeiSNOU9dgnMglBqxmsZjl/xg8GeCIhuJ+JWILs3Ybr
mC50aQ3NSXcvWz3CrCA==
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49
definitions=2026-11-30_03,2026-11-27_03,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
lowpriorityscore=0 priorityscore=1501 adultscore=0 spamscore=0 bulkscore=0
phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 impostorscore=0
classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0
reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300040