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: <20090730.001632.39159752.anemo@mba.ocn.ne.jp>
Date:	Thu, 30 Jul 2009 00:16:32 +0900 (JST)
From:	Atsushi Nemoto <anemo@....ocn.ne.jp>
To:	maciej.sosnowski@...el.com
Cc:	haavard.skinnemoen@...el.com, nicolas.ferre@...el.com,
	dan.j.williams@...el.com, linux-arm-kernel@...ts.arm.linux.org.uk,
	patrice.vilchez@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: at_hdmac: add DMA slave transfers

On Wed, 29 Jul 2009 14:05:17 +0100, "Sosnowski, Maciej" <maciej.sosnowski@...el.com> wrote:
> Atsushi Nemoto wrote:
> > On Mon, 27 Jul 2009 14:24:26 +0100, "Sosnowski, Maciej" <maciej.sosnowski@...el.com> wrote:
> >>>> Your atc_chain_complete() calls dma_unmap_xxx unless
> >>>> DMA_COMPL_SKIP_XXX_UNMAP specified.  But atmel-mci driver does not set
> >>>> the flag on dma_async_tx_descriptor.  I suppose one of them should be
> >>>> fixed.
> >>> 
> >>> atmel-mci should definitely set that flag.
> >>> 
> >>> Haavard
> >> 
> >> I agree with Haavard.
> > 
> > Then, what should dma driver do when client driver did not set these
> > flags?  If it should call dma_unmap_sg(), the dma driver should keep
> > sg and direction somewhere...
> 
> Well, what about BUG_ON?

Or prep_slave_sg can preset both DMA_COMPL_SKIP_XXX_UNMAP flags, or do
not unmap in dma driver for slave channel.  I suppose latter is safe
and simple.

> > Also, calling dma_map_sg() in its prep_slave_sg function will not fit
> > for sound drivers, which use DMA buffers prepared in its framework.
> 
> It looks like a need for one more flag: DMA_SKIP_MAP_SG.
> What do you think?

I do not think it is worth to introduce new flag.

As Dan said, pushing dma mapping responsibility to the client looks
simple and clean way for me.

---
Atsushi Nemoto
--
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