From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DABC74A5B1D for ; Wed, 21 Jan 2026 13:56:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769003807; cv=none; b=nFc6XK/g4lxLH6AaIElEZj6l/aE+q+2YOrYV6ThqPLfsag4Iq/iWXiYKdC4MEOl0HSQ1RX2c7unmHLub4vGQJlHst2MDTXvIJXeCbxhyVKuyZX8zvOcVS/S3YBsl3DP8fzBVddKoIfDgHDD8i2o+Vn3rwAwiUAzF2ddcs8kJnEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769003807; c=relaxed/simple; bh=Yx9d+72s+3PAs53j871MkFNTMAXeIK1rMQQP5/r8Bm4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Zph/9NsYEI4kXFZPn8iIcs3tG5NljjKis5E2A0KuS7yYD6QiVUagjEWRfuKCnHLzPsBr9VZtmN2QP8Acd8CA8/lO7rx41OKUqizHE79P4eBlQeB/vb3+aZLD/9Rml6kSc3WiVfvE9+lBycbC0U71cvzhRGrWxKS+c+gQ4zXdvtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=H8UzsxhU; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="H8UzsxhU" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-8c6a0702b86so660798785a.0 for ; Wed, 21 Jan 2026 05:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1769003804; x=1769608604; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Avz0zhItUvROQy3aeBayHRvtD6/6o32+NQiPJhA08ug=; b=H8UzsxhUFbFGHNp9wMFiBbuYWaCHVH2tYwneO0Wwkd/2zjLrtAazD6c43qjJ4gEjxL 2OI3Z96r7eB+SIXEJ+CuZ0nhSzPH1EPa7kb6Y1LsJMfBuoD/UDEaqYUa+v638b+Y3GtX VTLnqZoBwiOMdp3DMAqilhMtU7u4WTiRlNIcuyh0bwJA813FiqgOyoFwK1Mf5ru/8tTB Pa4XV9l/KcTNjw66f9eNHjqvAupeQ3OVFXmo1KKBgvmbcajT+Uo9fCbyXhChBXSCAT06 RfQ7Hmp+VZIro9lyEFEDfsTkYxoysoLWTPmnt+BO7W4drlESQ4v4ObS3+tJl1wSrwUa9 +3BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769003804; x=1769608604; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Avz0zhItUvROQy3aeBayHRvtD6/6o32+NQiPJhA08ug=; b=WAdtoyhKuEtYbTuimruGKqgG8qgL2wzptyg8c1AHrd7VAzspayUijLPuNONTdZlsIu 3kXpqcdZlQIK8rH6d7TUZt52ZGNDbVmoYQ0gzE7/9Z/3aSfI4IyWr/yMgbZKGa5cjJ79 aCbIB2djFi2f3x+WGFJwXj74zD9SgfGCvztdBl77zN7LX1N9E8NYTjaY284YWrceEro2 DRr5iWoDLzVOigiPkVnwSe2C8+sdX17LNXLGvP/EwKQCtdjvfPB27zEKFZFBKAvgqlZg DLNBSNaGkcduYIPImeyJtTbo27F0iGvjZZv2VI7aeWBLSwfcWDyTaykQJvsPNAD601Mx jZTA== X-Forwarded-Encrypted: i=1; AJvYcCVI/2vqpKSiRbYuWQanU0EgHIUOQDnu7FuBUR8Iafx/sgAl23GEUdNWZ+cScKzcCwOiuB/CTlV7KPk4Mbg=@vger.kernel.org X-Gm-Message-State: AOJu0YzbY0dgqxKT4TiFmeEsNv5IgdLQqm+yZbEn6NuWCbQ9E7m2eUKm Tlc0T4NDKYzORLOUWq+BYwZEdYwFvqv7pEmih2RuDS7Fm4R5ShnkQV8CCBHN/nfirOk= X-Gm-Gg: AZuq6aK+IOp4jiiRq16KeZ9E/WW2eHDUHqpbq6hDtiHEA90Cn4cOgkGxfzBHLQ7oeEH wqptXBFsUB8LDuBHh/B7lmbIkjIUw4w941srYMEz/VEtv4QM3Dn6GW/QNfiaSLO6Tony6VCZxFD K9zCTKvIC2jqjPH/IOfLWrKmvJtB8ziZZhi/SgLjK40wD/hNihFmnmc6GkEFp9FOhBrURRLCRXF ED3t0tNXKFz66iJuEkhDzB5COqCExQKjyIdNobML2kPfuftjYzHBXdDS7E/goigbDxbgjdI1h5T 3Xno22FAcNlETTdXQoNZUg3YWXCY/glapEFKkzm3CpZ49QpPLqP8/IyHFv+VAxgG73T6nrw25Tw /e3b8P3xtxDtoFpylM/gEIIh1wdI8s/CZnRctSjx+qwvvmXa4D9K3eCdvud/kMMfcgGVu0lB5Oc HE5p2sWoJhunE+1G7DcWiFQPM9F3aKxbRw4uVCo1iVdxvem/qycuqFPrELdhGVj/4UiHE= X-Received: by 2002:a05:620a:1013:b0:8c6:a814:726b with SMTP id af79cd13be357-8c6a814748dmr1789323485a.75.1769003804452; Wed, 21 Jan 2026 05:56:44 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-112-119.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.112.119]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8942e6a9d97sm125563246d6.34.2026.01.21.05.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 05:56:43 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1viYhP-00000006E7g-1MyT; Wed, 21 Jan 2026 09:56:43 -0400 Date: Wed, 21 Jan 2026 09:56:43 -0400 From: Jason Gunthorpe To: Leon Romanovsky Cc: Edward Srouji , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Yishai Hadas Subject: Re: [PATCH rdma-next 1/2] RDMA/uverbs: Add DMABUF object type and operations Message-ID: <20260121135643.GA961572@ziepe.ca> References: <20260108-dmabuf-export-v1-0-6d47d46580d3@nvidia.com> <20260108-dmabuf-export-v1-1-6d47d46580d3@nvidia.com> <20260120181520.GS961572@ziepe.ca> <20260121083246.GV13201@unreal> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260121083246.GV13201@unreal> 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. > > 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. Jason