From: Jaroslav Kysela <perex@perex.cz>
To: ALSA development <alsa-devel@alsa-project.org>
Cc: Baolin Wang <baolin.wang@linaro.org>,
Takashi Iwai <tiwai@suse.de>, Phil Burk <philburk@google.com>,
Zach Riggle <riggle@google.com>, Mark Brown <broonie@kernel.org>,
Leo Yan <leo.yan@linaro.org>
Subject: [PATCH v6 0/3] ALSA: pcm: anonymous dup implementation
Date: Mon, 4 Feb 2019 19:38:14 +0100 [thread overview]
Message-ID: <20190204183817.975-1-perex@perex.cz> (raw)
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
v4 of the patches:
- more simple restriction control (only two modes - full/buffer)
- the tinyalsa implementation follows this change
v5 of the patches:
- merge pcm_..._mmap_allowed fcns to the snd_pcm_mmap_... fcns
v6:
- add proper open_mutex protection for snd_pcm_open_file()
Cc: Phil Burk <philburk@google.com>
Cc: Zach Riggle <riggle@google.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Baolin Wang <baolin.wang@linaro.org>
Jaroslav Kysela (3):
ALSA: pcm: implement the anonymous dup (inode file descriptor)
ALSA: pcm: merge pcm_..._mmap_allowed fcns to the snd_pcm_mmap_...
fcns
ALSA: pcm: implement the mmap buffer mode for the anonymous dup
include/sound/pcm.h | 10 +--
include/uapi/sound/asound.h | 6 +-
sound/core/oss/pcm_oss.c | 2 +-
sound/core/pcm.c | 13 ++--
sound/core/pcm_compat.c | 1 +
sound/core/pcm_native.c | 154 +++++++++++++++++++++++++++++++++-----------
6 files changed, 133 insertions(+), 53 deletions(-)
--
2.13.6
next reply other threads:[~2019-02-04 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 18:38 Jaroslav Kysela [this message]
2019-02-04 18:38 ` [PATCH v6 1/3] ALSA: pcm: implement the anonymous dup (inode file descriptor) Jaroslav Kysela
2019-02-04 18:38 ` [PATCH v6 2/3] ALSA: pcm: merge pcm_..._mmap_allowed fcns to the snd_pcm_mmap_... fcns Jaroslav Kysela
2019-02-04 18:38 ` [PATCH v6 3/3] ALSA: pcm: implement the mmap buffer mode for the anonymous dup Jaroslav Kysela
2019-02-07 16:29 ` [PATCH v6 0/3] ALSA: pcm: anonymous dup implementation Mark Brown
2019-02-08 16:14 ` Takashi Iwai
2019-02-05 18:24 Ricardo Biehl Pasquali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190204183817.975-1-perex@perex.cz \
--to=perex@perex.cz \
--cc=alsa-devel@alsa-project.org \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=leo.yan@linaro.org \
--cc=philburk@google.com \
--cc=riggle@google.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.