Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3891939pxb; Mon, 1 Nov 2021 23:45:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZfzHmhFs05SjEXv7fSRxP4AdG9cyE63yTvxo/DNGSXSBn5O7r/6nQbvRszRRTUrXV+7D8 X-Received: by 2002:a92:cd86:: with SMTP id r6mr6987644ilb.149.1635835522687; Mon, 01 Nov 2021 23:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635835522; cv=none; d=google.com; s=arc-20160816; b=bOS8RaxqeJ+mtRWQTWNlaxqGqbiXqByMg6USRZXMY4e6h+kzma72R+n8HxQWxCpHTu inRSW8NTWDd86+Yq416XP1RZtDMNJx0+g6gUHLidEqIYWQrKSxi75rHCu+xSEiauYTws 8KHmctPuCM/mF7oIcYFgzPpIks5+Dhhf9a2yazY2vkuNNjSUTj222xj7NZwUL5q5udkz CguYiEdEMtArjQIIH0juldWCOVgnT5Un/aZ4QIJN4c4IACIq11yDO/Ff30jkUuKMmmPS G0XVxjKXHFk2M5q6LLgkYA/sCAlzqasxkGMzMLbau87Rq6qbtniZFhRnNJZMHeUxSPlN 8hQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=IxxLD5GXZgKTKrPTAIMsvV07F72aak7PPGy3s6uendY=; b=GlMIkAivDcog3bAbEZvXfU2SNNwC5I04X5fvS4tJxYYl5wnsWCqTJWjY12CeYg3mFS Hrwn1G6Xm40JdpdPo48uX5YxAza4UXOOvEVnruDPXul6aipjQfoW+sCuxAxaK2pWjXrC 0eXcHvioKZj2mezZiDKBKITk8XZtMoDYc0X9413WY0NhHFkQn3YanecKPKXTmrGCueen 0vbFga5zy78N/8HDr6tkw0ABiz63uu6XWK/+USX1/2NA/pacvs4wx0Yo+8hL4CW6RjOS kI4WJANOLh54dFRi2ZZakuW3P9GEszOOVkTByuuj91Rb350VhI9mokXjwtEtoP2lsDEA 0Nxg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si2647827jaj.128.2021.11.01.23.45.08; Mon, 01 Nov 2021 23:45:22 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbhKBGqe (ORCPT + 99 others); Tue, 2 Nov 2021 02:46:34 -0400 Received: from verein.lst.de ([213.95.11.211]:54613 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhKBGqd (ORCPT ); Tue, 2 Nov 2021 02:46:33 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 85F8768AFE; Tue, 2 Nov 2021 07:43:56 +0100 (CET) Date: Tue, 2 Nov 2021 07:43:56 +0100 From: Christoph Hellwig To: Walter Wu Cc: Ard Biesheuvel , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Matthias Brugger , Linux IOMMU , Linux Kernel Mailing List , Linux ARM , wsd_upstream , linux-mediatek@lists.infradead.org, Andrew Morton , Will Deacon Subject: Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING Message-ID: <20211102064356.GB27749@lst.de> References: <20211101031558.7184-1-walter-zh.wu@mediatek.com> <76840b40fcf26a65467931a73f236982ad39989c.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 11:21:16AM +0800, Walter Wu wrote: > Our platform is arch64. We need a dynamic allocated buffer from CMA is > not to read by CPU peculative execution, so we need to remove its > kernel mapping. If your CPU speculates into unused kernel direct mappings your have a worse problem than this, because all the dma coherent allocations for non-coherent devices still have a cachable direct mapping. Will mentioned he wanted to look into getting rid of that mapping now that the core dma code has the infrastucture for that, so adding him here.