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: <20120918205248.GZ12245@n2100.arm.linux.org.uk>
Date:	Tue, 18 Sep 2012 21:52:48 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	Vinod Koul <vinod.koul@...ux.intel.com>,
	linux-kernel@...r.kernel.org, Dan Williams <djbw@...com>,
	Arnd Bergmann <arnd@...db.de>, Jon Hunter <jon-hunter@...com>,
	Stephen Warren <swarren@...dia.com>,
	Benoit Cousson <b-cousson@...com>,
	Shawn Guo <shawn.guo@...aro.org>,
	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Sascha Hauer <kernel@...gutronix.de>,
	Kukjin Kim <kgene.kim@...sung.com>,
	viresh kumar <viresh.kumar@...aro.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	Per Forlin <per.forlin@...ricsson.com>,
	Rabin VINCENT <rabin.vincent@...ricsson.com>
Subject: Re: [PATCH] dmaengine: add dmanegine slave map api's

On Tue, Sep 18, 2012 at 02:20:53PM +0200, Linus Walleij wrote:
> But we're probably the odd exception here so nevermind.
> One day we may test to rip out the logical channel handling and
> use Russell's virtual channel lib to run the show as an experiment.

Note that I'm beginning to add support for the async_tx API stuff into
the virtual channel DMA support, so it can handle the inter-dependencies
between descriptors that async_tx needs.

I'm currently trying to get the design of this right, as the async_tx
needs yet-another-list of descriptors which have been submitted, may
have been processed and completed, but for whatever reason have not
been acknowledged.  Such descriptors can not be freed because the
async_tx API may hold a reference to them, and may dereference them
at any moment to check the dependency situation.

There's a clue in that paragraph about how the DMA engine TX descriptors
_should_ be handled.  "hold a reference" is the clue.  Or another way to
say it, a kref should be embedded in the structure, providing us with
proper reference counting - and descriptors should only be 'freed'
(whether that means actually freeing them or placing them into a free
list) when the last reference is dropped.  That's _much_ better to
understand than this DMA_CTRL_ACK business...

I think switching stuff over to that may simplify things, but it's
going to be absolute hell modifying all the existing DMA engine drivers,
many of which I have no way to test (and probably as Dan has left Intel,
we have a pile of totally untestable drivers now.)
--
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