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] [day] [month] [year] [list]
Message-ID: <20160318122259.GC4645@e104818-lin.cambridge.arm.com>
Date:	Fri, 18 Mar 2016 12:22:59 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Zhen Lei <thunder.leizhen@...wei.com>
Cc:	Will Deacon <will.deacon@....com>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Xinwei Hu <huxinwei@...wei.com>, Zefan Li <lizefan@...wei.com>,
	Hanjun Guo <guohanjun@...wei.com>,
	Tianhong Ding <dingtianhong@...wei.com>
Subject: Re: [PATCH v2 1/1] arm64/dma-mapping: reduce an unnecessary
 conversion for coherent DMA

On Fri, Mar 18, 2016 at 10:26:07AM +0800, Zhen Lei wrote:
> 1.For coherent DMA
>   In swiotlb_alloc_coherent, it directly return vaddr on success, and
> pass vaddr to free_pages on failure. So, we can directly transparent pass
> vaddr from __dma_free to swiotlb_free_coherent.
> 
> 2.Keep no change for non-coherent DMA.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
> ---
>  arch/arm64/mm/dma-mapping.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

You sent a patch without any real reason like "improved performance",
just making the code slightly harder to read. Currently it is pretty
clear to me that phys_to_virt is meant for computing the swiotlb
address and we ignore the actual vaddr in this context.

So, I'm not taking this patch (if you want, you can send one just adding
a comment why vaddr cannot always be passed to the swiotlb API).

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ