linux/fs/ecryptfs
Lorenzo Stoakes b013ed4031
fs: consistently use can_mmap_file() helper
Since commit c84bf6dd2b ("mm: introduce new .mmap_prepare() file
callback"), the f_op->mmap() hook has been deprecated in favour of
f_op->mmap_prepare().

Additionally, commit bb666b7c27 ("mm: add mmap_prepare() compatibility
layer for nested file systems") permits the use of the .mmap_prepare() hook
even in nested filesystems like overlayfs.

There are a number of places where we check only for f_op->mmap - this is
incorrect now mmap_prepare exists, so update all of these to use the
general helper can_mmap_file().

Most notably, this updates the elf logic to allow for the ability to
execute binaries on filesystems which have the .mmap_prepare hook, but
additionally we update nested filesystems.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Link: https://lore.kernel.org/b68145b609532e62bab603dd9686faa6562046ec.1750099179.git.lorenzo.stoakes@oracle.com
Acked-by: Kees Cook <kees@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-06-17 13:47:22 +02:00
..
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
Makefile
crypto.c ecryptfs: Pass the folio index to crypt_extent() 2024-11-05 17:20:00 +01:00
debug.c ecryptfs: debug: Demote a couple of kernel-doc abuses 2021-04-19 04:42:13 +00:00
dentry.c Pass parent directory inode and expected name to ->d_revalidate() 2025-01-27 19:25:23 -05:00
ecryptfs_kernel.h ecryptfs: Convert ecryptfs to use the new mount API 2024-11-15 11:50:13 +01:00
file.c fs: consistently use can_mmap_file() helper 2025-06-17 13:47:22 +02:00
inode.c VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
keystore.c ecryptfs: Fix buffer size for tag 66 packet 2024-04-05 15:53:46 +02:00
kthread.c ecryptfs: kthread: Demote file header and provide description for 'cred' 2021-04-19 04:42:13 +00:00
main.c ecryptfs: Fix spelling mistake "validationg" -> "validating" 2024-11-15 11:51:29 +01:00
messaging.c eCryptfs: Use DEFINE_MUTEX() for mutex lock 2021-04-19 04:42:13 +00:00
miscdev.c ecryptfs: miscdev: File headers are not good kernel-doc candidates 2021-04-19 04:42:13 +00:00
mmap.c ecryptfs: Convert ecryptfs_decrypt_page() to take a folio 2024-11-05 17:20:00 +01:00
read_write.c ecryptfs: Convert ecryptfs_encrypt_page() to take a folio 2024-11-05 17:19:59 +01:00
super.c ecryptfs: remove NULL remount_fs from super_operations 2025-03-01 11:02:36 +01:00