From: Mark Brown Subject: Re: [PATCH 0/2] ALSA: pcm: implement the anonymous dup v3 Date: Fri, 1 Feb 2019 12:59:43 +0000 Message-ID: <20190201125943.GE20797@sirena.org.uk> References: <20190130124139.10439-1-perex@perex.cz> <20190130223237.GK2804@sirena.org.uk> <20190131122624.GA20797@sirena.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4347163987503734931==" Return-path: Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id E1087266FA5 for ; Fri, 1 Feb 2019 13:59:46 +0100 (CET) In-Reply-To: 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: Takashi Iwai Cc: ALSA development , Baolin Wang , Phil Burk , Zach Riggle =?utf-8?B?8J+Wlg==?= , Leo Yan List-Id: alsa-devel@alsa-project.org --===============4347163987503734931== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EgVrEAR5UttbsTXg" Content-Disposition: inline --EgVrEAR5UttbsTXg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 31, 2019 at 09:32:27PM +0100, Takashi Iwai wrote: > On Thu, 31 Jan 2019 20:54:33 +0100, > Zach Riggle =F0=9F=96=96 wrote: > > (1) Can the buffer be mremap()ed with a different offset=C2=A0into the = buffer?=C2=A0 > > This was a concern in the past and the reason for the anon_inode stuff = at > > all.=C2=A0 I believe that as long as the *size* of the mapping doesn't = change, > > Linux mm will gladly permit mremap() without informing the driver. > Could you elaborate which perspective of mremap() can be a big > problem? The driver interface does nothing but a standard mmap for > now. I believe the issue was that if someone could remap the buffer to gain access to memory outside the memory allocated for the PCM buffer that would be a problem. To be honest I'm surprised that this might be a general issue with mmap(). --EgVrEAR5UttbsTXg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlxUQrwACgkQJNaLcl1U h9Axiwf/cLd0Yow3w+1fKvLx8+W4SAnaLVlyRI+lP8gHX/QGaJ908xrdqhEG4aQW Qu/upgsA3/Z9caZLESMmUC0igRQPov0oVf+dXPQeZ2e3ZR16M2/l4MKlb/HWHRUq AaZGtBGI/u3bZMhzarYn9/nk8NCo+LzlsHGygwI/ykxqRvuEmjcdYmHXqYtobEvO A6ZNz7KOoOCOzlvLE0U4jo3Eis1wXFbs9IhYCurJM+JPayPNgIOsCcp3UVunTmB1 uQfT935c6pm5lXVYftaMSWVgjYii5GodzNAjnHRsMJfBf7hUvGYxYXOIQqx5Hoc9 LI/H28Q3E7Ea22mOeep2JKpaPHlbIw== =6QJb -----END PGP SIGNATURE----- --EgVrEAR5UttbsTXg-- --===============4347163987503734931== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4347163987503734931==--