From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 5/9] dma-mapping: support highmem in the generic remap allocator Date: Tue, 4 Dec 2018 15:23:04 +0100 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-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Marek Szyprowski Cc: Catalin Marinas , Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Guo Ren , Laura Abbott , Robin Murphy , Christoph Hellwig , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.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?