From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v6 0/3] ALSA: pcm: anonymous dup implementation Date: Fri, 08 Feb 2019 17:14:16 +0100 Message-ID: References: <20190204183817.975-1-perex@perex.cz> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 099712674C9 for ; Fri, 8 Feb 2019 17:14:17 +0100 (CET) In-Reply-To: <20190204183817.975-1-perex@perex.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Jaroslav Kysela Cc: ALSA development , Baolin Wang , Phil Burk , Zach Riggle , Mark Brown , Leo Yan List-Id: alsa-devel@alsa-project.org On Mon, 04 Feb 2019 19:38:14 +0100, Jaroslav Kysela wrote: > > 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. Is this patchset targeted for 5.1 merge? I hesitate to merge it for now, as the new API hasn't been tested much yet... If it's for 5.1, we need test coverage and more reviews quickly. thanks, Takashi > > 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 > Cc: Zach Riggle > Cc: Mark Brown > Cc: Leo Yan > Cc: Baolin Wang > > 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 >