Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6184777imu; Mon, 21 Jan 2019 04:43:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN5XDDuPQd4uhCn+uRB61OE0P8fDr2mcsImmJPAo93RXIxd+rp2L8OPhgupdQtJoa2l7EoNk X-Received: by 2002:a63:b30f:: with SMTP id i15mr28227540pgf.240.1548074617162; Mon, 21 Jan 2019 04:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548074617; cv=none; d=google.com; s=arc-20160816; b=PzDU3c/1WbPVa3FWIq/UkpYIbds2wMI+5rUYKsBCmuvZoZU47WvUvaDAMX7krXFb2B I8+Q8vhBx0vZ5hKxTm9K5mF337dNXjT0B5zzArg/pHxlssyAfy9VjG3niH8VAbjA4xk6 iOojI2+x7jPW2kminurArx9tHCtiteInQygQXPBARqLemkOpUKVdrKjqky1o/SG9tMHz lR3u2+L9D0VoLkfFz5GpfTrv1EJBCV7rL7WzQxf0fR+yrhgWghd3AHSYDWIboV8pqIW9 cr+C40lOE7U59OOpb8vJAXp+skyAUCB+Ctl5rWxcmRmMjCKdJXoYlasxSLRlWw2Aj9Gr J9PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dwwYTmqw2qqPUfHl0tZCawPhKH6w6Z+hj1+WvXLPSgc=; b=CwL9DsTKsVng6RqxYk6EQBlXKKu933j3JWg6fpWS0t+0YaU3AxXpLq2yvUChfuszcs pBNsO7jn6K8O1D3fe+LmZ/U/uhjF7FuiCBsh1qmeBZPOYGMrGyLcHcr7hVJgAM/G5OCc aTRY3Vi+xfOUYOY7E+Mjl7ReohlAYQW8/OqA3y1TdhPB58c1HpFpCHb6ZbKo9CLI6p3P j4gSPiNugelvZa9lemkWphjdqmZz/dO+wx9TjYhWRe64TuoK826uTx78MXaIiPwlxo8t zYGispwyKquHsLlR96Vl7+io48udbVKTjr2hWG313TRvqFF7ljXNogFNoVaW7YUcdbQ4 gRtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=mPR8aWMV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si12465455plt.181.2019.01.21.04.43.21; Mon, 21 Jan 2019 04:43:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=mPR8aWMV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbfAUMlX (ORCPT + 99 others); Mon, 21 Jan 2019 07:41:23 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44788 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728163AbfAUMlX (ORCPT ); Mon, 21 Jan 2019 07:41:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dwwYTmqw2qqPUfHl0tZCawPhKH6w6Z+hj1+WvXLPSgc=; b=mPR8aWMVnF/F0YgJMZSlySiAk RRfsQcCpbOcVm0He0ujqVSeSbWp1GuWHJL0jHSag6IhN3YGc2C0y0PIF1opvdltyvWSyOqdfgqlns dnGGOgIXXYD8qLrZng11D1fMNSqVmz2p058jtEkMlwcL/CLLsFhOnFCUCtOwmdt9jK8v0=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1glYso-0004OK-7f; Mon, 21 Jan 2019 12:40:54 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 9CB66112767C; Mon, 21 Jan 2019 12:40:53 +0000 (GMT) Date: Mon, 21 Jan 2019 12:40:53 +0000 From: Mark Brown To: Takashi Iwai Cc: Jaroslav Kysela , alsa-devel@alsa-project.org, arnd@arndb.de, keescook@chromium.org, bgoswami@codeaurora.org, sr@denx.de, gustavo@embeddedor.com, philburk@google.com, willy@infradead.org, mchehab+samsung@kernel.org, sboyd@kernel.org, vkoul@kernel.org, Baolin Wang , daniel.thompson@linaro.org, leo.yan@linaro.org, mathieu.poirier@linaro.org, srinivas.kandagatla@linaro.org, anna-maria@linutronix.de, corbet@lwn.net, jmiller@neverware.com, ckeepax@opensource.wolfsonmicro.com, joe@perches.com, o-takashi@sakamocchi.jp, colyli@suse.de, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] ALSA: core: Add DMA share buffer support Message-ID: <20190121124053.GA12679@sirena.org.uk> References: <290f6d3a5fe288b87480cc5fa12c5139728daeca.1547787189.git.baolin.wang@linaro.org> <81e894ba-acad-2fd4-996d-8d35edd8825a@perex.cz> <20190118190805.GF6260@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: X-Cookie: Body by Nautilus, Brain by Mattel. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 18, 2019 at 08:39:32PM +0100, Takashi Iwai wrote: > Mark Brown wrote: > > > multiple tasks). I would probably go in this way and add more extended > > > permission control for the PCM device, so permissions can be restricted > > > for the passed descriptor to the producer or the consumer task. In this > > One concern I have with doing some ALSA-specific custom permissions > > thing is integration with frameworks like SELinux (they'd presumably > > need to learn about the ALSA specific stuff to manage it). It also > Well, I wonder what makes it more difficult by the approach Jaroslav > suggested. With O_APPEND, you can just call mmap() normally, and > that's all. What's the merit of dma-buf approach wrt the security? It was the bit about adding more extended permission control that I was worried about there, not the initial O_APPEND bit. Indeed the O_APPEND bit sounds like it might also work from the base buffer sharing point of view, I have to confess I'd not heard of that feature before (it didn't come up in the discussion when Eric raised this in Prague). --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlxFvc0ACgkQJNaLcl1U h9DIZgf/diES8I2aHgDHGiA47EDxQwSzkQCDjdVP1gzfiRds2qC+I8F2LGrRw7ds 5KeWEpM8zfxhM1qzxaErnzvJlq7iLHij6K/azhmDQlep2uCZZu0xT0+kVH+0Sl44 C/QbUosmDwzfDIIZo6YjubD1iKoRgTmZkmZVvGhqDQYFOTO75j7BBw445uphGTJ0 RPSYeAWob3mluUOy9Ob0zT259QRuGKr+Xa5S//M5dl1vwzTdnOb6hx+jc0hZWe8E yLb6xoxfxq9UPWdt28dhBDmjrDvvYs2pPL9JiY3aIEYM2+OP2y/HKuwSG1bQpH+Y azcEo7jf20gO+kf2Sa6AaYnOp+5yrA== =SAV5 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--