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: <91b6da73-fc59-4751-8215-1edf68de222e@arm.com>
Date: Mon, 19 Aug 2024 14:16:56 +0100
From: Robin Murphy <robin.murphy@....com>
To: Christoph Hellwig <hch@....de>
Cc: Leon Romanovsky <leon@...nel.org>, 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 16/08/2024 8:11 am, Christoph Hellwig wrote:
> 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.

Thanks, I've just had a quick look over what you queued on 
dma-iommu-direct-calls, and you're welcome to stick my ack on that if 
you like.

Cheers,
Robin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ