From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796218093; b=SUOn56LS4KdnWepTR84nN2jtt0eppGD1ThYO6l4/gE2OWHZn2AkJNUfiOF8KSjapAeNd WqkjNMNCzv6FdnFQ70lzJxeweiabmqAjuMz3LOgBZPJPMl2uF2MeAZ8Fq8fPyD1s7JIuB dcq8unihtkfKL0vMOMNrS3VeOePHEIbGe5caUl2K5FtVMdgnyMt3JsRQ0S5pId5S8Hnpe BUDqK7DewwT1BvktfGR5MV+78LT6Dw0W+l92GT8gWxCn/hRLUWsgNc8AijgRmCCXLk1V+ 2B/0It6UIUPcGu8VguDDGtpjCOJ99+7LW2N12dIY6vm71sY9fdu4DnneEh4s/uGBfwA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796218093; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=Fw6jEzbZbdyE6MN41EU3uCeE2CwbFcW9gtBfk1fjTvY=; b=qvGRBsFB4aGFlQfJQvXuBLwC4meywXIW1FdTVOQ4pl/T6GNuWH/I67fc3yi101Vyrbps vKGQKrqkh2oAh6vxet0CUDfrQ03cv8YFGf8kzOlgcP0fWuULjKjh2uhWz59X8Ra41Bdv5 hQCsAAZQj9ag7IkzmYwhexaCO1rwsOjWWdwWX0CzQ9LWk68g3MezPPqczJx8+FfZ0/xI0 xxf66lLUYWVEy3rYJyju4zXDKDlhZbjNPEObOcqYkIwmfZAbhKA/J3Elx9ip/aveo6eRe QjmzCOB6/JN3fJRHQynqUgG1B98UIx+hSt+8iKLp7/Qv2Xe+hRQ6jXdDsPuQUFF/7QQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b="GaZuUW/V"; arc=none smtp.remote-ip=209.85.160.182 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9043C606A31A for ; Wed, 2 Dec 2026 13:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9043C606A31A 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.a=rsa-sha256 header.s=google header.b=GaZuUW/V Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-55d30c054dfso124768931cf.0 for ; Wed, 02 Dec 2026 05:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796218091; x=1796822891; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Fw6jEzbZbdyE6MN41EU3uCeE2CwbFcW9gtBfk1fjTvY=; b=GaZuUW/VbpsuXrAp4O8vjKaj2ZaxZU6vKh+j6lmjp23QMUBkkU2Ss44xibknd/Nv01 uHgmN8/RPIqEpAK+9fQFlI5uwK+QzML09R7fIVe4tqIlFuddmXa/aO2fhjQUtuOv8afS DVUvPRXIN0rh/Qc5zX3kKwbpKtsCZi6BX0/kMHVXC8s8OfL3vbTPXh2lFDpQUN0J90u7 CsqnlgxpU0cnY5QFKricMP899RuSdSO4C+WlPRq5EJ3QBPdMdIXegK70MPNLtTVLDfkP D/lIUGCeZpA91dR7jgbpQtrvVd9AnaXw6uIbFLKcZ/oZMM8xs/xVl3+JqzKLFgYxFjgD Wsqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796218092; x=1796822892; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=Fw6jEzbZbdyE6MN41EU3uCeE2CwbFcW9gtBfk1fjTvY=; b=AgEVUN/wWOq7h/iqDwzijpWg+w0mGA89os+QdJQDW6hUootI1iv4pcwbwtTMZtrXMz N1/eT8QsnTqzrfixWOMlS9Z3r34ztZxYs6WqiOU0Nwtk64l4pon4mfsUzuBen0mHz4uU 8rcNiCaR9KDfZ/g1XQrJ8dbYoOpMV+myQWFYOgAs8JJdBxpxKn0lTnYvg8pinxaTtxgP 7a9WqXfwqx2PyYajfU53D6amR7Qf9YcPBsYF5DfEaRY/2+Rm034SkJOSkt93I6I/yTen jTfr2XmeFvflZIhVrsk50LmSlZCm+fT1uIwVp5zLr0pikCkP1UbhTwfPUx1Pg/0AyUPA oZYA== X-Forwarded-Encrypted: i=1; AL+hErFhFj5vXAtcppKAOHkGptcg9jluGnndduTU2QMKdPMMO2fWmqp9XS1qiSubbVtkm6B2mYtfpcbdl64+@vger.kernel.org X-Gm-Message-State: APuU4Z+t+czW+/yDDMZN+x+bCD+PaUQ8D2Y8LAuCUE4B0UmUSq39w326 pbJzGMELXgIiAj5gb8yX6zjtkFi7nm5+w56a4M35T3TWO96iCfSToordsztM6fJt22k= X-Gm-Gg: AZFdTZdHZlSoW5G5vIuxAcxdxrv0bbW1tAYFv5wB3lThMViaw6kbxwdTXaTeS6DFifx t/wu8hoOrKqBu9vy7SQ98lLGkTCrXI68K8CGCPCuMP138Kw8Gua99a1943KEJI/NWd7VXd0DkpH 1zF9VCxouOnqxN05ZEggbSLkPHp+rbW9NIpLJ96AUbfSry7t+fojmVS4M+Q+bkySRpgDQD/azTg KuudsmTW7A/R0GVwF1/qg5GseDFDI60xbKUd+huqroXbzZJUTjq+7gREVlQbwOBB7I95hymZbK8 uEarlvHsf34UZbLwgULL5gzyJ1oXq+4VNKBEIP54rPMRoeFIHNlXsz5hKJN0G/0/ecdyIQh84yb l614uplmMP80nfbHoIu+HlvLNP/txwQgOu57wtrGG6SxM/5ETXPT3WB9W7gI8Nb05C2QiTswROh erVw2CeCm49T1BweLzyrQGGZKD5iCpeQap0TAAB9eUhliu+fuDDQ9GGjsgVYCdEnC92GvjS9Tox WrVIxrUIy3pz8YRQ+4j3xY0Vwt3A54rboyfqFwIT42S89XhYsgct7roLjm9GhpTnGp9rXNzduGv jQUB X-Received: by 2002:a05:622a:8413:20b0:55d:8490:b561 with SMTP id d75a77b69052e-55d8490bbb8mr532300271cf.62.1796218091635; Wed, 02 Dec 2026 05:28:11 -0800 (PST) Received: from ziepe.ca ([142.177.118.84]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55da87b3ba8sm237111041cf.1.2026.12.02.05.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 05:28:11 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xYkNW-00000003bp0-0chd; Wed, 02 Dec 2026 09:28:10 -0400 Date: Wed, 2 Dec 2026 09:28:10 -0400 From: Jason Gunthorpe To: Alistair Popple Cc: Dave Airlie , Christian =?utf-8?B?S8O2bmln?= , Sumit Semwal , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , Simona Vetter , Matthew Brost , Vivek Kasireddy , Dongwon Kim , Kevin Tian , Xu Yilun , Karl Mehltretter , Baolu Lu , Felix Kuehling , Alex Deucher , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Mina Almasry , netdev@vger.kernel.org, Alexey Kardashevskiy , zhipingz@meta.com, treding@nvidia.com, jhubbard@nvidia.com, chaitanyak@nvidia.com, Leon Romanovsky Subject: Re: [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type Message-ID: <20261202132810.GE351887@ziepe.ca> References: <20f5fb10-b71a-40f9-bbb2-f99b4002bf08@amd.com> <53a32383-4cf6-42ac-bbd5-476e69a3be5f@amd.com> <20261202013043.GC351887@ziepe.ca> X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 02:54:07PM +1100, Alistair Popple wrote: > So what I'm hearing is that the exporter should be unmapping as a defense > against bad importers. I can definitely understand why that might be useful, > especially as some kind of debug thing, but I don't think we should be basing > the whole API design around the concept we can't trust importer to implement the > contract correctly. Especially as that defense might not actually exist in a lot > of cases anyway (eg. IOMMU disabled), in which case you have no choice but to > trust the importer got things right. +1 > I also sense there might be a deeper belief that the mapping of a resource > (ie. the IOVA) is something owned by the resource rather than the user of that > resource. Well, this would be wrong. The IOVA is owned by the DMA API, the DMA API is owned by its bound driver. In the kernel it is *never* owned by the memory object being mapped by it. Jason