linux/arch/arm64
Lorenzo Stoakes ca5e863233 mm/gup: remove vmas parameter from get_user_pages_remote()
The only instances of get_user_pages_remote() invocations which used the
vmas parameter were for a single page which can instead simply look up the
VMA directly. In particular:-

- __update_ref_ctr() looked up the VMA but did nothing with it so we simply
  remove it.

- __access_remote_vm() was already using vma_lookup() when the original
  lookup failed so by doing the lookup directly this also de-duplicates the
  code.

We are able to perform these VMA operations as we already hold the
mmap_lock in order to be able to call get_user_pages_remote().

As part of this work we add get_user_page_vma_remote() which abstracts the
VMA lookup, error handling and decrementing the page reference count should
the VMA lookup fail.

This forms part of a broader set of patches intended to eliminate the vmas
parameter altogether.

[akpm@linux-foundation.org: avoid passing NULL to PTR_ERR]
Link: https://lkml.kernel.org/r/d20128c849ecdbf4dd01cc828fcec32127ed939a.1684350871.git.lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> (for arm64)
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com> (for s390)
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-06-09 16:25:26 -07:00
..
boot i.MX fixes for 6.4: 2023-05-25 17:22:38 +02:00
configs arm64: defconfig: enable building the nvmem-reboot-mode module 2023-04-17 16:38:41 +02:00
crypto crypto: arm64/aes-neonbs - fix crash with CFI enabled 2023-03-14 17:06:44 +08:00
hyperv
include cachestat: wire up cachestat for other architectures 2023-06-09 16:25:16 -07:00
kernel mm/gup: remove vmas parameter from get_user_pages_remote() 2023-06-09 16:25:26 -07:00
kvm Merge branch kvm-arm64/pgtable-fixes-6.4 into kvmarm-master/fixes 2023-05-11 15:26:01 +01:00
lib arm: uaccess: Remove memcpy_page_flushcache() 2023-03-27 16:26:19 +01:00
mm kasan: use internal prototypes matching gcc-13 builtins 2023-06-09 16:25:19 -07:00
net bpf, arm64: Fixed a BTI error on returning to patched function 2023-04-03 17:44:03 +02:00
tools s390: 2023-05-01 12:06:20 -07:00
xen
Kbuild
Kconfig - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
Kconfig.debug
Kconfig.platforms arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
Makefile arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00