All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ALSA: pcm: implement the anonymous dup v3
@ 2019-01-30 12:41 Jaroslav Kysela
  2019-01-30 12:41 ` [PATCH 1/2] ALSA: pcm: implement the anonymous dup (inode file descriptor) Jaroslav Kysela
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jaroslav Kysela @ 2019-01-30 12:41 UTC (permalink / raw)
  To: ALSA development
  Cc: Baolin Wang, Takashi Iwai, Phil Burk, Mark Brown, Leo Yan

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)

v3 of the patches:

- group integer declarations in snd_pcm_anonymous_dup()
- replaced substream->pcm with pcm in snd_pcm_anonymous_dup()
- added SNDRV_PCM_PERM_RW check for read/write/readv/writev syscalls

Cc: Phil Burk <philburk@google.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Baolin Wang <baolin.wang@linaro.org>

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     | 158 ++++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 176 insertions(+), 19 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-02-01 16:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 12:41 [PATCH 0/2] ALSA: pcm: implement the anonymous dup v3 Jaroslav Kysela
2019-01-30 12:41 ` [PATCH 1/2] ALSA: pcm: implement the anonymous dup (inode file descriptor) Jaroslav Kysela
2019-01-30 12:41 ` [PATCH 2/2] ALSA: pcm: implement the ioctl/mmap filter for the anonymous dup Jaroslav Kysela
2019-01-30 22:32 ` [PATCH 0/2] ALSA: pcm: implement the anonymous dup v3 Mark Brown
2019-01-31  0:45   ` Phil Burk
2019-01-31  8:06     ` Leo Yan
2019-01-31  8:17     ` Takashi Iwai
2019-01-31  8:25     ` Jaroslav Kysela
2019-01-31  8:08   ` Takashi Iwai
2019-01-31 12:26     ` Mark Brown
2019-01-31 13:30       ` Jaroslav Kysela
2019-01-31 15:48         ` Phil Burk
2019-01-31 19:35           ` Phil Burk
2019-01-31 19:54             ` Zach Riggle 🖖
2019-01-31 20:32               ` Takashi Iwai
2019-02-01  9:55                 ` Jaroslav Kysela
2019-02-01 13:01                   ` Mark Brown
2019-02-01 15:31                     ` Phil Burk
2019-02-01 16:28                       ` Jaroslav Kysela
2019-02-01 16:39                         ` Phil Burk
2019-02-01 12:59                 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.