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 <lstoakes@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@vger.kernel.org
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:41:22 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 14:34:23 -08:00
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 media: rename VFL_TYPE_GRABBER to _VIDEO 2024-03-26 18:22:22 -04:00
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 scsi: core: Introduce the scsi_cmd_to_rq() function 2023-12-08 08:44:28 +01:00
soc soc: fsl: qbman: Add CGR update function 2024-04-13 12:51:27 +02:00
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 video: of_display_timing.h: include errno.h 2022-07-12 16:30:47 +02:00
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-05-02 07:39:09 +02:00