android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Stoakes 55933e9538 mm: update memfd seal write check to include F_SEAL_WRITE
[ Upstream commit 28464bbb2ddc199433383994bcb9600c8034afa1 ]

The seal_check_future_write() function is called by shmem_mmap() or
hugetlbfs_file_mmap() to disallow any future writable mappings of an memfd
sealed this way.

The F_SEAL_WRITE flag is not checked here, as that is handled via the
mapping->i_mmap_writable mechanism and so any attempt at a mapping would
fail before this could be run.

However we intend to change this, meaning this check can be performed for
F_SEAL_WRITE mappings also.

The logic here is equally applicable to both flags, so update this
function to accommodate both and rename it accordingly.

Link: https://lkml.kernel.org/r/913628168ce6cce77df7d13a63970bae06a526e0.1697116581.git.lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: [email protected]
Signed-off-by: Isaac J. Manjarres <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-08-28 16:21:36 +02:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:02:52 +01:00
asm-generic
clocksource
crypto
drm drm/sched: Increment job count before swapping tail spsc queue 2025-07-17 18:25:03 +02:00
dt-bindings
keys
kvm
linux mm: update memfd seal write check to include F_SEAL_WRITE 2025-08-28 16:21:36 +02:00
math-emu
media
misc
net wifi: cfg80211: Fix interface type validation 2025-08-28 16:21:26 +02:00
pcmcia
ras
rdma RDMA/core: Create and destroy counters in the ib_core 2025-07-17 18:24:59 +02:00
scsi
soc
sound ALSA: pcm: Fix race of buffer access at PCM OSS layer 2025-06-04 14:32:35 +02:00
target
trace erofs: remove unused trace event erofs_destroy_inode 2025-06-27 11:02:57 +01:00
uapi move_mount: allow to add a mount into an existing group 2025-08-28 16:21:32 +02:00
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-05-02 07:39:09 +02:00