From: Jason Gunthorpe <jgg@ziepe.ca>
To: Zhiping Zhang <zhipingz@meta.com>
Cc: Leon Romanovsky <leon@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org,
netdev@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
Yochai Cohen <yochai@nvidia.com>,
Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [RFC 2/2] Set steering-tag directly for PCIe P2P memory access
Date: Wed, 28 Jan 2026 12:57:39 -0400 [thread overview]
Message-ID: <20260128165739.GQ1641016@ziepe.ca> (raw)
In-Reply-To: <20260124011436.172058-1-zhipingz@meta.com>
On Fri, Jan 23, 2026 at 05:13:19PM -0800, Zhiping Zhang wrote:
> On Tue, 13 Jan 2026 12:49:23 -0400, Jason Gunthorpe wrote:
>
> > On Mon, Jan 12, 2026 at 11:43:13PM -0800, Zhiping Zhang wrote:
> > > Got it, thanks for pointing out the security concern! To address this, I
> > > propose that we still pass the TPH value when allocating the dmah, but we add
> > > a verification callback in the reg_mr_dmabuf flow to the dmabuf exporter. This
> > > callback will ensure that the TPH value is correctly linked to the exporting
> > > device’s MMIO, and only the exporter can authorize the TPH/tag association.
>
> > That still sounds messy because we have to protect CPU memory.
>
> > I think you should not use dmah possibly and make it so the dmabuf
> entirely supplies the TPH value.
>
> > Jason
>
> Thanks Jason.
>
> We already have an end-to-end workflow around dmah (perftest → rdma-core → kernel)
> to carry the TPH hint, across multiple patch sets. References:
> https://github.com/linux-rdma/perftest/commit/98bfb3679a1e71ec96df6a6d6c8124ac66ebce25
> https://github.com/linux-rdma/rdma-core/pull/1623/commits
> https://lore.kernel.org/all/cover.1752752567.git.leon@kernel.org/
>
> Given that, I’d like to minimize churn and use the existing dmah-based flow, while
> addressing the CPU-memory protection concern you raised. Would you be open to
> reconsidering this approach?
You would need to initialize the dmah from the dmabuf and then lock it
to only be usable with that dmabuf. It doesn't avoid any dmabuf work,
it just makes the whole flow more convoluted.
Jason
next prev parent reply other threads:[~2026-01-28 16:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 21:37 [RFC 0/2] Set steering-tag directly for PCIe P2P memory access Zhiping Zhang
2025-11-13 21:37 ` [RFC 1/2] " Zhiping Zhang
2025-11-14 13:12 ` Jonathan Cameron
2025-11-18 0:50 ` zhipingz
2025-11-24 21:27 ` Bjorn Helgaas
2025-12-01 17:43 ` Zhiping Zhang
2025-11-13 21:37 ` [RFC 2/2] " Zhiping Zhang
2025-11-17 16:00 ` Jason Gunthorpe
2025-11-20 7:24 ` Zhiping Zhang
2025-11-20 13:11 ` Jason Gunthorpe
2025-12-04 8:10 ` Zhiping Zhang
2025-12-27 19:22 ` Zhiping Zhang
2026-01-06 0:57 ` Jason Gunthorpe
2026-01-13 7:43 ` Zhiping Zhang
2026-01-13 16:49 ` Jason Gunthorpe
2026-01-24 1:13 ` Zhiping Zhang
2026-01-28 16:57 ` Jason Gunthorpe [this message]
2026-02-02 6:04 ` Zhiping Zhang
2026-01-03 5:38 ` [RFC 2/2] [fix] mlx5: modifications for use cases other than CPU Zhiping Zhang
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=20260128165739.GQ1641016@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=bhelgaas@google.com \
--cc=kbusch@kernel.org \
--cc=leon@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yishaih@nvidia.com \
--cc=yochai@nvidia.com \
--cc=zhipingz@meta.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