Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1829791ybt; Sun, 21 Jun 2020 00:27:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7nSoR1LuIbo5+Fd9oKEEm/hYD+DTif90daFmYnQyfwjmaON0pql5Hbpkm74v/Oi1I+sYJ X-Received: by 2002:aa7:d957:: with SMTP id l23mr10973892eds.206.1592724448383; Sun, 21 Jun 2020 00:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592724448; cv=none; d=google.com; s=arc-20160816; b=QiPHzJz8WUuWkBubgSsDqM49wNNc07vwuclQ7mRKfHLcclJeUINFEEohxSDklIlAyV lFSrusUes2jP9FO3jMnZyuUbLfxAeWJrnUDdrYoiINkvWakY79gRPPDgPR3pKYHnZPae H6cTwYDi0c30GXNfociMMQUb1162wXMCgSCU3/1luZySObHLhhc3PMHpFvBS/D9HveaD 1PICqwJZsZCRpB6om8VyfuUhyDGXNkHJJ9JnV6dC24JBue8oC35rEbnV6VFYWOxJhvGL OoilGfDdOt5a35Mqn6pO7awTcs6hcPm0vLLreztkTWzSkBiIcPrxMWp38JKjo4MmbpCN RkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hZA9LGE+Y12IRbJml7bHXeNuLwOc+An/m6e/k7cNUE8=; b=vRIPjOHA4nbxQ0XTCRFs3fDSBsLLa12mLkgIyqEc8sZAGaaviF5jj21OuhwQKtHua9 FopfXJy/gT5Pon+6Jmdj6R5kWVO44ecp7HXkHujp/ZwVguliNOksroFkW6xqsYEaGfeK Thdc8iBkpHjTeXaNlf9bO/qnyIYZmfvm4a6fZeKvic+RAOFkRwUEnhvSYHGiN7v4d7/l lGCDyvRur3az8zA8q5G+sJ2YW5Ub2mvmjO+XanrHyi/lVvqa7ISydf06RgQoUJKh9glG rCtlKd7UnUYNxPglBxwjnOvcCXZzawwNbGLQkpv0NqIwP2uxq6fI7JUwFIXDdM6Qi6al 90ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=unppcI2Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si7484293edd.477.2020.06.21.00.27.06; Sun, 21 Jun 2020 00:27:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=unppcI2Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729435AbgFUHZE (ORCPT + 99 others); Sun, 21 Jun 2020 03:25:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:33400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729410AbgFUHZC (ORCPT ); Sun, 21 Jun 2020 03:25:02 -0400 Received: from localhost (unknown [171.61.66.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81CF724861; Sun, 21 Jun 2020 07:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592724302; bh=O+HtJYaaPHUMFJE4t1nnQ2MuJq56zD7rjTetemmt5lM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=unppcI2Q4B6j3eqWu1fxtJn6mxib5JV88n8S/w4kYFhB91e+KoQgufAF8fYFoQQkd RETm3PEbbTdzQI8VfTSirlfGcaXH4kpaHzrAqmM8DHjaZLVCt4qmn0s0a80ejOWAIe MbJwa3BZrkhyI/8HjGnjVKmKWntVRLEWAsiIlwjo= Date: Sun, 21 Jun 2020 12:54:57 +0530 From: Vinod Koul To: Dave Jiang Cc: Federico Vaga , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: DMA Engine: Transfer From Userspace Message-ID: <20200621072457.GA2324254@vkoul-mobl> References: <5614531.lOV4Wx5bFT@harkonnen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-06-20, 16:31, Dave Jiang wrote: > > > On 6/19/2020 3:47 PM, Federico Vaga wrote: > > Hello, > > > > is there the possibility of using a DMA engine channel from userspace? > > > > Something like: > > - configure DMA using ioctl() (or whatever configuration mechanism) > > - read() or write() to trigger the transfer > > > > I may have supposedly promised Vinod to look into possibly providing > something like this in the future. But I have not gotten around to do that > yet. Currently, no such support. And I do still have serious reservations about this topic :) Opening up userspace access to DMA does not sound very great from security point of view. Federico, what use case do you have in mind? We should keep in mind dmaengine is an in-kernel interface providing services to various subsystems, so you go thru the respective subsystem kernel interface (network, display, spi, audio etc..) which would in turn use dmaengine. -- ~Vinod