diff options
| author | Leon Romanovsky <leonro@nvidia.com> | 2026-01-24 21:14:15 +0200 |
|---|---|---|
| committer | Christian König <christian.koenig@amd.com> | 2026-01-27 10:45:11 +0100 |
| commit | 609fc8766d68da10697e1df0514d079d54bf48df (patch) | |
| tree | 6dbd89934d9357f5f80d0adffa01b66daa719e95 /drivers/dma-buf | |
| parent | 95308225e5baeaae1e313816059c59a0036ab6b2 (diff) | |
| download | lwn-609fc8766d68da10697e1df0514d079d54bf48df.tar.gz lwn-609fc8766d68da10697e1df0514d079d54bf48df.zip | |
dma-buf: Always build with DMABUF_MOVE_NOTIFY
DMABUF_MOVE_NOTIFY was introduced in 2018 and has been marked as
experimental and disabled by default ever since. Six years later,
all new importers implement this callback.
It is therefore reasonable to drop CONFIG_DMABUF_MOVE_NOTIFY and
always build DMABUF with support for it enabled.
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20260124-dmabuf-revoke-v5-3-f98fca917e96@nvidia.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/dma-buf')
| -rw-r--r-- | drivers/dma-buf/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/dma-buf/dma-buf.c | 3 |
2 files changed, 1 insertions, 14 deletions
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index 012d22e941d6..8d4f2f89f24e 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -40,18 +40,6 @@ config UDMABUF A driver to let userspace turn memfd regions into dma-bufs. Qemu can use this to create host dmabufs for guest framebuffers. -config DMABUF_MOVE_NOTIFY - bool "Move notify between drivers (EXPERIMENTAL)" - default n - depends on DMA_SHARED_BUFFER - help - Don't pin buffers if the dynamic DMA-buf interface is available on - both the exporter as well as the importer. This fixes a security - problem where userspace is able to pin unrestricted amounts of memory - through DMA-buf. - This is marked experimental because we don't yet have a consistent - execution context and memory management between drivers. - config DMABUF_DEBUG bool "DMA-BUF debug checks" depends on DMA_SHARED_BUFFER diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 1c257607a623..1b301d96f968 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -916,8 +916,7 @@ static bool dma_buf_pin_on_map(struct dma_buf_attachment *attach) { return attach->dmabuf->ops->pin && - (!dma_buf_attachment_is_dynamic(attach) || - !IS_ENABLED(CONFIG_DMABUF_MOVE_NOTIFY)); + !dma_buf_attachment_is_dynamic(attach); } /** |
