From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A8AC4361B for ; Thu, 17 Dec 2020 09:45:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6344238D6 for ; Thu, 17 Dec 2020 09:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727275AbgLQJor (ORCPT ); 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?