lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f115c91bbc9c6087d8b32917b9e24e3363a91f33.camel@linux.intel.com>
Date: Sun, 18 Jan 2026 15:16:25 +0100
From: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
To: Leon Romanovsky <leon@...nel.org>, Sumit Semwal
 <sumit.semwal@...aro.org>,  Christian König	
 <christian.koenig@....com>, Alex Deucher <alexander.deucher@....com>, David
 Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Gerd Hoffmann
 <kraxel@...hat.com>,  Dmitry Osipenko <dmitry.osipenko@...labora.com>,
 Gurchetan Singh <gurchetansingh@...omium.org>, Chia-I Wu	
 <olvaffe@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
  Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann
 <tzimmermann@...e.de>, Lucas De Marchi	 <lucas.demarchi@...el.com>, Rodrigo
 Vivi <rodrigo.vivi@...el.com>, Jason Gunthorpe <jgg@...pe.ca>, Kevin Tian
 <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>, Will Deacon
 <will@...nel.org>, Robin Murphy <robin.murphy@....com>, Alex Williamson
 <alex@...zbot.org>
Cc: linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org, 
	amd-gfx@...ts.freedesktop.org, virtualization@...ts.linux.dev, 
	intel-xe@...ts.freedesktop.org, linux-rdma@...r.kernel.org, 
	iommu@...ts.linux.dev, kvm@...r.kernel.org
Subject: Re: [PATCH v2 0/4] dma-buf: document revoke mechanism to invalidate
 shared buffers

Hi, Leon,

On Sun, 2026-01-18 at 14:08 +0200, Leon Romanovsky wrote:
> Changelog:
> v2:
>  * Changed series to document the revoke semantics instead of
>    implementing it.
> v1:
> https://patch.msgid.link/20260111-dmabuf-revoke-v1-0-fb4bcc8c259b@nvidia.com
> 
> ---------------------------------------------------------------------
> ----
> This series documents a dma-buf “revoke” mechanism: to allow a dma-
> buf
> exporter to explicitly invalidate (“kill”) a shared buffer after it
> has
> been distributed to importers, so that further CPU and device access
> is
> prevented and importers reliably observe failure.
> 
> The change in this series is to properly document and use existing
> core
> “revoked” state on the dma-buf object and a corresponding exporter-
> triggered
> revoke operation. Once a dma-buf is revoked, new access paths are
> blocked so
> that attempts to DMA-map, vmap, or mmap the buffer fail in a
> consistent way.

This sounds like it does not match how many GPU-drivers use the
move_notify() callback.

move_notify() would typically invalidate any device maps and any
asynchronous part of that invalidation would be complete when the dma-
buf's reservation object becomes idle WRT DMA_RESV_USAGE_BOOKKEEP
fences.

However, the importer could, after obtaining the resv lock, obtain a
new map using dma_buf_map_attachment(), and I'd assume the CPU maps
work in the same way, I.E. move_notify() does not *permanently* revoke
importer access.

/Thomas


> 
> Thanks
> 
> Cc: linux-media@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linaro-mm-sig@...ts.linaro.org
> Cc: linux-kernel@...r.kernel.org
> Cc: amd-gfx@...ts.freedesktop.org
> Cc: virtualization@...ts.linux.dev
> Cc: intel-xe@...ts.freedesktop.org
> Cc: linux-rdma@...r.kernel.org
> Cc: iommu@...ts.linux.dev
> Cc: kvm@...r.kernel.org
> To: Sumit Semwal <sumit.semwal@...aro.org>
> To: Christian König <christian.koenig@....com>
> To: Alex Deucher <alexander.deucher@....com>
> To: David Airlie <airlied@...il.com>
> To: Simona Vetter <simona@...ll.ch>
> To: Gerd Hoffmann <kraxel@...hat.com>
> To: Dmitry Osipenko <dmitry.osipenko@...labora.com>
> To: Gurchetan Singh <gurchetansingh@...omium.org>
> To: Chia-I Wu <olvaffe@...il.com>
> To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> To: Maxime Ripard <mripard@...nel.org>
> To: Thomas Zimmermann <tzimmermann@...e.de>
> To: Lucas De Marchi <lucas.demarchi@...el.com>
> To: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
> To: Rodrigo Vivi <rodrigo.vivi@...el.com>
> To: Jason Gunthorpe <jgg@...pe.ca>
> To: Leon Romanovsky <leon@...nel.org>
> To: Kevin Tian <kevin.tian@...el.com>
> To: Joerg Roedel <joro@...tes.org>
> To: Will Deacon <will@...nel.org>
> To: Robin Murphy <robin.murphy@....com>
> To: Alex Williamson <alex@...zbot.org>
> 
> ---
> Leon Romanovsky (4):
>       dma-buf: Rename .move_notify() callback to a clearer identifier
>       dma-buf: Document revoke semantics
>       iommufd: Require DMABUF revoke semantics
>       vfio: Add pinned interface to perform revoke semantics
> 
>  drivers/dma-buf/dma-buf.c                   |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |  4 ++--
>  drivers/gpu/drm/virtio/virtgpu_prime.c      |  2 +-
>  drivers/gpu/drm/xe/tests/xe_dma_buf.c       |  6 +++---
>  drivers/gpu/drm/xe/xe_dma_buf.c             |  2 +-
>  drivers/infiniband/core/umem_dmabuf.c       |  4 ++--
>  drivers/infiniband/hw/mlx5/mr.c             |  2 +-
>  drivers/iommu/iommufd/pages.c               | 11 +++++++++--
>  drivers/vfio/pci/vfio_pci_dmabuf.c          | 16 ++++++++++++++++
>  include/linux/dma-buf.h                     | 25
> ++++++++++++++++++++++---
>  10 files changed, 60 insertions(+), 18 deletions(-)
> ---
> base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
> change-id: 20251221-dmabuf-revoke-b90ef16e4236
> 
> Best regards,
> --  
> Leon Romanovsky <leonro@...dia.com>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ