Axel Rasmussen
ec166f77f9
BACKPORT: FROMGIT: userfaultfd/shmem: support minor fault registration for shmem
...
This patch allows shmem-backed VMAs to be registered for minor faults.
Minor faults are appropriately relayed to userspace in the fault path, for
VMAs with the relevant flag.
This commit doesn't hook up the UFFDIO_CONTINUE ioctl for shmem-backed
minor faults, though, so userspace doesn't yet have a way to resolve such
faults.
Because of this, we also don't yet advertise this as a supported feature.
That will be done in a separate commit when the feature is fully
implemented.
Link: https://lkml.kernel.org/r/20210503180737.2487560-4-axelrasmussen@google.com
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Acked-by: Peter Xu <peterx@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: "Dr . David Alan Gilbert" <dgilbert@redhat.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Oliver Upton <oupton@google.com>
Cc: Shaohua Li <shli@fb.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Wang Qing <wangqing@vivo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
(cherry picked from commit 6867a29320b7d178feb9786856e5ea2cf40f6d33
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Link: https://lore.kernel.org/patchwork/patch/1420970/
Conflicts: mm/shmem.c
(Manual rebase)
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 187930641
Change-Id: Ib8e3fe202feab7404742814f4250a0981065368c
2025-05-18 08:08:42 +00:00
..
9p
This is the 5.4.276 stable release
2024-05-17 15:29:56 +00:00
adfs
affs
affs: don't write overlarge OFS data block size fields
2025-04-10 14:29:42 +02:00
afs
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
autofs
autofs: fix memory leak of waitqueues in autofs_catatonic_mode
2023-09-23 11:00:02 +02:00
befs
bfs
btrfs
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
cachefiles
cachefiles: fix memory leak in cachefiles_add_cache()
2024-03-06 14:36:10 +00:00
ceph
This is the 5.4.285 stable release
2024-11-09 11:29:17 +00:00
cifs
Merge 5.4.287 into android11-5.4-lts
2024-12-16 10:50:16 +00:00
coda
configfs
cramfs
crypto
debugfs
new helper: lookup_positive_unlocked()
2023-09-23 10:59:40 +02:00
devpts
dlm
dlm: fix plock lookup when using multiple lockspaces
2023-09-23 10:59:55 +02:00
ecryptfs
This is the 5.4.278 stable release
2024-06-18 14:18:49 +00:00
efivarfs
efivarfs: Fix error on non-existent file
2025-01-09 13:23:28 +01:00
efs
erofs
Merge tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-02-06 22:53:05 +02:00
exfat
Merge branch 'for-kernel-version-from-4.1.0' of https://github.com/namjaejeon/linux-exfat-oot into android13-5.4-lahaina
2024-04-16 00:03:08 +03:00
exportfs
ext2
This is the 5.4.257 stable release
2023-09-30 11:33:27 +00:00
ext4
This is the 5.4.290 stable release
2025-02-05 17:00:16 +00:00
f2fs
Merge tag 'ASB-2025-04-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-04-23 17:49:35 +03:00
fat
fat: fix uninitialized variable
2024-11-08 16:20:47 +01:00
freevxfs
fscache
fuse
Merge tag 'ASB-2025-05-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-05-18 08:00:20 +00:00
gfs2
This is the 5.4.290 stable release
2025-02-05 17:00:16 +00:00
hfs
This is the 5.4.290 stable release
2025-02-05 17:00:16 +00:00
hfsplus
Merge 5.4.287 into android11-5.4-lts
2024-12-16 10:50:16 +00:00
hostfs
hpfs
hugetlbfs
fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super
2024-03-06 14:36:10 +00:00
incfs
iomap
This is the 5.4.270 stable release
2024-03-05 14:53:04 +00:00
isofs
isofs: fix KMSAN uninit-value bug in do_isofs_readdir()
2025-04-10 14:29:41 +02:00
jbd2
jbd2: flush filesystem device before updating tail sequence
2025-02-01 18:18:44 +01:00
jffs2
Merge 5.4.287 into android11-5.4-lts
2024-12-16 10:50:16 +00:00
jfs
This is the 5.4.292 stable release
2025-04-11 08:16:05 +00:00
kernfs
This is the 5.4.269 stable release
2024-02-24 15:47:08 +00:00
lockd
fs: lockd: avoid possible wrong NULL parameter
2023-09-23 10:59:48 +02:00
minix
nfs
This is the 5.4.289 stable release
2025-01-10 07:30:07 +00:00
nfs_common
nfsd
NFSD: Reset cb_seq_status after NFS4ERR_DELAY
2025-03-13 12:43:01 +01:00
nilfs2
nilfs2: protect access to buffers with no active references
2025-03-13 12:43:18 +01:00
nls
Revert "fs/nls: make load_nls() take a const parameter"
2023-09-30 15:41:35 +00:00
notify
This is the 5.4.251 stable release
2023-08-03 10:56:28 +00:00
ntfs
ocfs2
This is the 5.4.292 stable release
2025-04-11 08:16:05 +00:00
omfs
openpromfs
openpromfs: finish conversion to the new mount API
2024-06-16 13:28:32 +02:00
orangefs
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
overlayfs
Merge tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-02-06 22:53:05 +02:00
proc
BACKPORT: FROMGIT: userfaultfd: add minor fault registration mode
2025-05-18 08:08:42 +00:00
pstore
Merge tag 'ASB-2024-06-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2024-06-22 17:58:09 +03:00
qnx4
qnx6
quota
quota: flush quota_release_work upon quota writeback
2024-12-14 19:44:42 +01:00
ramfs
reiserfs
This is the 5.4.257 stable release
2023-09-30 11:33:27 +00:00
romfs
squashfs
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
sysfs
This is the 5.4.275 stable release
2024-05-15 16:00:38 +00:00
sysv
sysv: don't call sb_bread() with pointers_lock held
2024-04-13 12:51:38 +02:00
tracefs
This is the 5.4.257 stable release
2023-09-30 11:33:27 +00:00
ubifs
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
udf
udf: Fix use of check_add_overflow() with mixed type arguments
2025-03-13 12:42:51 +01:00
ufs
unicode
Revert "unicode: Don't special case ignorable code points"
2024-12-14 19:44:55 +01:00
verity
This is the 5.4.257 stable release
2023-09-30 11:33:27 +00:00
xfs
This is the 5.4.288 stable release
2024-12-27 16:16:36 +00:00
aio.c
BACKPORT: FROMLIST: Revert "mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio"
2025-05-18 08:08:42 +00:00
anon_inodes.c
UPSTREAM: fs: anon_inodes: rephrase to appropriate kernel-doc
2025-02-20 04:17:46 +02:00
attr.c
attr: block mode changes of symlinks
2023-09-23 11:00:06 +02:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
fs: binfmt_elf_efpic: don't use missing interpreter's properties
2024-09-04 13:14:54 +02:00
binfmt_em86.c
binfmt_flat.c
binfmt_flat: Fix integer overflow bug on 32 bit systems
2025-03-13 12:43:07 +01:00
binfmt_misc.c
binfmt_misc: cleanup on filesystem umount
2024-09-04 13:14:53 +02:00
binfmt_script.c
block_dev.c
block: Don't invalidate pagecache for invalid falloc modes
2024-01-08 11:29:48 +01:00
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
lsm: new security_file_ioctl_compat() hook
2024-02-23 08:25:15 +01:00
coredump.c
d_path.c
dax.c
dcache.c
fs: better handle deep ancestor chains in is_subdir()
2024-07-27 10:38:32 +02:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventfd: prevent underflow for eventfd semaphores
2023-09-23 10:59:40 +02:00
eventpoll.c
This is the 5.4.289 stable release
2025-01-10 07:30:07 +00:00
exec.c
This is the 5.4.285 stable release
2024-11-09 11:29:17 +00:00
fcntl.c
fs: Fix file_set_fowner LSM hook inconsistencies
2024-11-08 16:20:34 +01:00
fhandle.c
do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak
2024-03-26 18:22:13 -04:00
file.c
fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE
2024-09-04 13:14:50 +02:00
file_table.c
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
inode.c
This is the 5.4.285 stable release
2024-11-09 11:29:17 +00:00
internal.h
io_uring.c
This is the 5.4.278 stable release
2024-06-18 14:18:49 +00:00
ioctl.c
Kconfig
Kconfig.binfmt
libfs.c
UPSTREAM: fs: add LSM-supporting anon-inode interface
2025-02-20 04:17:45 +02:00
locks.c
filelock: Correct the filelock owner in fcntl_setlk/fcntl_setlk64
2024-09-04 13:15:02 +02:00
Makefile
mbcache.c
mount.h
mpage.c
namei.c
This is the 5.4.292 stable release
2025-04-11 08:16:05 +00:00
namespace.c
This is the 5.4.285 stable release
2024-11-09 11:29:17 +00:00
no-block.c
nsfs.c
open.c
This is the 5.4.279 stable release
2024-07-08 13:55:50 +00:00
OWNERS
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
select.c
fs/select: rework stack allocation hack for clang
2024-03-26 18:22:13 -04:00
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
fs: explicitly unregister per-superblock BDIs
2024-11-08 16:20:26 +01:00
sync.c
This is the 5.4.263 stable release
2023-12-11 12:08:17 +00:00
timerfd.c
userfaultfd.c
BACKPORT: FROMGIT: userfaultfd/shmem: support minor fault registration for shmem
2025-05-18 08:08:42 +00:00
utimes.c
xattr.c