From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730086AbgJHMlv (ORCPT ); Thu, 8 Oct 2020 08:41:51 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97FEBC0613D5 for ; Thu, 8 Oct 2020 05:41:51 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id x22so3868275pfo.12 for ; Thu, 08 Oct 2020 05:41:51 -0700 (PDT) Date: Thu, 8 Oct 2020 09:41:47 -0300 From: Jason Gunthorpe Subject: Re: [PATCH 10/13] PCI: revoke mappings like devmem Message-ID: <20201008124147.GD5177@ziepe.ca> References: <20201007164426.1812530-1-daniel.vetter@ffwll.ch> <20201007164426.1812530-11-daniel.vetter@ffwll.ch> <20201007232448.GC5177@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-ID: To: Dan Williams Cc: Daniel Vetter , DRI Development , LKML , KVM list , Linux MM , Linux ARM , linux-samsung-soc , "Linux-media@vger.kernel.org" , linux-s390 , Daniel Vetter , Kees Cook , Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Jan Kara , Bjorn Helgaas , Linux PCI On Thu, Oct 08, 2020 at 12:49:54AM -0700, Dan Williams wrote: > > This is what got me thinking maybe this needs to be a bit bigger > > generic infrastructure - eg enter this scheme from fops mmap and > > everything else is in mm/user_iomem.c > > It still requires every file that can map physical memory to have its > ->open fop do Common infrastructure would have to create a dummy struct file at mmap time with the global inode and attach that to the VMA. Jason