From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ljs@kernel.org,akpm@linux-foundation.org
Subject: + uprobes-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch
Date: Tue, 24 Nov 2026 09:56:14 -0800 [thread overview]
Message-ID: <20261124175614.E36021F000C0@smtp.kernel.org> (raw)
In-Reply-To: <20261124-late-2026-vma-flags-v2-6-bf3fade93064@kernel.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7795 bytes --]
The patch titled
Subject: uprobes: convert VMA flag tests to use vma_flags_t
has been added to the -mm mm-new branch. Its filename is
uprobes-convert-vma-flag-tests-to-use-vma_flags_t.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/uprobes-convert-vma-flag-tests-to-use-vma_flags_t.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Subject: uprobes: convert VMA flag tests to use vma_flags_t
Date: Tue, 24 Nov 2026 17:07:58 +0000
Replace use of the legacy vm_flags_t flags with vma_flags_t values in the
uprobes VMA validity checks.
No functional change intended.
Link: https://patch.msgid.link/20261124-late-2026-vma-flags-v2-6-bf3fade93064@kernel.org
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Rik van Riel <riel@surriel.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Harry Yoo <harry@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Nico Pache <nico.pache@linux.dev>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Usama Arif <usama.arif@linux.dev>
Cc: Kiryl Shutsemau <kas@kernel.org>
Cc: Xu Xin <xu.xin@linux.dev>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <chleroy@kernel.org>
Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Kairui Song <kasong@tencent.com>
Cc: Qi Zheng <qi.zheng@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Yuanchu Xie <yuanchu@google.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: SJ Park <sj@kernel.org>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Georgia Garcia <georgia.garcia@canonical.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: James Morris <jmorris@namei.org>
Cc: Serge E. Hallyn <serge@hallyn.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: Roberto Sassu <roberto.sassu@huawei.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: Eric Snowberg <eric.snowberg@oracle.com>
Cc: Fan Wu <wufan@kernel.org>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Ondrej Mosnáček <omosnacek@gmail.com>
kernel/events/uprobes.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--- a/kernel/events/uprobes.c~uprobes-convert-vma-flag-tests-to-use-vma_flags_t
+++ a/kernel/events/uprobes.c
@@ -134,12 +134,14 @@ static void uprobe_warn(struct task_stru
*/
static bool valid_vma(struct vm_area_struct *vma, bool is_register)
{
- vm_flags_t flags = VM_HUGETLB | VM_MAYEXEC | VM_MAYSHARE;
+ vma_flags_t forbidden = mk_vma_flags(VMA_HUGETLB_BIT,
+ VMA_MAYSHARE_BIT);
if (is_register)
- flags |= VM_WRITE;
+ vma_flags_set(&forbidden, VMA_WRITE_BIT);
- return vma->vm_file && (vma->vm_flags & flags) == VM_MAYEXEC;
+ return vma->vm_file && vma_test(vma, VMA_MAYEXEC_BIT) &&
+ !vma_test_any_mask(vma, forbidden);
}
static unsigned long offset_to_vaddr(struct vm_area_struct *vma, loff_t offset)
@@ -286,7 +288,7 @@ static bool valid_ref_ctr_vma(struct upr
return uprobe->ref_ctr_offset &&
vma->vm_file &&
file_inode(vma->vm_file) == uprobe->inode &&
- (vma->vm_flags & (VM_WRITE|VM_SHARED)) == VM_WRITE &&
+ vma_test(vma, VMA_WRITE_BIT) && !vma_test(vma, VMA_SHARED_BIT) &&
vma->vm_start <= vaddr &&
vma->vm_end > vaddr;
}
@@ -1607,7 +1609,7 @@ int uprobe_mmap(struct vm_area_struct *v
return 0;
if (vma->vm_file &&
- (vma->vm_flags & (VM_WRITE|VM_SHARED)) == VM_WRITE &&
+ vma_test(vma, VMA_WRITE_BIT) && !vma_test(vma, VMA_SHARED_BIT) &&
mm_flags_test(MMF_HAS_UPROBES, vma->vm_mm))
delayed_ref_ctr_inc(vma);
_
Patches currently in -mm which might be from ljs@kernel.org are
mm-msync-return-enomem-if-page-aligned-length-overflows.patch
mm-vma-drop-mm-asynchronously-in-vma_start_read.patch
mm-vma-predicate-vma_assert_stabilised-on-config_debug_vm.patch
mm-only-assert-mmap-locks-if-config_debug_vm-or-lockdep-is-set.patch
mm-only-assert-vma-locks-if-config_debug_vm-is-set.patch
mm-convert-warn_on_onces-to-vm_warn_on_once-in-vma-lock-code.patch
mm-madvise-zap-markers-from-guard-regions.patch
mm-mmap-free-gathered-pages-before-mmf_oom_skip.patch
percpu-fix-contig-hints-that-are-too-low.patch
percpu-search-the-whole-reserved-chunk.patch
mm-filemap-convert-fault-and-readahead-logic-to-use-vma_flags_t.patch
mm-madvise-convert-madvise_vma_behavior-to-use-vma_flags_t.patch
mm-convert-miscellaneous-vma-flag-tests-to-use-vma_flags_t.patch
fs-proc-task_mmu-convert-vma-flag-tests-to-use-vma_flags_t.patch
fs-coredump-convert-vma_dump_size-to-use-vma_flags_t.patch
uprobes-convert-vma-flag-tests-to-use-vma_flags_t.patch
perf-convert-vma-flag-tests-to-use-vma_flags_t.patch
selinux-convert-vma-flag-tests-to-use-vma_flags_t.patch
apparmor-convert-vma-flag-tests-to-use-vma_flags_t.patch
ima-convert-vma-flag-tests-to-use-vma_flags_t.patch
ipe-convert-vma-flag-tests-to-use-vma_flags_t.patch
next prev parent reply other threads:[~2026-11-24 17:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 17:07 [PATCH v2 00/11] mm: continue vma_flags_t conversion Lorenzo Stoakes (ARM)
2026-11-24 17:07 ` [PATCH v2 01/11] mm/filemap: convert fault and readahead logic to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:20 ` Jan Kara
2026-11-24 17:55 ` + mm-filemap-convert-fault-and-readahead-logic-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:07 ` [PATCH v2 02/11] mm/madvise: convert madvise_vma_behavior() to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:55 ` + mm-madvise-convert-madvise_vma_behavior-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:07 ` [PATCH v2 03/11] mm: convert miscellaneous VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + mm-convert-miscellaneous-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:07 ` [PATCH v2 04/11] fs/proc/task_mmu: convert VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + fs-proc-task_mmu-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:07 ` [PATCH v2 05/11] fs/coredump: convert vma_dump_size() to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + fs-coredump-convert-vma_dump_size-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:07 ` [PATCH v2 06/11] uprobes: convert VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` Andrew Morton [this message]
2026-11-24 17:07 ` [PATCH v2 07/11] perf: " Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + perf-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:08 ` [PATCH v2 08/11] selinux: convert VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + selinux-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-12-02 3:49 ` [PATCH v2 08/11] selinux: convert VMA flag tests to use vma_flags_t Paul Moore
2026-12-02 4:06 ` [merged selinux/dev] selinux-convert-vma-flag-tests-to-use-vma_flags_t.patch removed from -mm tree Andrew Morton
2026-11-24 17:08 ` [PATCH v2 09/11] apparmor: convert VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + apparmor-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:08 ` [PATCH v2 10/11] ima: convert VMA flag tests to use vma_flags_t Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + ima-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 22:43 ` [PATCH v2 10/11] ima: convert VMA flag tests to use vma_flags_t Mimi Zohar
2026-11-24 17:08 ` [PATCH v2 11/11] ipe: " Lorenzo Stoakes (ARM)
2026-11-24 17:56 ` + ipe-convert-vma-flag-tests-to-use-vma_flags_t.patch added to mm-new branch Andrew Morton
2026-11-24 17:21 ` [PATCH v2 00/11] mm: continue vma_flags_t conversion sashiko-bot
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=20261124175614.E36021F000C0@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=ljs@kernel.org \
--cc=mm-commits@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.