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]
Date:	Mon, 10 Oct 2011 14:46:20 +0530
From:	Jassi Brar <jaswinder.singh@...aro.org>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	"Williams, Dan J" <dan.j.williams@...el.com>,
	Russell King <rmk@....linux.org.uk>,
	Barry Song <21cnbao@...il.com>, linux-kernel@...r.kernel.org,
	DL-SHA-WorkGroupLinux <workgroup.linux@....com>,
	Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCHv4] DMAEngine: Define interleaved transfer request api

On 10 October 2011 12:23, Vinod Koul <vinod.koul@...el.com> wrote:
>
> +struct dmaxfer_memcpy_template {
> +       dma_addr_t src_start;
> +       dma_addr_t dst_start;
> +       bool src_inc;
> +       bool dst_inc;
> +       bool src_sgl;
> +       bool dst_sgl;
> +       size_t numf;
> +       size_t frame_size;
> +       struct data_chunk sgl[0];
> +};
> +
> +struct dmaxfer_slave_template {
> +       dma_addr_t mem;
> +       bool mem_inc;
> +       size_t numf;
> +       size_t frame_size;
> +       struct data_chunk sgl[0];
> +};
>
(1) Please tell how is dmaxfer_slave_template supposed to work on
 bi-directional channels?
 Keeping in mind, dma_slave_config.direction is marked to go away
 in future.

(2)
  * slave_template.mem  <=>  memcpy_template.src_start
  * slave_template.mem_inc  <=>  memcpy_template.src_inc

 So essentially
  memcpy_template  :=  slave_template + src/dst_sgl + dst_start + dst_inc

 Even after this separation, there is nothing slave specific in
dmaxfer_slave_template. The slave client still needs DMA_SLAVE_CONFIG
to specify slave parameters of the transfer.
 You only save a few bytes in a _copy_ of memcpy_template.

Sorry but I only see code duplication and a very vulnerable segregation.

>
> The point is that it makes it simpler to understand what we are doing
> rather than resort to parsing to find out if its memcpy or slave and
> what is the direction.
>
Not sure how reading dmaxfer_template.xfer_direction is "parsing".
--
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