Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1090814pxu; Thu, 17 Dec 2020 01:46:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7GB2VhnttYq6cTVXSdUm+Fgu0irPzgBtwZ3yFZnRF4XW+ddjNsBVpJRrjY3qHM83/OTwD X-Received: by 2002:a17:906:2798:: with SMTP id j24mr14723373ejc.328.1608198416368; Thu, 17 Dec 2020 01:46:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608198416; cv=none; d=google.com; s=arc-20160816; b=C52/5+0YTFrn09QsRWajwnrfChxzoY5IlG6m81F6oVw4tusRF3TU2MbQ7brAsyrb46 Izyh2dVpfFn03HuIcUlcrOWehwOZTAKJmfE9oi5BKeUu38ivVGbc+4cMbV14y8LDtnYB jrvZKF7JNeKHjsLfbOGwfIQzHP/y6kZFCoSRWD0BqHMb0bNLIaI4K7uCH+3jOL01mOF+ 9gBNKUwhwrn5dpGw/1okB6kF6PjCCpktXbSMiGBowsStYT3GwktpIxTfc7t1qec8q3nH SnN3hds1bSi8ylmW+WZwW0iHAYZ0Y8M+B4hhSI7RPJofa4ODWTTe6VX3nORyK8LBkIbT sewA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=HHNhKphKZ5QqF9WjO51pWepbtNuJwsgWw1Hcw6UPKx4=; b=lVL0juys7jL1iDMqdevbq17Kqp2fFJT18PxvmcdsEtWprkzdSC+ZYWryrhQTHHxG+L ahhVRPqeuIV+rCH2rs91LxTQmvYFb1GRcMHisIasG6D0cDrmtNscEHQ9sMIAyo+juFB3 40UXoJVUHdx+8EoGSV+nljwS6eke/C6+EG1mRitok4N0JgXyT943Qq434HPU8GSmVcoy QmyitFiPQZIWsQZTCviOTgGUX76XFfVgBfGkXhzTIdRKL54NtDbBUM30xZeaanYUsfWi P7DipYEeHOIBVCpODfBenfnPW+1f5cDAAdwF0Axd0wzFPjd2wJw9P+2wx+osCxsrz2sH p80w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b=GN3BTU0I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si4297211edi.83.2020.12.17.01.46.33; Thu, 17 Dec 2020 01:46:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b=GN3BTU0I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgLQJor (ORCPT + 99 others); Thu, 17 Dec 2020 04:44:47 -0500 Received: from www381.your-server.de ([78.46.137.84]:56898 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgLQJor (ORCPT ); Thu, 17 Dec 2020 04:44:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=HHNhKphKZ5QqF9WjO51pWepbtNuJwsgWw1Hcw6UPKx4=; b=GN3BTU0INkArDmJZ3aQuHEzafd zzhThECDD6GFVc960TCPKNU7Qg7akHdoXRH9RU1oZ4+KoqkDNKkT78LI5BIVfgTAJl1WnNF28PlU8 lpKfJ8MZCK4UVYrCZ5dRpQrmEQgwPXLvYCJp0cIYrTSYPcmvQWcXLPnH0OOjjt4zB3N34Nnq3jiiv 8en6UD52X1B2UkTnVpoWT6PfG5dxj6+efCdoabxlmyBfKiXCgDYZDMkZvB2pm+n0drNaA7wfABJoS OTVl/QXy/IrMnyL67Ax6WrCqMqllyqyJEd/AJdmPN6Z957FyPseIymgV5c93+3FIv95RnezqR89Um NXan7Xsw==; Received: from sslproxy03.your-server.de ([88.198.220.132]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kppp3-0000rs-QS; Thu, 17 Dec 2020 10:43:46 +0100 Received: from [62.216.202.54] (helo=[192.168.178.20]) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kppp3-000DPQ-Ie; Thu, 17 Dec 2020 10:43:45 +0100 Subject: Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram To: Robin Gong , perex@perex.cz, tiwai@suse.com, akpm@linux-foundation.org, xiang@kernel.org, pierre-louis.bossart@linux.intel.com, gustavoars@kernel.org, shengjiu.wang@nxp.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <1608221747-3474-1-git-send-email-yibin.gong@nxp.com> From: Lars-Peter Clausen Message-ID: <05c824e5-0c33-4182-26fa-b116a42b10d6@metafoo.de> Date: Thu, 17 Dec 2020 10:43:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <1608221747-3474-1-git-send-email-yibin.gong@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.4/26019/Wed Dec 16 15:36:02 2020) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/20 5:15 PM, Robin Gong wrote: > Since mmap for userspace is based on page alignment, add page alignment > for iram alloc from pool, otherwise, some good data located in the same > page of dmab->area maybe touched wrongly by userspace like pulseaudio. > I wonder, do we also have to align size to be a multiple of PAGE_SIZE to avoid leaking unrelated data?