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:   Wed, 23 May 2018 13:00:45 +0900
From:   Takashi Sakamoto <o-takashi@...amocchi.jp>
To:     Oleksandr Andrushchenko <andr2000@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        alsa-devel@...a-project.org, jgross@...e.com,
        boris.ostrovsky@...cle.com, konrad.wilk@...cle.com, perex@...ex.cz,
        tiwai@...e.com
Cc:     Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound
 driver

Hi,

On May 14 2018 15:27, Oleksandr Andrushchenko wrote:
 > diff --git a/sound/xen/xen_snd_front_alsa.c 
b/sound/xen/xen_snd_front_alsa.c
 > new file mode 100644
 > index 000000000000..5041f83e98d2
 > --- /dev/null
 > +++ b/sound/xen/xen_snd_front_alsa.c
 > ...
 > +/*
 > + * FIXME: The mmaped data transfer is asynchronous and there is no
 > + * ack signal from user-space when it is done. This is the
 > + * reason it is not implemented in the PV driver as we do need
 > + * to know when the buffer can be transferred to the backend.
 > + */
 > ...

In ALSA PCM interface v2.0.14 or later, SNDRV_PCM_INFO_SYNC_APPLPTR is
available. This flag express that userspace applications are expected to
call ioctl(2) with 'SNDRV_PCM_IOCTL_SYNC_PTR' even if they oprate to
memory mapped page frames for PCM samples. For detail, please refer to a
commit 42f945970af9 ('ALSA: pcm: Add the explicit appl_ptr sync
support')[1].

As a supplement, please refer to below commits:
  * 4b671f577474 ('ALSA: pcm: Add an ioctl to specify the supported
    protocol version')[2]
  * b602aa8eb1a0 ('ALSA: pcm: Disable only control mmap for explicit
    appl_ptr sync')[3]

Alsa-lib v1.1.5 or later supports this flag and existent applications
can run transparently.

For developers, a tracepoint may be useful:
  * fccf53881e9b ('ALSA: pcm: add 'applptr' event of tracepoint')[4]

For your information.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42f945970af9
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b671f577474
[3] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b602aa8eb1a0
[4] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fccf53881e9b


Regards

Takashi Sakamoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ