From: Bryam Vargas <hexlabsecurity@proton.me>
To: Alexandra Winter <wintera@linux.ibm.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
"D . Wythe" <alibuda@linux.alibaba.com>,
Mahanta Jambigi <mjambigi@linux.ibm.com>,
"David S . Miller" <davem@davemloft.net>,
Sidraya Jayagond <sidraya@linux.ibm.com>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@kernel.org>,
Dust Li <dust.li@linux.alibaba.com>,
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>
Subject: Re: [PATCH net v3 2/2] net/smc: do not reuse the DMB of a nocopy device
Date: Thu, 03 Dec 2026 06:06:30 +0000 [thread overview]
Message-ID: <20261203060619.416707-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <25c88570-8cd6-4058-b82e-cde76dd6cac8@linux.ibm.com>
On 30.11.26 11:24, Alexandra Winter wrote:
> 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.
Agreed, by reading: the pooled DMB keeps its token, and a peer that
still has the token can write to the DMB. I only measured loopback; I
have no ISM.
> Isn't there some mechanism in SMC that makes sure old date can never be
> read in a re-used dmb?
smc_buf_unuse() zeroes the DMB when the connection ends. That is all I
found, and it does not cover a write that comes later. On loopback the
old peer's CDC lands in the DMB after the next connection has taken
it, and that connection reads EOF while its own client is open.
> 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() ?
Maybe, with two limits. On loopback the old peer is attached to the
DMB and writes its data straight into that memory, so a DMB it still
holds cannot go to another connection, in either function. And a late
attach finds the DMB by its token, so a pooled DMB would need a new
token before it is taken again. I have not tried that.
> Would it make sense to postpone 2/2 and proceed with 1/2?
Yes. v4 is 1/2 alone:
https://lore.kernel.org/all/20261203-b4-disp-b330a4df-v4-1-bafca73822d0@proton.me/
2/2 is not ready as it is anyway: Sashiko flagged a stale descriptor
in it on v3.
Thanks,
Bryam
pw-bot: cr
next prev parent reply other threads:[~2026-12-03 6:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 15:05 [PATCH net v3 0/2] " Bryam Vargas via B4 Relay
2026-11-28 15:05 ` [PATCH net v3 1/2] dibs: loopback: reset the client id when the owner unregisters a DMB Bryam Vargas via B4 Relay
2026-11-28 15:05 ` [PATCH net v3 2/2] net/smc: do not reuse the DMB of a nocopy device Bryam Vargas via B4 Relay
2026-11-30 10:24 ` Alexandra Winter
2026-12-03 6:06 ` Bryam Vargas [this message]
2026-12-02 12:49 ` [PATCH net v3 0/2] " Alexandra Winter
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=20261203060619.416707-1-hexlabsecurity@proton.me \
--to=hexlabsecurity@proton.me \
--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=hidayath@linux.ibm.com \
--cc=horms@kernel.org \
--cc=julianr@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.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=wenjia@linux.ibm.com \
--cc=wintera@linux.ibm.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®