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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240816071134.GA2943@lst.de>
Date: Fri, 16 Aug 2024 09:11:34 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: Leon Romanovsky <leon@...nel.org>, Christoph Hellwig <hch@....de>,
	Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Leon Romanovsky <leonro@...dia.com>,
	Easwar Hariharan <eahariha@...ux.microsoft.com>,
	linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
	Jason Gunthorpe <jgg@...dia.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v4 2/2] dma: add IOMMU static calls with clear default
 ops

On Thu, Aug 15, 2024 at 05:54:49PM +0100, Robin Murphy wrote:
>>   +#ifdef CONFIG_DMA_OPS_HELPERS
>> +#include <asm/dma-mapping.h>
>
> What needs a definition of get_arch_dma_ops() in this scope?
>
>> +struct page *dma_common_alloc_pages(struct device *dev, size_t size,
>> +		dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp);
>> +void dma_common_free_pages(struct device *dev, size_t size, struct page *vaddr,
>> +		dma_addr_t dma_handle, enum dma_data_direction dir);
>
> Why not bring the rest of the dma_common_* declarations in here as well? 
> (Or more literally, add the #ifdef around where they all are already)

We actually don't need the ifdef at all, the calls in mapping.c are
all keyed off compile time constants, so just leaving the stray
prorotypes for this code that won't ever be called around should be
just fine.

>>   	depends on !NO_DMA
>>   	default y
>>   +# DMA IOMMU uses common ops helpers for certain operations, so let's 
>> allow to build
>> +# ops_helpers.c even if DMA_OPS is not enabled
>
> Hmm, but actually dma-direct also uses dma_common_contiguous_remap(), so 
> something seems a little inconsistent here...

Yes, but that's not really new.  I'll look into a patch to select
the helpers based on the conditions that make dma-direct use it.

I'll fix up all style issues and will apply the patch with that over
the weekend so that we can get it into this merge window.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ