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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3296CC43217 for ; Wed, 16 Nov 2022 15:45:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233095AbiKPPpV (ORCPT ); Wed, 16 Nov 2022 10:45:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233247AbiKPPpQ (ORCPT ); Wed, 16 Nov 2022 10:45:16 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5411B1139; Wed, 16 Nov 2022 07:45:12 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id B04AC68AA6; Wed, 16 Nov 2022 16:45:07 +0100 (CET) Date: Wed, 16 Nov 2022 16:45:07 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Dean Luick , Christoph Hellwig , Dennis Dalessandro , Mauro Carvalho Chehab , Alexandra Winter , Wenjia Zhang , Marek Szyprowski , Jaroslav Kysela , Takashi Iwai , Russell King , linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 2/7] RDMA/hfi1: don't pass bogus GFP_ flags to dma_alloc_coherent Message-ID: <20221116154507.GB18491@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-3-hch@lst.de> 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: netdev@vger.kernel.org On Wed, Nov 16, 2022 at 03:15:10PM +0000, Robin Murphy wrote: > Coherent DMA buffers are allocated by a kernel driver or subsystem for the > use of a device managed by that driver or subsystem, and thus they > fundamentally belong to the kernel as proxy for the device. Any coherent > DMA buffer may be mapped to userspace with the dma_mmap_*() interfaces, but > they're never a "userspace allocation" in that sense. Exactly. I could not find a place to map the buffers to userspace, so if it does that without using the proper interfaces we need to fix that as well. Dean, can you point me to the mmap code?