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: <20251205195009.GN812105@ziepe.ca>
Date: Fri, 5 Dec 2025 15:50:09 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Kevin Tian <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>,
	Will Deacon <will@...nel.org>, Nicolin Chen <nicolinc@...dia.com>,
	Arnd Bergmann <arnd@...db.de>, Robin Murphy <robin.murphy@....com>,
	Lu Baolu <baolu.lu@...ux.intel.com>, Alex Mastro <amastro@...com>,
	iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommufd: fix building without dmabuf

On Thu, Dec 04, 2025 at 11:03:29AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> When DMABUF is disabled, trying to use it causes a link failure:
> 
> x86_64-linux-ld: drivers/iommu/iommufd/io_pagetable.o: in function `iopt_map_file_pages':
> io_pagetable.c:(.text+0x1735): undefined reference to `dma_buf_get'
> x86_64-linux-ld: io_pagetable.c:(.text+0x1775): undefined reference to `dma_buf_put'
> 
> Fixes: 44ebaa1744fd ("iommufd: Accept a DMABUF through IOMMU_IOAS_MAP_FILE")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/iommu/iommufd/io_pagetable.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

I picked this up anyhow since it looked like adding #ifdef stubs to
dma_buf.h was going to be a bigger thing

> +	if (IS_ENABLED(CONFIG_DMABUF_HEAPS))
> +		dmabuf = dma_buf_get(fd);

But this needs to be:

	if (IS_ENABLED(CONFIG_DMA_SHARED_BUFFER))
		dmabuf = dma_buf_get(fd);

I fixed it

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ