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]
Date:	Fri, 13 Nov 2015 20:20:57 -0000
From:	okaya@...eaurora.org
To:	"Vinod Koul" <vinod.koul@...el.com>
Cc:	"Sinan Kaya" <okaya@...eaurora.org>,
	"Andy Shevchenko" <andy.shevchenko@...il.com>,
	"Dan Williams" <dan.j.williams@...el.com>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	timur@...eaurora.org, cov@...eaurora.org, jcm@...hat.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support
 functions

>>
>> I looked at this. IMO, merging selftest code and dmatest code is not
>> a good idea.
>>
>> Dmatest code has been well written and structured so that multiple
>> DMA capabilities (XOR, PQ, MEMCPY) can be tested with the same code.
>>
>> It supports threads and user space interaction.
>>
>> The code I want to change (dmatest_func) is 3 levels deep in
>> structure. My refactored code looked really ugly compared to the
>> original code.
>
> dmatest_func is still a bigger fn specific to dmatest. I was thinking that
> we
> should have rather have two common functions
> 1) dmatest_do_dma() which does buffer allocation, invoking dmaengine APIs
> and
> checking results, part of dmatest_func today
>
> 2) request_channels() would also be common along with cleanup routines
>

Tried again,

It still doesn't look right. Depending on the used API, the source and
destination buffers are different.

For instance, when you use dma_map_page, your source addresses are pages.
If you use scatter_sg, you are working on the scatter-gather list. If you
use dma_coherent, then the source cannot be a kmalloc API. Source comes
from the DMA API. If you use dma_map_single, it is a kmalloc buffer. This
is causing havoc in the compare APIs.

IMO, in the goals of sharing code, we are making it unmanageable.

I'm leaning towards dropping this patch altogether (which I'm not very
happy about) or pushing it this way and have somebody do the
reorganization in another iteration.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ