Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1021564ybt; Wed, 24 Jun 2020 17:43:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYii2kVzWPHAcvUyLjVYkvmIqfHW4a7kNLChEEGPn0TGajfgkJZhBFWZLfmCBVNEQLPDF5 X-Received: by 2002:a05:6402:13d0:: with SMTP id a16mr1175072edx.269.1593045788172; Wed, 24 Jun 2020 17:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593045788; cv=none; d=google.com; s=arc-20160816; b=ayzkz60GKJxN2NNjtKmaaZix5UHJKzzM5a352E3aujUcOGEd+K7oLEFUhJ1RsPHWSN VtRmr+gau71GbbypsK+e624hCiJah/I6YpFPnlO2nUB99b86u/D3lgAiU1+mUN0oVmbq OQENT4WpRzPOle0gjIYbLz2IREPO0Odmpd5V0FVyJLZ6iqp4mv2IKa2YznTXFnPmxO2c MgXdJoLGsHvzkagWVMWcR3FzMmXNNEXykPTCbZrScRwYMV868bPZH/Widik2NhZEX3py XL/yMqQKL8Lo6K4gFaqrMFezBkFc4fG4VMQ+vPcw8RyqJBd3r+W1IYHZYr9/MJXI8D8W epiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=VtNJcRrpbW2EItua6ASqkDpkagzqwY1vJfJxWyzK8Zw=; b=leRCPHLn9HFk++di92Vk3KgheuwQlRZhGlUxpE7s1XPGQBrK8pMvC8APu0AYavG9LI cLPvgUk6x9fnqP8nx8AIWp0fkDMiSKVQnU/ymMF0RIPYCnbXdgHJtxhgqK0WiF42s8PA OBo6izlzQwj4iTI4RDZ2WoNzu6a44wB0tX4BtIBelgb70yoBo4JPCPF5AhdS2zoEsT+t a3JBrhPFzymDwVS0V9RPLY+pu17cNDf7CfdOfhZC4RPzUdCv7k0JkMuEmUX9dS11EHZj jGx0OtDKLjmx4tsYllvUDHqDuvF1nnNCm5XF2Hgu0J4HqqWMojiuHCH1YJC9HExkTB7R SF4g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh14si13144912ejb.534.2020.06.24.17.42.44; Wed, 24 Jun 2020 17:43:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388949AbgFYAmb (ORCPT + 99 others); Wed, 24 Jun 2020 20:42:31 -0400 Received: from mga14.intel.com ([192.55.52.115]:50377 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388830AbgFYAm0 (ORCPT ); Wed, 24 Jun 2020 20:42:26 -0400 IronPort-SDR: dhmuzB9G3PPCPnugLVTyx8IiYAxr7T4jbhFazGzMMwtET9aZHFTlGJMISZXskM5jPriorICLUb b41H7b5IHu0g== X-IronPort-AV: E=McAfee;i="6000,8403,9662"; a="143789085" X-IronPort-AV: E=Sophos;i="5.75,277,1589266800"; d="scan'208";a="143789085" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2020 17:42:25 -0700 IronPort-SDR: zdjQKndy7Dp+7g0lGPf/NZ03uqInuOzQUle0mkWa3LpVSznuEb917yLqMuNNWvUk7Nyaf2OOAV IGQ/cIynfLxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,277,1589266800"; d="scan'208";a="265219337" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.251.31.242]) ([10.251.31.242]) by fmsmga008.fm.intel.com with ESMTP; 24 Jun 2020 17:42:24 -0700 Subject: Re: DMA Engine: Transfer From Userspace To: Vinod Koul Cc: Federico Vaga , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, "Kumar, Sanjay K" , "Luck, Tony" References: <5614531.lOV4Wx5bFT@harkonnen> <20200621072457.GA2324254@vkoul-mobl> From: Dave Jiang Message-ID: <581f1761-e582-c770-169a-ee3374baf25c@intel.com> Date: Wed, 24 Jun 2020 17:42:24 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200621072457.GA2324254@vkoul-mobl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/21/2020 12:24 AM, 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. What about doing it with DMA engine that supports PASID? That way the user can really only trash its own address space and kernel is protected. > > 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. >