[PATCH v2 00/13] mm: convert further simple mmap hooks to mmap_prepare

From: Lorenzo Stoakes (ARM)

Date: Tue Nov 24 2026 - 09:03:30 EST


Continue the conversion of users of the deprecated f_op->mmap callback to
f_op->mmap_prepare. Keep things gentle this cycle by targeting simple
cases.

No functional change intended.

Build tested on x86-64 (allmodconfig, each patch individually), i386,
arm64 and ppc64le.

Andrew - could you take this through your tree as it's a kernel-wide
change? Thanks!

Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
---
v2:
* Added tags, thanks everybody!
* cc'd linux-mm, Andrew.
* Dropped the vduse patch (was 4/14), as commit bb2e6f166547 ("vduse: fix
VA/PA confusion in the coherent page fault path") completely broke the
driver and was merged without testing as a hotfix. Conversion can wait
for that to get fixed.

v1:
https://lore.kernel.org/r/20261105-late-2026-mmap_prepare-v1-0-c56aadfbab8a@xxxxxxxxxx

---
Lorenzo Stoakes (ARM) (13):
xen/privcmd: convert mmap hook to mmap_prepare
KVM: PPC: Book3S: convert spapr TCE mmap hook to mmap_prepare
mshv_vtl: convert mmap hooks to mmap_prepare
x86/sgx: convert vepc mmap hook to mmap_prepare
udf: convert mmap hook to mmap_prepare
selinuxfs: convert mmap hooks to mmap_prepare
xen: convert xenstore interface mmap hooks to mmap_prepare
soc: aspeed: convert LPC and P2A control mmap hooks to mmap_prepare
soc: qcom: rmtfs_mem: convert mmap hook to mmap_prepare
tee: convert shm mmap hook to mmap_prepare
misc: bcm-vk: convert mmap hook to mmap_prepare
ptp: vmclock: convert mmap hook to mmap_prepare
vhost-vdpa: convert mmap hook to mmap_prepare

arch/powerpc/kvm/book3s_64_vio.c | 6 +++---
arch/x86/kernel/cpu/sgx/virt.c | 15 ++++++++-------
drivers/hv/mshv_vtl_main.c | 14 +++++++-------
drivers/misc/bcm-vk/bcm_vk_dev.c | 20 ++++++++++----------
drivers/ptp/ptp_vmclock.c | 19 +++++++++----------
drivers/soc/aspeed/aspeed-lpc-ctrl.c | 20 +++++++++-----------
drivers/soc/aspeed/aspeed-p2a-ctrl.c | 22 ++++++++--------------
drivers/soc/qcom/rmtfs_mem.c | 22 ++++++++++------------
drivers/tee/tee_shm.c | 14 +++++++-------
drivers/vhost/vdpa.c | 23 ++++++++++++-----------
drivers/xen/privcmd.c | 11 +++++------
drivers/xen/xenbus/xenbus_dev_backend.c | 14 ++++++--------
drivers/xen/xenfs/xenstored.c | 14 ++++++--------
fs/udf/file.c | 8 ++++----
security/selinux/selinuxfs.c | 24 +++++++++++-------------
15 files changed, 115 insertions(+), 131 deletions(-)
---
base-commit: 5bd93e4b0b357e9d0a13199887aacbf04d1ce216
change-id: 20261101-late-2026-mmap_prepare-02c87d23101e

Cheers,
--
Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>