All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: ALSA development <alsa-devel@alsa-project.org>,
	Leo Yan <leo.yan@linaro.org>, Phil Burk <philburk@google.com>,
	Baolin Wang <baolin.wang@linaro.org>
Subject: Re: [PATCH 0/2] ALSA: pcm: implement the anonymous dup v3
Date: Thu, 31 Jan 2019 09:08:04 +0100	[thread overview]
Message-ID: <s5hsgx9ckrf.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190130223237.GK2804@sirena.org.uk>

On Wed, 30 Jan 2019 23:32:37 +0100,
Mark Brown wrote:
> 
> On Wed, Jan 30, 2019 at 01:41:37PM +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.
> 
> My understanding based on some off-list discussion is that the Android
> security people are going to see anything that involves passing more
> than a block of memory (and in particular anything that gives access to
> the sound APIs) as a problem.  That's obviously going to be an issue for
> anything O_APPEND based.  My understanding is that this is fundamentally
> a risk mitigation thing - by not having any of the sound kernel
> interfaces available to the applications affected there's no possibility
> that any problems in the sound code can cause security issues.

The patch 2 implements exactly that kind of access restriction, so
that the passed fd won't do anything else than wished.

If we want to be super-conservative, the implementation could be even
simpler -- instead of filtering, we may pass a minimum fd ops that
contains only mmap and release for the anon-dup fd...


thanks,

Takashi

  parent reply	other threads:[~2019-01-31  8:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=s5hsgx9ckrf.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=philburk@google.com \
    /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.