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: <20150903123232.GX12027@sirena.org.uk>
Date:	Thu, 3 Sep 2015 13:32:32 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Qais Yousef <qais.yousef@...tec.com>
Cc:	alsa-devel@...a-project.org, Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/10] ALSA: axd: add buffers manipulation files

On Tue, Sep 01, 2015 at 11:00:42AM +0100, Qais Yousef wrote:
> On 08/29/2015 10:47 AM, Mark Brown wrote:

Please delete unneeded context from replies, it makes it easier to find
the new content you have added.  Please also leave blank lines between
paragraphs, it makes it much easier to read messages.

> >>What this code is trying to do is make a contiguous memory area behave as a
> >>ring buffer. Then this ring buffer behave as a queue. We use semaphore
> >>counts to control how many are available to take/put. rd_idx and wr_idx
> >>should always point at the next location to take/put from/to.
> >>Does this help answering your question?

> >No.  Why are we doing this?  Essentially all ALSA buffers are ring
> >buffers handled in blocks, why does this one need this complex locking
> >scheme?

> There are 2 sides to this. The ALSA/driver iface and the driver/firmware
> one. The ALSA/driver iface is called from ALSA ops but the driver/firmware
> is handled by the interrupt and workqueues. The code is trying to deal with
> this concurrency. Also once AXD consumed a buffer it sends back an interrupt

This is just the same as any other ALSA device...

> to the driver that it can reuse it, there's no guarantee that this returned
> buffer is in the same order it was sent.

If that's the case I'm not sure the code is correct - it seemed to have
assumptions that the buffers were going to be retired in the order.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ