From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796218093; b=F9StcM40wv38vSMaPLihdfiqX+AH7d9h7oav99TrNo27RLm59argnhYUoCGJeTWlQmGp /rmyyEk4wqS2IXFEkzm5PseYaYKfhDrBlE3eZ+fOVXl8rInUKs/9qX+XaYx4OTxEeo2cp dqmv6kwMZ8WsfLwV07UTqtQcwCPX25+k3L7ESfOIzbFLoU6bs417yp/TU6sVprwhZoR2H dRfvb+s80k+WnFbSjR7sIbhthkTT45zsxrOCx9tSagR94qdp+/0CDyHNytIxzHe1RMqTd +CPCbcxVuOiErsvxz+9YXTXaksTnH8NMROjwbT32oMq5TolybX3Xg9yB6Vue3fOQHog== 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=eQzbbCv0B7HFsBT4S48gtSAP0gNq+u7Ln8L0Q3vSLFARZV2TAd6KEJMZHwhB6IPFY3+b OpRPXHgHH6ynq0o3VoRvjXMQLkR7wjBUstpRTCzkxs0jeYBWgQrxv8JzLt4kcFuwIpYgM zK9OqcMaxXT/OxRSU+ivi+tYAPJiywMd/XCF4Ste86zBSuwxLbbBVRQO2X2mxcSYGvGjP C/AvU2h8oq02aD1WeIqbfxIA6hCNy8teCJQVGNYpyiVoWUiFnhWIQbYaXWc613TFoB30Q KHOjQ9q90BjI73GkZmR04zURTxkuAH7j4KcfIumaHD75Bf8sEi+vs6jeEJn730yTx/g== 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.174 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 A5883606A32A for ; Wed, 2 Dec 2026 13:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A5883606A32A 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-f174.google.com with SMTP id d75a77b69052e-55d2d380f6aso138513541cf.2 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=1796218091; x=1796822891; 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=RpU1mWkfCphcG7Fue2I3wigsKAA4soc/DOAzC1IUWItd/w0i+8MGu/wajFhGuA3ixL t3MN7KIX7mAXNV9qCMI8FlPux00q1Aw3lDEE217lw1DY7H7zbm/RXOlWzzx73Xs4JApT Ftlu4OjnDdyZG8lIb1pRnKW90HxLK0S92+AlVfMVJsmv/KedJDxeVWKrDEzunsOCuere crkDkIOh9gNmcPKDF3jDX5pwtmiLQPlw8nwPookCmYXapve6HutuiIHF3YITZ79noQV4 L7h642DEF4zQA+tJNjDGTV3IBetekclmbSsgnMb9ZG3UYRCCseyI6x0IMUetovi5X3hB 2mBw== X-Forwarded-Encrypted: i=1; AL+hErF8up/C34Q8F9wWXkizeKVgetTIqtnUBeJryMdtIF8RCPUhVbrkIFRNxM1iStH8QYRL6Jp9yIvAfi8Bgl4=@vger.kernel.org X-Gm-Message-State: APuU4Z8FLyBYSrxx4DtOa8X8OxEKM03z65/gijU6ly9ejmWk/Dhv8qfo VevVpKWfGUqyFc6Ey0a4vRFpVWWwv9mEzv+IYjzXJfHbym/I6BUgRE15kJShLpLhrQE= X-Gm-Gg: AZFdTZcbrT/ozPKV0LgTlR0bOqlH/li8i1o0QZG03c/NC9FKouLlW3+lRJxmHVyKSGz UZFll3u+ygM7P5yPMyK45dxV/XgBPl/eChb8ZtXgmsa9UCs5794rnhWF/6ER0u0irKHG5ndUAeS ysi+36S3HgOgW0SYcrFDfnAoCF53Q9bxP6I3dI2Ql+fnhO8rTCRXnYYqYSRNBT96MRbqu0rEPI+ gamY3yN3+NvXgIIv/F5AtGHV2F/kuJYk/3m0NrYIbUNgble95eAILjCmMY2LdsYAAwk/Dg7QcyH /ObjrO7xEZYWnOUNPNuQ908MILSU0DVxcyFdlQ8cMolyrUvfZPwIgR1hhFuqa2m8ZeLfefeEGjT 9dq7mjDQb6xdO6BwL/x1MT9Uk0QzZ3ABIhzBXU00oU+u8tjauXuxqz7xNudGTUhfOn0y4D27AAP zGKiZJxRxvW/H0yuodgNgdIy0gPPINdk0xKQYJsQJUp5vuqQ0JqQpD1+4R9s4VqTEk+yW5v9zAZ vUuH3jdXELmjlnAbrloWWt1cQv46DxwDvmRlRNeSH5SbVfWiYrkGGEzLGbF1Ced+ckKaYy53XWG wYv+ 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-kernel@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