On Tue, Aug 5, 2025 at 7:18 AM Vlastimil Babka wrote:
>
> On 8/5/25 1:15 AM, Suren Baghdasaryan wrote:
> > Utilize per-vma locks to stabilize vma after lookup without taking
> > mmap_lock during PROCMAP_QUERY ioctl execution. If vma lock is
> > contended, we fall back
back path will fail and ioctl is
done under mmap_lock protection.
This change is designed to reduce mmap_lock contention and prevent
PROCMAP_QUERY ioctl calls from blocking address space updates.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/task_mmu.c | 81
ile->private_data members by ioctl and /proc/pid/maps readers.
The change is pure code refactoring and has no functional changes.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/internal.h | 15 ++
fs/proc/task_mmu.c | 70 ++--
fs/proc/task_n
Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
Tested-by: SeongJae Park
Acked-by: SeongJae Park
---
tools/testing/selftests/proc/proc-maps-race.c | 65
SeongJae Park
- Fixed NOMMU case, per Vlastimil Babka
- Renamed proc_maps_query_data to proc_maps_locking_ctx,
per Vlastimil Babka
[1] https://lore.kernel.org/all/20250704060727.724817-1-sur...@google.com/
[2] https://lore.kernel.org/all/20250731220024.702621-1-sur...@google.com/
Suren Baghdasaryan (3
lines() and print_last_lines() thus
> resolving the warnings invoked.
>
> The test executes fine after this change thus causing no
> affect to the functional behavior of the test.
Please add:
Fixes: aadc099c480f ("selftests/proc: add verbose mode for
/proc/pid/maps tearing tests&q
On Fri, Aug 1, 2025 at 6:38 PM SeongJae Park wrote:
>
> On Thu, 31 Jul 2025 15:00:22 -0700 Suren Baghdasaryan
> wrote:
>
> > Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation
> > correctness while the vma is being concurrently modified.
>
On Fri, Aug 1, 2025 at 3:55 AM Vlastimil Babka wrote:
>
> On 8/1/25 00:00, Suren Baghdasaryan wrote:
> > Refactor struct proc_maps_private so that the fields used by PROCMAP_QUERY
> > ioctl are moved into a separate structure. In the next patch this allows
> > ioctl to reu
back path will fail and ioctl is
done under mmap_lock protection.
This change is designed to reduce mmap_lock contention and prevent
PROCMAP_QUERY ioctl calls from blocking address space updates.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/task_mmu.c | 81
ile->private_data members by ioctl and /proc/pid/maps readers.
The change is pure code refactoring and has no functional changes.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/internal.h | 15 ++
fs/proc/task_mmu.c | 70 +++---
2 files chang
Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 65 +++
1 file changed, 65 insertions(+)
diff --git a
...@google.com/
Suren Baghdasaryan (3):
selftests/proc: test PROCMAP_QUERY ioctl while vma is concurrently
modified
fs/proc/task_mmu: factor out proc_maps_private fields used by
PROCMAP_QUERY
fs/proc/task_mmu: execute PROCMAP_QUERY ioctl under per-vma locks
fs/proc/internal.h
d-off-by: Suren Baghdasaryan
Reviewed-by: Vlastimil Babka
---
fs/proc/internal.h| 5 ++
fs/proc/task_mmu.c| 141 +++---
include/linux/mmap_lock.h | 11 +++
mm/madvise.c | 3 +-
mm/mmap_lock.c| 93 +++
loff_t into unsigned type is not needed. Similarly, sentinel values
don't need to be unsigned. Remove type conversion for set_file position
and change sentinel values to signed. While at it, change the hardcoded
sentinel values with named definitions for better documentation.
Signed-off-by: Su
Add verbose mode to the /proc/pid/maps tearing tests to print debugging
information. VERBOSE environment variable is used to enable it.
Usage example: VERBOSE=1 ./proc-maps-race
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 153 --
1 file
concurrently from under the reader. We should always see either
original vma or the split one with no holes.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 86 +++
1 file changed, 86 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps
the vma.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 79 +++
1 file changed, 79 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps-race.c
b/tools/testing/selftests/proc/proc-maps-race.c
index 5b28dda08b7d..19028bd3b85c
second page for consistency, looking for the
effects of vma splits or merges.
The test duration is configurable via DURATION environment variable
expressed in seconds. The default test duration is 5 seconds.
Example Command: DURATION=10 ./proc-maps-race
Signed-off-by: Suren Baghdasaryan
---
tools/testing
ucifer.local/
[4] https://lore.kernel.org/all/20250716030557.1547501-1-sur...@google.com/
Suren Baghdasaryan (6):
selftests/proc: add /proc/pid/maps tearing from vma split test
selftests/proc: extend /proc/pid/maps tearing test to include vma
resizing
selftests/proc: extend /proc/pid/maps tear
On Wed, Jul 16, 2025 at 3:55 PM Andrew Morton wrote:
>
> On Tue, 15 Jul 2025 20:05:49 -0700 Suren Baghdasaryan
> wrote:
>
> > This patchset switches from holding mmap_lock while reading /proc/pid/maps
> > to taking per-vma locks as we walk the vma tree.
>
> Thanks
On Wed, Jul 16, 2025 at 7:20 AM Suren Baghdasaryan wrote:
>
> On Wed, Jul 16, 2025 at 3:50 AM Lorenzo Stoakes
> wrote:
> >
> > On Wed, Jul 16, 2025 at 12:44:23PM +0200, David Hildenbrand wrote:
> > > On 16.07.25 05:05, Suren Baghdasaryan wrote:
> > > >
On Wed, Jul 16, 2025 at 3:40 AM Lorenzo Stoakes
wrote:
>
> On Wed, Jul 16, 2025 at 12:04:25PM +0200, David Hildenbrand wrote:
> > On 16.07.25 05:05, Suren Baghdasaryan wrote:
> > > Extend /proc/pid/maps tearing test to verify PROCMAP_QUERY ioctl operation
> > > corr
On Wed, Jul 16, 2025 at 6:57 AM Vlastimil Babka wrote:
>
> On 7/16/25 05:05, Suren Baghdasaryan wrote:
> > With maple_tree supporting vma tree traversal under RCU and per-vma
> > locks, /proc/pid/maps can be read while holding individual vma locks
> > instead of locking
On Wed, Jul 16, 2025 at 7:07 AM Vlastimil Babka wrote:
>
> On 7/16/25 16:00, Lorenzo Stoakes wrote:
> > On Tue, Jul 15, 2025 at 01:13:36PM -0700, Suren Baghdasaryan wrote:
> >> Huh, I completely failed to consider this. In hindsight it is quite
> >> obvious... Than
On Wed, Jul 16, 2025 at 3:50 AM Lorenzo Stoakes
wrote:
>
> On Wed, Jul 16, 2025 at 12:44:23PM +0200, David Hildenbrand wrote:
> > On 16.07.25 05:05, Suren Baghdasaryan wrote:
> > > The /proc/pid/maps file is generated page by page, with the mmap_lock
> > > released
d-off-by: Suren Baghdasaryan
---
fs/proc/internal.h| 5 ++
fs/proc/task_mmu.c| 145 +++---
include/linux/mmap_lock.h | 11 +++
mm/madvise.c | 3 +-
mm/mmap_lock.c| 93
5 files changed, 246 inser
loff_t into unsigned type is not needed. Similarly, sentinel values
don't need to be unsigned. Remove type conversion for set_file position
and change sentinel values to signed.
Signed-off-by: Suren Baghdasaryan
Reviewed-by: Lorenzo Stoakes
Reviewed-by: Vlastimil Babka
---
fs/proc
Add verbose mode to the proc tests to print debugging information.
Usage: proc-pid-vm -v
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 159 --
1 file changed, 146 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/proc
Extend /proc/pid/maps tearing test to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 62 +++
1 file changed, 62 insertions(+)
diff --git a/tools
concurrently from under the reader. We should always see either
original vma or the split one with no holes.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 92 +++
1 file changed, 92 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps
the vma.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 83 +++
1 file changed, 83 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps-race.c
b/tools/testing/selftests/proc/proc-maps-race.c
index 523afd83d34f..10365b4e68e1
-files-001
diff --git a/tools/testing/selftests/proc/proc-maps-race.c
b/tools/testing/selftests/proc/proc-maps-race.c
new file mode 100644
index ..523afd83d34f
--- /dev/null
+++ b/tools/testing/selftests/proc/proc-maps-race.c
@@ -0,0 +1,459 @@
+/*
+ * Copyright (c) 2025 Sur
/all/e1863f40-39ab-4e5b-984a-c48765ffde1c@lucifer.local/
[4] https://lore.kernel.org/all/20250704060727.724817-1-sur...@google.com/
Suren Baghdasaryan (7):
selftests/proc: add /proc/pid/maps tearing from vma split test
selftests/proc: extend /proc/pid/maps tearing test to include vma
re
On Tue, Jul 15, 2025 at 1:18 PM Suren Baghdasaryan wrote:
>
> On Tue, Jul 15, 2025 at 10:29 AM Andrii Nakryiko
> wrote:
> >
> > On Tue, Jul 15, 2025 at 10:21 AM Lorenzo Stoakes
> > wrote:
> > >
> > > On Tue, Jul 15, 2025 at 06:10:16PM +0100, Loren
On Tue, Jul 15, 2025 at 10:29 AM Andrii Nakryiko
wrote:
>
> On Tue, Jul 15, 2025 at 10:21 AM Lorenzo Stoakes
> wrote:
> >
> > On Tue, Jul 15, 2025 at 06:10:16PM +0100, Lorenzo Stoakes wrote:
> > > > For PROCMAP_QUERY, we need priv->mm, but the newly added locked_vma
> > > > and locked_vma don't n
On Tue, Jul 15, 2025 at 1:16 AM Vlastimil Babka wrote:
>
> On 7/10/25 19:02, Suren Baghdasaryan wrote:
> > On Thu, Jul 10, 2025 at 12:03 AM Suren Baghdasaryan
> > wrote:
> >>
> >> On Wed, Jul 9, 2025 at 10:47 AM Suren Baghdasaryan
> >> wrote:
>
On Thu, Jul 10, 2025 at 12:03 AM Suren Baghdasaryan wrote:
>
> On Wed, Jul 9, 2025 at 10:47 AM Suren Baghdasaryan wrote:
> >
> > On Wed, Jul 9, 2025 at 4:12 PM Liam R. Howlett
> > wrote:
> > >
> > > * Suren Baghdasaryan [250709 11:06]:
> > &g
On Wed, Jul 9, 2025 at 10:47 AM Suren Baghdasaryan wrote:
>
> On Wed, Jul 9, 2025 at 4:12 PM Liam R. Howlett
> wrote:
> >
> > * Suren Baghdasaryan [250709 11:06]:
> > > On Wed, Jul 9, 2025 at 3:03 PM Vlastimil Babka wrote:
> > > >
> &g
On Tue, Jul 8, 2025 at 10:37 AM Vlastimil Babka wrote:
>
> On 7/4/25 08:07, Suren Baghdasaryan wrote:
> > Back in 2.6 era, last_addr used to be stored in seq_file->version
> > variable, which was unsigned long. As a result, sentinels to represent
> > gate vma and en
On Wed, Jul 9, 2025 at 4:12 PM Liam R. Howlett wrote:
>
> * Suren Baghdasaryan [250709 11:06]:
> > On Wed, Jul 9, 2025 at 3:03 PM Vlastimil Babka wrote:
> > >
> > > On 7/9/25 16:43, Suren Baghdasaryan wrote:
> > > > On Wed, Jul 9, 2025 at 1:57 AM Vlasti
On Wed, Jul 9, 2025 at 3:03 PM Vlastimil Babka wrote:
>
> On 7/9/25 16:43, Suren Baghdasaryan wrote:
> > On Wed, Jul 9, 2025 at 1:57 AM Vlastimil Babka wrote:
> >>
> >> On 7/8/25 01:10, Suren Baghdasaryan wrote:
> >> >>> + rcu_read_unlock();
On Wed, Jul 9, 2025 at 3:03 AM Vlastimil Babka wrote:
>
> On 7/4/25 08:07, Suren Baghdasaryan wrote:
> > --- a/mm/mmap_lock.c
> > +++ b/mm/mmap_lock.c
> > @@ -178,6 +178,94 @@ struct vm_area_struct *lock_vma_under_rcu(struct
> > mm_struct *mm,
> > co
On Wed, Jul 9, 2025 at 1:57 AM Vlastimil Babka wrote:
>
> On 7/8/25 01:10, Suren Baghdasaryan wrote:
> >>> + rcu_read_unlock();
> >>> + vma = lock_vma_under_mmap_lock(mm, iter, address);
> >>> + rcu_read_lock();
> >> OK I guess we hol
On Mon, Jul 7, 2025 at 11:21 AM Liam R. Howlett wrote:
>
> * Suren Baghdasaryan [250704 02:07]:
> > With maple_tree supporting vma tree traversal under RCU and per-vma
> > locks, /proc/pid/maps can be read while holding individual vma locks
> > instead of locking
On Mon, Jul 7, 2025 at 9:52 AM Lorenzo Stoakes
wrote:
>
> Sorry I know it's annoying, but some petty commit msg nits:
>
> On Thu, Jul 03, 2025 at 11:07:25PM -0700, Suren Baghdasaryan wrote:
> > With maple_tree supporting vma tree traversal under RCU and per-vma
> >
PROCMAP_QUERY ioctl calls from blocking address space updates.
Signed-off-by: Suren Baghdasaryan
Acked-by: Andrii Nakryiko
---
fs/proc/task_mmu.c | 60 --
1 file changed, 48 insertions(+), 12 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
ws for sub-page data tearing as opposed to the previous mechanism
where data tearing could happen only between pages of generated output
data. Since current userspace considers data tearing between pages to be
acceptable, we assume is will be able to handle sub-page data tearing
as well.
Signed-off
loff_t into unsigned type is not needed. Similarly, sentinel values
don't need to be unsigned. Remove type conversion for set_file position
and change sentinel values to signed.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/task_mmu.c | 14 +++---
1 file changed, 7 insertions(+), 7 de
Add verbose mode to the proc tests to print debugging information.
Usage: proc-pid-vm -v
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 159 --
1 file changed, 146 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/proc
Extend /proc/pid/maps tearing test to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 62 +++
1 file changed, 62 insertions(+)
diff --git a/tools
concurrently from under the reader. We should always see either
original vma or the split one with no holes.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 92 +++
1 file changed, 92 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps
the vma.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-maps-race.c | 83 +++
1 file changed, 83 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-maps-race.c
b/tools/testing/selftests/proc/proc-maps-race.c
index 523afd83d34f..10365b4e68e1
-files-001
diff --git a/tools/testing/selftests/proc/proc-maps-race.c
b/tools/testing/selftests/proc/proc-maps-race.c
new file mode 100644
index ..523afd83d34f
--- /dev/null
+++ b/tools/testing/selftests/proc/proc-maps-race.c
@@ -0,0 +1,459 @@
+/*
+ * Copyright (c) 2025 Sur
ub.com/paulmckrcu/proc-mmap_sem-test
[3]
https://lore.kernel.org/all/e1863f40-39ab-4e5b-984a-c48765ffde1c@lucifer.local/
[4] https://lore.kernel.org/all/20250624193359.3865351-1-sur...@google.com/
Suren Baghdasaryan (8):
selftests/proc: add /proc/pid/maps tearing from vma split test
selfte
> forces the linker to create an empty .codetag.alloc_tags section.
>
> Update codetag.lds.h to make the data conditional on
> CONFIG_MEM_ALLOC_PROFILING.
>
> Signed-off-by: Petr Pavlu
> Reviewed-by: Kent Overstreet
> Reviewed-by: Suren Baghdasaryan
Thanks!
Acked-by: Su
gt; anon_vma_name() is being called under VMA lock, but is assert mmap lock which
> won't necessarily be held.
>
> This results in the kernel spamming warnings about this on startup.
>
> Replace this with an open-coded 'mmap or VMA lock' assert to resolve.
>
> Signe
PROCMAP_QUERY ioctl calls from blocking address space updates.
Signed-off-by: Suren Baghdasaryan
Acked-by: Andrii Nakryiko
---
fs/proc/task_mmu.c | 56 --
1 file changed, 44 insertions(+), 12 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
ws for sub-page data tearing as opposed to the previous mechanism
where data tearing could happen only between pages of generated output
data. Since current userspace considers data tearing between pages to be
acceptable, we assume is will be able to handle sub-page data tearing
as well.
Signed-off
Add verbose mode to the proc tests to print debugging information.
Usage: proc-pid-vm -v
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 154 +++--
1 file changed, 141 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/proc
Extend /proc/pid/maps tearing test to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 60 ++
1 file changed, 60 insertions(+)
diff --git a/tools
concurrently from under the reader. We should always see either
original vma or the split one with no holes.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 92 ++
1 file changed, 92 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-pid
the vma.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 83 ++
1 file changed, 83 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-pid-vm.c
b/tools/testing/selftests/proc/proc-pid-vm.c
index 6e3f06376a1f..39842e4ec45f 100644
second page for consistency, looking for the
effects of vma splits or merges.
The test duration is configurable via the -d command-line parameter
in seconds to increase the likelihood of catching the race condition.
The default test duration is 5 seconds.
Example Command: proc-pid-vm -d 10
Signe
test
[3]
https://lore.kernel.org/all/e1863f40-39ab-4e5b-984a-c48765ffde1c@lucifer.local/
[4] https://lore.kernel.org/all/20250604231151.799834-1-sur...@google.com/
Suren Baghdasaryan (7):
selftests/proc: add /proc/pid/maps tearing from vma split test
selftests/proc: extend /proc/pid/maps tearing
On Tue, Jun 17, 2025 at 2:27 AM Petr Pavlu wrote:
>
> On 6/10/25 6:22 PM, Casey Chen wrote:
> > The empty MOD_CODETAG_SECTIONS() macro added an incomplete .data
> > section in module linker script, which caused symbol lookup tools
> > like gdb to misinterpret symbol addresses e.g., __ib_process_cq
On Fri, Jun 13, 2025 at 8:01 AM Lorenzo Stoakes
wrote:
>
> Hi Suren,
>
> I promised I'd share VMA merging scenarios so we can be absolutely sure we
> have
> all cases covered, I share that below. I also included information on split.
Thanks Lorenzo! This is great and very helpful.
>
> Hopefully
st of merge scenarios and ideally have a look at
> the test code too if I have time this week.
>
> But otherwise hopefully we are good for a respin here?
Ack. Working on it.
>
> Cheers, Lorenzo
>
> On Tue, Jun 10, 2025 at 05:16:36PM -0700, Suren Baghdasaryan wrote:
> >
On Tue, Jun 10, 2025 at 10:43 AM Lorenzo Stoakes
wrote:
>
> On Sat, Jun 07, 2025 at 06:41:35PM -0700, Suren Baghdasaryan wrote:
> > On Sat, Jun 7, 2025 at 10:43 AM Lorenzo Stoakes
> > wrote:
> > >
> > > Hi Suren,
> > >
> > > Forgive me but
pid/maps under per-vma lock")
> url:
> https://github.com/intel-lab-lkp/linux/commits/Suren-Baghdasaryan/selftests-proc-add-proc-pid-maps-tearing-from-vma-split-test/20250605-071433
> patch link:
> https://lore.kernel.org/all/20250604231151.799834-7-sur...@google.com/
> patch
On Sat, Jun 7, 2025 at 10:43 AM Lorenzo Stoakes
wrote:
>
> Hi Suren,
>
> Forgive me but I am going to ask a lot of questions here :p just want to
> make sure I'm getting everything right here.
No worries and thank you for reviewing!
>
> On Wed, Jun 04, 2025
PROCMAP_QUERY ioctl calls from blocking address space updates.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/task_mmu.c | 56 --
1 file changed, 44 insertions(+), 12 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 36d883c4f394
vious mechanism
where data tearing could happen only between pages of generated output
data. Since current userspace considers data tearing between pages to be
acceptable, we assume is will be able to handle sub-page data tearing
as well.
Signed-off-by: Suren Baghdasaryan
---
fs/proc/internal.h
Add verbose mode to the proc tests to print debugging information.
Usage: proc-pid-vm -v
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 154 +++--
1 file changed, 141 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/proc
Extend /proc/pid/maps tearing test to verify PROCMAP_QUERY ioctl operation
correctness while the vma is being concurrently modified.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 60 ++
1 file changed, 60 insertions(+)
diff --git a/tools
concurrently from under the reader. We should always see either
original vma or the split one with no holes.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 92 ++
1 file changed, 92 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-pid
the vma.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/proc/proc-pid-vm.c | 83 ++
1 file changed, 83 insertions(+)
diff --git a/tools/testing/selftests/proc/proc-pid-vm.c
b/tools/testing/selftests/proc/proc-pid-vm.c
index 6e3f06376a1f..39842e4ec45f 100644
second page for consistency, looking for the
effects of vma splits or merges.
The test duration is configurable via the -d command-line parameter
in seconds to increase the likelihood of catching the race condition.
The default test duration is 5 seconds.
Example Command: proc-pid-vm -d 10
Signe
ies.
[1] https://lore.kernel.org/all/20250418174959.1431962-1-sur...@google.com/
[2] https://github.com/paulmckrcu/proc-mmap_sem-test
Suren Baghdasaryan (7):
selftests/proc: add /proc/pid/maps tearing from vma split test
selftests/proc: extend /proc/pid/maps tearing test to include vma
resiz
g() internal to mm.
>
> Note that ptdump uses the precise same function for kernel walking as a
> convenience, so we permit this but make it very explicit by having
> walk_page_range_novma() invoke walk_kernel_page_table_range() in this case.
>
> Signed-off-by: Lorenz
On Wed, May 21, 2025 at 2:04 PM Casey Chen wrote:
>
> On Wed, May 21, 2025 at 9:06 AM Suren Baghdasaryan wrote:
> >
> > Failures inside codetag_load_module() are currently ignored. As a
> > result an error there would not cause a module load failure and freeing
> &g
c_tag: allocate percpu counters for module tags
dynamically")
Reported-by: Casey Chen
Closes:
https://lore.kernel.org/all/20250520231620.15259-1-cac...@purestorage.com/
Signed-off-by: Suren Baghdasaryan
Cc: sta...@vger.kernel.org
---
include/linux/codetag.h | 8
kernel/module/main
On Mon, May 19, 2025 at 9:46 AM Suren Baghdasaryan wrote:
>
> On Mon, May 19, 2025 at 9:38 AM David Wang <00107...@163.com> wrote:
> >
> > When module load fails after memory for codetag section is ready,
> > codetag section memory will not be properly released. Th
dule address, codetag may pick the uninitialized section
> when manipulating tags during module unload, and leads to
> "unable to handle page fault" BUG.
>
> Closes: https://lore.kernel.org/all/20250516131246.6244-1-00107...@163.com/
> Signed-off-by: David Wang <00107...@163
107...@163.com/
> Signed-off-by: David Wang <00107...@163.com>
Acked-by: Suren Baghdasaryan
> ---
> kernel/module/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index a2859dc3eea6..5c6ab20240a6 100644
> ---
On Thu, May 15, 2025 at 1:45 AM Vlastimil Babka wrote:
>
> On 5/14/25 16:01, Vlastimil Babka wrote:
> > On 5/6/25 23:34, Suren Baghdasaryan wrote:
> >> On Fri, Apr 25, 2025 at 1:27 AM Vlastimil Babka wrote:
> >>> @@ -2631,6 +2637,24 @@ static void sheaf_flush_u
On Thu, May 15, 2025 at 5:46 AM Vlastimil Babka wrote:
>
> On 4/25/25 10:27, Vlastimil Babka wrote:
> > Hi,
> >
> > This is the v4 and first non-RFC series to add an opt-in percpu
> > array-based caching layer to SLUB, following the LSF/MM discussions.
> > Since v3 I've also made changes to achiev
> barn has a spin_lock.
>
> When slub_debug is enabled for a cache with sheaf_capacity also
> specified, the latter is ignored so that allocations and frees reach the
> slow path where debugging hooks are processed.
>
> Signed-off-by: Vlastimil Babka
Reviewed-by: Suren Ba
On Tue, May 6, 2025 at 10:32 AM Suren Baghdasaryan wrote:
>
> On Mon, Apr 28, 2025 at 12:01 AM Vlastimil Babka wrote:
> >
> > On 4/25/25 19:31, Christoph Lameter (Ampere) wrote:
> > > On Fri, 25 Apr 2025, Vlastimil Babka wrote:
> > >
> > >> @@ -
justed.
Reviewed-by: Suren Baghdasaryan
> ---
> kernel/fork.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index
> c4b26cd8998b8e7b2b516e0bb0b1d4676ff644dc..3bd711f0798c88aee04bc30ff21fc4ca2b66201a
> 100644
> --- a/kernel/fo
ercpu sheaves
> exist for it, but the prefill functionality is still provided simply by
> all prefilled sheaves becoming oversize. If percpu sheaves are not
> created for a cache due to not passing the sheaf_capacity argument on
> cache creation, the prefills also work through ove
On Fri, Apr 25, 2025 at 1:27 AM Vlastimil Babka wrote:
>
> Extend the sheaf infrastructure for more efficient kfree_rcu() handling.
> For caches with sheaves, on each cpu maintain a rcu_free sheaf in
> addition to main and spare sheaves.
>
> kfree_rcu() operations will try to put objects on this s
On Mon, Apr 28, 2025 at 12:01 AM Vlastimil Babka wrote:
>
> On 4/25/25 19:31, Christoph Lameter (Ampere) wrote:
> > On Fri, 25 Apr 2025, Vlastimil Babka wrote:
> >
> >> @@ -4195,7 +4793,11 @@ static __fastpath_inline void
> >> *slab_alloc_node(struct kmem_cache *s, struct list
> >> if (unlik
On Mon, May 5, 2025 at 6:50 AM Christian Brauner wrote:
>
> On Tue, Apr 29, 2025 at 08:54:58PM +0200, Jann Horn wrote:
> > On Tue, Apr 29, 2025 at 8:04 PM Suren Baghdasaryan
> > wrote:
> > > On Tue, Apr 29, 2025 at 10:21 AM Jann Horn wrote:
> > > >
>
On Fri, May 2, 2025 at 3:11 PM Jann Horn wrote:
>
> On Fri, May 2, 2025 at 12:10 AM Andrii Nakryiko
> wrote:
> > On Tue, Apr 29, 2025 at 10:25 AM Jann Horn wrote:
> > > On Tue, Apr 29, 2025 at 7:15 PM Suren Baghdasaryan
> > > wrote:
> > > > On
On Tue, Apr 29, 2025 at 11:55 AM Jann Horn wrote:
>
> On Tue, Apr 29, 2025 at 8:04 PM Suren Baghdasaryan wrote:
> > On Tue, Apr 29, 2025 at 10:21 AM Jann Horn wrote:
> > >
> > > Hi!
> > >
> > > (I just noticed that I incorrectly assumed that VM
want to make sure
I'm not missing something...
>
> On Tue, Apr 29, 2025 at 7:09 PM Suren Baghdasaryan wrote:
> > On Tue, Apr 29, 2025 at 8:40 AM Jann Horn wrote:
> > > On Fri, Apr 18, 2025 at 7:50 PM Suren Baghdasaryan
> > > wrote:
> > > > Wi
On Tue, Apr 29, 2025 at 8:56 AM Jann Horn wrote:
>
> On Wed, Apr 23, 2025 at 12:54 AM Andrii Nakryiko
> wrote:
> > On Fri, Apr 18, 2025 at 10:50 AM Suren Baghdasaryan
> > wrote:
> > > Utilize speculative vma lookup to find and snapshot a vma without
> > >
On Tue, Apr 29, 2025 at 8:40 AM Jann Horn wrote:
>
> On Fri, Apr 18, 2025 at 7:50 PM Suren Baghdasaryan wrote:
> > With maple_tree supporting vma tree traversal under RCU and vma and
> > its important members being RCU-safe, /proc/pid/maps can be read under
> > RCU and
On Thu, Apr 24, 2025 at 9:42 AM Liam R. Howlett wrote:
>
> * Andrii Nakryiko [250424 12:04]:
> > On Thu, Apr 24, 2025 at 8:20 AM Suren Baghdasaryan
> > wrote:
> > >
> > > On Wed, Apr 23, 2025 at 5:24 PM Liam R. Howlett
> > > wrote:
>
On Wed, Apr 23, 2025 at 5:24 PM Liam R. Howlett wrote:
>
> * Andrii Nakryiko [250423 18:06]:
> > On Wed, Apr 23, 2025 at 2:49 PM Suren Baghdasaryan
> > wrote:
> > >
> > > On Tue, Apr 22, 2025 at 3:49 PM Andrii Nakryiko
> > > wrote:
> >
1 - 100 of 455 matches
Mail list logo