Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2464685ybt; Sun, 21 Jun 2020 21:50:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl1WbMiPz13Yq/8e86NgTnry9yeEhtfdZ8nblwXl9EIQpylP4KuRaVXUS3TCQ1xulde7g3 X-Received: by 2002:a17:906:fa92:: with SMTP id lt18mr15046104ejb.423.1592801399940; Sun, 21 Jun 2020 21:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592801399; cv=none; d=google.com; s=arc-20160816; b=gP27Jle2QMPRcS5MzvBzHG7BBHkfP00UQIDeIlejlFqqlpS/yW5yrhOTvkfjObvoFk QDiit5BrFipVo0ldGEn49azsOY7D2J5B4ycFM3xerwkcsJdZUO/5nr8lniNf/H5m2KJI m00JiT5ofv7kBEqsf7QeX1Gh4xu6YDFWRQeGgOhDHfcsxy2jv98vL+maEq3Mr4IifySU BQZtiTSuUWD5JQgzqTcVQ2otdtM5csjdRQCc3mHSjos9KuKMoS6/LZvycMPVy4NnejiS uyh5EbpYtdb7Ssx+DE6j3oUQX3CRl2HXN2/lOeBKES5uNP/oxnEYiIt3mvOhHoKZcl9D rmrg== 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=YFXqhfoGX6LwRwpxlYN7tW2tuK/K7UaAa4y9TqghKJ4=; b=iVPLnq9QrOTvhYav2Ub7EUY2qyhImqxe2hiWhHFXmUVW7kAMw+H0ItssGTnUE3dw5b qswDasBlDGu5spD3VQGQLACUAwX6tSa8c8eNiyfSCI1i++davCUvvtdL5ML0lEBNb4Ln FO+weemtnmLJ572BKBCHrNyYoKuV7J43xRWNip7RUMNb+hod8PY5cQhiHUNgnxMMALek fQi8Q16lqP2Eumao8e2ZMYVF3+AQaxPr4WWJvPgI2zCZhgsU/kEVxGAoP1xFkmzZbe/N txgt9DRJZusLLfT2duPAUTf2tbZ033d3YZDt67W3/LGk+8Au46Dz5YLiWbUUZw1OFfUk +e0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QjJssGyF; 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 dm4si3962382edb.143.2020.06.21.21.49.38; Sun, 21 Jun 2020 21:49:59 -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=QjJssGyF; 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 S1726458AbgFVErk (ORCPT + 99 others); Mon, 22 Jun 2020 00:47:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:35280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbgFVErj (ORCPT ); Mon, 22 Jun 2020 00:47:39 -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 76426251D9; Mon, 22 Jun 2020 04:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592801259; bh=QP/FvS/+xhPIsPI6044PsAdG4oIimgoqOisNnpUKF54=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QjJssGyFpc0E8B+/mIdlFlKCQ4FNVFcefjeHVZgjbHADCfFq27dJMLEPyMkSAhRLM 6VYsWAiAceTcr04HNb6hcjgoVPiNWpOsqROLXcITJiSUvh1IjCejv6pBODOVy2VLGM lSH/QLSOzS9q8KkQ4soGDR/BMVPXn2qwb56PX7RM= Date: Mon, 22 Jun 2020 10:17:33 +0530 From: Vinod Koul To: Federico Vaga Cc: Dave Jiang , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: DMA Engine: Transfer From Userspace Message-ID: <20200622044733.GB2324254@vkoul-mobl> References: <5614531.lOV4Wx5bFT@harkonnen> <20200621072457.GA2324254@vkoul-mobl> <20200621203634.y3tejmh6j4knf5iz@cwe-513-vol689.cern.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200621203634.y3tejmh6j4knf5iz@cwe-513-vol689.cern.ch> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-06-20, 22:36, Federico Vaga wrote: > On Sun, Jun 21, 2020 at 12:54:57PM +0530, Vinod Koul wrote: > > 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. > > I was thinking about a dedicated module, and not something that the DMA engine > offers directly. You load the module only if you need it (like the test module) But loading that module would expose dma to userspace. > > > Federico, what use case do you have in mind? > > Userspace drivers more the reason not do do so, why cant a kernel driver be added for your usage? -- ~Vinod