Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8306468imu; Tue, 4 Dec 2018 06:24:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vp9JjU4Mlm+zyI0UatOQozpZ9GQpkaRT+gGdAYqXsaMun5r+VI917HJglVlYNvT1VOKOST X-Received: by 2002:a62:178f:: with SMTP id 137mr20101753pfx.226.1543933466969; Tue, 04 Dec 2018 06:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543933466; cv=none; d=google.com; s=arc-20160816; b=Y/KrSGlMyiKt7Pa/bcsWTibgOnRqVwB17SzJdLQbUOCOZJBkNVl17bd/SsVi13wuOB dTuWTx7yWQbP9PZxCCQOfUOJ46IlmILL/yKr/8UKWu+5+crEPxeO6mYNCgZPSFCMiMo/ HZNplQYJMtfC48dfS83JixGGTENt1SOc/eVYqqibZ6+6DxhhnvHlUklGwl0B2tDrrWCq SsNCOtFWaCoy49AgWCLtOlZwglYZX48vIR5Bec4syN/SHcWybCEQJ96KBlfWNHalCft4 gL0gqlZ8ItKKsxh6NsK1bzhOPdmsw5twyRsvmMmF4Uj/bF15tDtQWFJ5gCEtJyFdzGfF B5/g== 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; bh=nqVXB8dFWki0nTYTnmJrdEmyD1XB5Icq+j4HUAq4oIg=; b=n5l6IhyW84O0lkzciaeIcJx8O8WkDJw+6S13OsUyvKz9S/OXtIx8kSBN+a/10R/CnL b5iW7obyUxsUoktTTvLuck1yu9a2xX1JuiuM5DltArx6t2bUlkDpcMIaWHEgLVIPmRCG EwebfY/C6/h2O6VIaNzk+rdhPrhcsz/Z3YmUcFKZ+hkYv/970Pa8vVe0mqfoWWOH/5AA 7uJREltsJ68iSza9cE4FpvSGUNuPuaetSbfeYsX3mNwNDFGcPhB+TKNsPaj7Nfjup/gO k/dh3lPPFPJSJAaHy2+WCEzQsjkXKsel1EKhlqKJjtZYnUGbF6eBH6GCSyZscrtXwC5B uUJQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si14141159pgl.6.2018.12.04.06.24.11; Tue, 04 Dec 2018 06:24:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbeLDOXH (ORCPT + 99 others); Tue, 4 Dec 2018 09:23:07 -0500 Received: from verein.lst.de ([213.95.11.211]:44022 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbeLDOXG (ORCPT ); Tue, 4 Dec 2018 09:23:06 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id E943368BDF; Tue, 4 Dec 2018 15:23:04 +0100 (CET) Date: Tue, 4 Dec 2018 15:23:04 +0100 From: Christoph Hellwig To: Marek Szyprowski Cc: Robin Murphy , Christoph Hellwig , iommu@lists.linux-foundation.org, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Guo Ren , Laura Abbott , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/9] dma-mapping: support highmem in the generic remap allocator Message-ID: <20181204142304.GC2618@lst.de> References: <20181105121931.13481-1-hch@lst.de> <20181105121931.13481-6-hch@lst.de> <449e0631-aa32-d4a8-9fa9-07234ae1e533@arm.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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 04, 2018 at 09:38:02AM +0100, Marek Szyprowski wrote: > Hi All, > > On 2018-11-30 20:05, Robin Murphy wrote: > > On 05/11/2018 12:19, Christoph Hellwig wrote: > >> By using __dma_direct_alloc_pages we can deal entirely with struct page > >> instead of having to derive a kernel virtual address. > > > > Simple enough :) > > > > Reviewed-by: Robin Murphy > > This patch has landed linux-next yesterday and I've noticed that it > breaks operation of many drivers. The change looked simple, but a stupid > bug managed to slip into the code. After a short investigation I've > noticed that __dma_direct_alloc_pages() doesn't set dma_handle and zero > allocated memory, while dma_direct_alloc_pages() did. The other > difference is the lack of set_memory_decrypted() handling. > > Following patch fixes the issue, but maybe it would be better to fix it > in kernel/dma/direct.c: Thanks for spotting this Marek. Can you send the patch below with a signoff and a changelog so that I can queue it up?