[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c03a82ca-5dc8-407d-a1d4-ac97bb646b2e@nvidia.com>
Date: Wed, 21 Jan 2026 18:27:27 +0200
From: Yishai Hadas <yishaih@...dia.com>
To: Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>
CC: Edward Srouji <edwards@...dia.com>, Sumit Semwal
<sumit.semwal@...aro.org>, Christian König
<christian.koenig@....com>, <linux-kernel@...r.kernel.org>,
<linux-rdma@...r.kernel.org>, <linux-media@...r.kernel.org>,
<dri-devel@...ts.freedesktop.org>, <linaro-mm-sig@...ts.linaro.org>
Subject: Re: [PATCH rdma-next 1/2] RDMA/uverbs: Add DMABUF object type and
operations
On 21/01/2026 15:56, Jason Gunthorpe wrote:
> On Wed, Jan 21, 2026 at 10:32:46AM +0200, Leon Romanovsky wrote:
>>>> +static int uverbs_dmabuf_attach(struct dma_buf *dmabuf,
>>>> + struct dma_buf_attachment *attachment)
>>>> +{
>>>> + struct ib_uverbs_dmabuf_file *priv = dmabuf->priv;
>>>> +
>>>> + if (!attachment->peer2peer)
>>>> + return -EOPNOTSUPP;
>>>> +
>>>> + if (priv->revoked)
>>>> + return -ENODEV;
>>>
>>> This should only be checked in map
>>
>> I disagree with word "only", the more accurate word is "too". There is
>> no need to allow new importer attach if this exporter is marked as
>> revoked.
>
> It must check during map, during attach as well is redundant and a bit
> confusing.
>
OK, let's drop this check as part of the 'attach'.
>>> This should also eventually call the new revoke testing function Leon
>>> is adding
>>
>> We will add it once my series will be accepted.
>
> It should also refuse pinned importers with an always fail pin op
> until we get that done. This is a case like VFIO where the lifecycle
> is more general and I don't want to accidently allow things that
> shouldn't work.
>
Sure, will be part of V1.
Thanks,
Yishai
Powered by blists - more mailing lists