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: <2025092539-tamper-subtype-2839@gregkh>
Date: Thu, 25 Sep 2025 14:29:55 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Yaxing Guo <guoyaxing@...c.ac.cn>
Cc: linux-kernel@...r.kernel.org, wangran@...c.ac.cn, zhangjian@...c.ac.cn,
	anxu@...c.ac.cn
Subject: Re: [PATCH v2 1/3] uio: Add SVA support for PCI devices via
 uio_pci_generic_sva.c

On Thu, Sep 25, 2025 at 06:40:16PM +0800, Yaxing Guo wrote:
> This patch introduces a new UIO driver, uio_pci_generic_sva, which
> extends the functionality of uio_pci_generic by adding support for
> Shared Virtual Addressing (SVA) when IOMMU is enabled in the system.
> 
> The key enhancement allows PCI devices to directly use user-space virtual
> addresses for DMA operations, eliminating the need for bounce buffers or
> explicit IOVA mapping. This is achieved by leveraging the kernel's IOMMU-SVA
> subsystem, including process address space attachment, page fault handling,
> and shared context management between CPU and device.
> 
> With this driver, userspace applications can perform zero-copy DMA using
> native pointers:
> 
>     void *addr = malloc(N);
>     set_dma_addr((uint64_t)addr);  // Pass user VA directly
>     start_dma();
> 
> The device can now access 'addr' through the IOMMU's PASID-based translation,
> provided that the underlying IOMMU hardware (e.g., Intel VT-d 3.1+, AMD-Vi,
> ARM SMMU, RISCV IOMMU) and platform support SVA.
> 
> Dependencies:
> - CONFIG_IOMMU_SVA must be enabled.
> - The platform must support PRI (Page Request Interface) and PASID.
> - Device drivers/userspace must handle page faults if demand-paging is used.
> 
> The implementation reuses core logic from uio_pci_generic.c while adding
> PASID setting, and integration with the IOMMU SVA APIs.
> 
> Signed-off-by: Yaxing Guo <guoyaxing@...c.ac.cn>
> ---
> Changes in v2:
>   -- Use sysfs_emit() instead of sprintf in pasid_show()
>   -- Use the default attribute list instead of sysfs_create_file
>   -- Add MODULE_DESCRIPTION
>   -- Modify "2024" to "2025" in copyright
> 
>  drivers/uio/uio_pci_generic_sva.c | 192 ++++++++++++++++++++++++++++++
>  1 file changed, 192 insertions(+)
>  create mode 100644 drivers/uio/uio_pci_generic_sva.c
> 
> diff --git a/drivers/uio/uio_pci_generic_sva.c b/drivers/uio/uio_pci_generic_sva.c
> new file mode 100644
> index 000000000000..97e9ab9a081a
> --- /dev/null
> +++ b/drivers/uio/uio_pci_generic_sva.c
> @@ -0,0 +1,192 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * UIO PCI Express sva driver
> + *
> + * Copyright (c) 2025 Beijing Institute of Open Source Chip (BOSC)

Shouldn't that be 2024-2025 if work happened on this in 2024?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ