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: <794814bf-76d3-433c-8dd7-de17c54464c0@arm.com>
Date: Wed, 11 Sep 2024 13:54:11 +0100
From: Robin Murphy <robin.murphy@....com>
To: Leon Romanovsky <leon@...nel.org>, Joerg Roedel <joro@...tes.org>,
 Will Deacon <will@...nel.org>, Christoph Hellwig <hch@....de>,
 Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Leon Romanovsky <leonro@...dia.com>, iommu@...ts.linux.dev,
 linux-kernel@...r.kernel.org,
 NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
Subject: Re: [PATCH] dma-mapping: reliably inform about DMA support for IOMMU

On 2024-09-11 11:15 am, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
> 
> If the DMA IOMMU path is going to be used, the appropriate check should
> return that DMA is supported.

Oof, indeed the significance of what iommu_dma_ops *didn't* implement is 
a subtle one...

Reviewed-by: Robin Murphy <robin.murphy@....com>

> Fixes: b5c58b2fdc42 ("dma-mapping: direct calls for dma-iommu")
> Closes: https://lore.kernel.org/all/181e06ff-35a3-434f-b505-672f430bd1cb@notapiano
> Reported-by: NĂ­colas F. R. A. Prado <nfraprado@...labora.com> #KernelCI
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> ---
>   kernel/dma/mapping.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
> index 1a7de37bd643..38d7b3239dbb 100644
> --- a/kernel/dma/mapping.c
> +++ b/kernel/dma/mapping.c
> @@ -824,6 +824,9 @@ static int dma_supported(struct device *dev, u64 mask)
>   
>   	if (WARN_ON(ops && use_dma_iommu(dev)))
>   		return false;
> +
> +	if (use_dma_iommu(dev))
> +		return true;
>   	/*
>   	 * ->dma_supported sets the bypass flag, so we must always call
>   	 * into the method here unless the device is truly direct mapped.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ