Skip to content

ALSA: pcm: implement the anonymous dup v2

Jaroslav Kysela alsa-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ALSA: pcm: implement the anonymous dup (inode file descriptor)include/sound/pcm.h include/uapi/sound/asound.h sound/core/oss/pcm_oss.c +3 more+78 -192 replies
2/2ALSA: pcm: implement the ioctl/mmap filter for the anonymous dupinclude/sound/pcm.h include/uapi/sound/asound.h sound/core/pcm_native.c+94 -12 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchTakashi Iwai
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] ALSA: pcm: implement the anonymous dup v2

This patchset contains the anonymous dup implementation with permissions checking for the ALSA's PCM interface in kernel to enable the restricted DMA sound buffer sharing for the restricted tasks.

The code was tested through qemu and it seems to be pretty stable.

The initial tinyalsa implementation can be found here:

https://github.com/perexg/tinyalsa/commits/anondup

The filtering might be refined. It depends on the real requirements. Perhaps, we may create more ioctl groups. Any comments are more than welcome.

v2 of the patches:

- change clone parameter to subdevice number for the pcm attach
- change SNDRV_PCM_PERM_MAX to SNDRV_PCM_PERM_MASK
- the tinyalsa implementation was a little updated (restructured)

Cc Phil Burk <[email protected]>
Cc Mark Brown <[email protected]>
Cc Leo Yan <[email protected]>
Cc Baolin Wang <[email protected]>

Jaroslav Kysela (2):
ALSA: pcm: implement the anonymous dup (inode file descriptor)
ALSA: pcm: implement the ioctl/mmap filter for the anonymous dup

 include/sound/pcm.h         |   9 +--
 include/uapi/sound/asound.h |  12 +++-
 sound/core/oss/pcm_oss.c    |   2 +-
 sound/core/pcm.c            |  13 ++--
 sound/core/pcm_compat.c     |   1 +
 sound/core/pcm_native.c     | 153 ++++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 171 insertions(+), 19 deletions(-)
Signature · 1 line
2.13.6