From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.4.y 2/3] mm: update memfd seal write check to include F_SEAL_WRITE
Date: Tue, 29 Jul 2025 22:43:19 -0400 [thread overview]
Message-ID: <1753842163-a00b7eb8@stable.kernel.org> (raw)
In-Reply-To: <20250730005818.2793577-3-isaacmanjarres@google.com>
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected.
No action required from the submitter.
The upstream commit SHA1 provided is correct: 28464bbb2ddc199433383994bcb9600c8034afa1
WARNING: Author mismatch between patch and upstream commit:
Backport author: Isaac J. Manjarres <isaacmanjarres@google.com>
Commit author: Lorenzo Stoakes <lstoakes@gmail.com>
Status in newer kernel trees:
6.15.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Not found
6.1.y | Not found
5.15.y | Not found
5.10.y | Not found
Note: The patch differs from the upstream commit:
---
1: 28464bbb2ddc ! 1: 3f153c98f29a mm: update memfd seal write check to include F_SEAL_WRITE
@@ Metadata
## Commit message ##
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.
@@ Commit message
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>
## fs/hugetlbfs/inode.c ##
@@ fs/hugetlbfs/inode.c: static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
- vm_flags_set(vma, VM_HUGETLB | VM_DONTEXPAND);
+ vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND;
vma->vm_ops = &hugetlb_vm_ops;
- ret = seal_check_future_write(info->seals, vma);
@@ fs/hugetlbfs/inode.c: static int hugetlbfs_file_mmap(struct file *file, struct v
## include/linux/mm.h ##
-@@ include/linux/mm.h: static inline void mem_dump_obj(void *object) {}
- #endif
+@@ include/linux/mm.h: static inline int pages_identical(struct page *page1, struct page *page2)
+ }
/**
- * seal_check_future_write - Check for F_SEAL_FUTURE_WRITE flag and handle it
@@ include/linux/mm.h: static inline void mem_dump_obj(void *object) {}
## mm/shmem.c ##
@@ mm/shmem.c: static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
- struct shmem_inode_info *info = SHMEM_I(inode);
+ struct shmem_inode_info *info = SHMEM_I(file_inode(file));
int ret;
- ret = seal_check_future_write(info->seals, vma);
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| 5.4 | Success | Success |
next prev parent reply other threads:[~2025-07-30 2:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 0:58 [PATCH 5.4.y 0/3] Backport series: "permit write-sealed memfd read-only shared mappings" Isaac J. Manjarres
2025-07-30 0:58 ` [PATCH 5.4.y 1/3] mm: drop the assumption that VM_SHARED always implies writable Isaac J. Manjarres
2025-07-30 2:43 ` Sasha Levin
2025-08-24 8:53 ` Patch "mm: drop the assumption that VM_SHARED always implies writable" has been added to the 5.4-stable tree gregkh
2025-07-30 0:58 ` [PATCH 5.4.y 2/3] mm: update memfd seal write check to include F_SEAL_WRITE Isaac J. Manjarres
2025-07-30 2:43 ` Sasha Levin [this message]
2025-08-24 8:53 ` Patch "mm: update memfd seal write check to include F_SEAL_WRITE" has been added to the 5.4-stable tree gregkh
2025-07-30 0:58 ` [PATCH 5.4.y 3/3] mm: perform the mapping_map_writable() check after call_mmap() Isaac J. Manjarres
2025-07-30 2:43 ` Sasha Levin
2025-08-24 8:53 ` Patch "mm: perform the mapping_map_writable() check after call_mmap()" has been added to the 5.4-stable tree gregkh
2025-07-30 1:27 ` [PATCH 5.4.y 0/3] Backport series: "permit write-sealed memfd read-only shared mappings" Matthew Wilcox
2025-07-30 1:59 ` Isaac Manjarres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1753842163-a00b7eb8@stable.kernel.org \
--to=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.