All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yu, Fenghua" <fenghua.yu@intel.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>,
	Vinod Koul <vkoul@kernel.org>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"Zhu, Tony" <tony.zhu@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Christoph Hellwig <hch@infradead.org>,
	"Shankar, Ravi V" <ravi.v.shankar@intel.com>
Subject: RE: [PATCH 09/17] mm: export access_remote_vm() symbol
Date: Thu, 5 Jan 2023 20:58:08 +0000	[thread overview]
Message-ID: <IA1PR11MB6097D5C6C3182A3C782E99D89BFA9@IA1PR11MB6097.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87tu15u061.fsf@nvidia.com>

Hi, Alistair,

> >> Alistair Popple <apopple@nvidia.com> writes:
> >> Lorenzo Stoakes <lstoakes@gmail.com> writes:
> >> > My concern is exposing something highly delicate _which accesses
> >> > remote mas a public API with implicit assumptions whose one and
> >> > only (core kernel) user treats with enormous caution. Even if this
> >> > iommu code were to use it correctly, we'd end up with an interface
> >> > which could be
> >> subject to real risks which other drivers may misuse.
> >>
> >> Ok, although I think making this an iommu specific wrapper taking a
> >> PASID rather than mm_struct would make the API more specific and less
> >> likely to be misused as the mm_count/users lifetime issues could be
> >> dealt with inside the core IOMMU code.
> >
> > The iommu specific wrapper still needs to call access_remote_vm()
> > which is in generic mm. We cannot avoid to export access_remote_vm(), right?
> 
> The wrapper still needs to call access_remote_vm(), but that doesn't imply
> access_remote_vm() needs to be exported. I think the logical place to put the
> wrapper would be in iommu-sva.c which isn't built as a module, so you would
> only have to EXPORT_SYMBOL_GPL the wrapper and not access_remote_vm().

This looks better than exporting access_remote_vm(). I will remove this patch
and write the IOMMU wrapper to call access_remote_vm() in v2.

Thanks.

-Fenghua

  reply	other threads:[~2023-01-05 20:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 16:34 [PATCH 00/17] Enable DSA 2.0 Event Log and completion record faulting features Fenghua Yu
2023-01-03 16:34 ` [PATCH 01/17] dmaengine: idxd: make misc interrupt one shot Fenghua Yu
2023-01-03 16:34 ` [PATCH 02/17] dmaengine: idxd: add event log size sysfs attribute Fenghua Yu
2023-01-03 16:34 ` [PATCH 03/17] dmaengine: idxd: setup event log configuration Fenghua Yu
2023-01-03 16:34 ` [PATCH 04/17] dmaengine: idxd: add interrupt handling for event log Fenghua Yu
2023-01-03 16:34 ` [PATCH 05/17] dmanegine: idxd: add debugfs for event log dump Fenghua Yu
2023-01-03 16:34 ` [PATCH 06/17] dmaengine: idxd: add per DSA wq workqueue for processing cr faults Fenghua Yu
2023-01-03 16:34 ` [PATCH 07/17] dmaengine: idxd: create kmem cache for event log fault items Fenghua Yu
2023-01-03 16:34 ` [PATCH 08/17] iommu: expose iommu_sva_find() to common header Fenghua Yu
2023-01-03 16:34 ` [PATCH 09/17] mm: export access_remote_vm() symbol Fenghua Yu
2023-01-03 17:45   ` Lorenzo Stoakes
2023-01-03 17:50     ` Lorenzo Stoakes
2023-01-03 19:20       ` Yu, Fenghua
2023-01-03 20:13         ` Lorenzo Stoakes
2023-01-04  5:06           ` Yu, Fenghua
2023-01-04  6:12             ` Alistair Popple
2023-01-04 19:00               ` Yu, Fenghua
2023-01-04 20:00                 ` Lorenzo Stoakes
2023-01-04 19:56               ` Lorenzo Stoakes
2023-01-04 21:05                 ` Lorenzo Stoakes
2023-01-04 23:57                 ` Alistair Popple
2023-01-05  3:08                   ` Yu, Fenghua
2023-01-05  3:22                     ` Alistair Popple
2023-01-05 20:58                       ` Yu, Fenghua [this message]
2023-01-05 21:04                         ` Lorenzo Stoakes
2023-01-05  7:26                   ` Lorenzo Stoakes
2023-01-08 17:36     ` Christoph Hellwig
2023-03-01 23:39       ` Fenghua Yu
2023-01-03 16:34 ` [PATCH 10/17] dmaengine: idxd: process user page faults for completion record Fenghua Yu
2023-01-03 16:34 ` [PATCH 11/17] dmaengine: idxd: add descs_completed field " Fenghua Yu
2023-01-03 16:35 ` [PATCH 12/17] dmaengine: idxd: process batch descriptor completion record faults Fenghua Yu
2023-01-03 16:35 ` [PATCH 13/17] dmaengine: idxd: add per file user counters for " Fenghua Yu
2023-01-03 16:35 ` [PATCH 14/17] dmaengine: idxd: add a device to represent the file opened Fenghua Yu
2023-01-03 16:35 ` [PATCH 15/17] dmaengine: idxd: expose fault counters to sysfs Fenghua Yu
2023-01-03 16:35 ` [PATCH 16/17] dmaengine: idxd: add pid to exported sysfs attribute for opened file Fenghua Yu
2023-01-03 16:35 ` [PATCH 17/17] dmaengine: idxd: add per wq PRS disable Fenghua Yu
     [not found] <20230103162920.1569002-1-fenghua.yu@intel.com>
2023-01-03 16:29 ` [PATCH 09/17] mm: export access_remote_vm() symbol Fenghua Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=IA1PR11MB6097D5C6C3182A3C782E99D89BFA9@IA1PR11MB6097.namprd11.prod.outlook.com \
    --to=fenghua.yu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=tony.zhu@intel.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.