* + selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch added to mm-new branch
@ 2025-06-10 20:05 Andrew Morton
2025-06-16 18:03 ` Pedro Falcato
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2025-06-10 20:05 UTC (permalink / raw)
To: mm-commits, vbabka, shuah, pulehui, lorenzo.stoakes, liam.howlett,
jannh, broonie, aishwarya.tcv, pfalcato, akpm
The patch titled
Subject: selftests/mm: skip uprobe vma merge test if uprobes are not enabled
has been added to the -mm mm-new branch. Its filename is
selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.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.
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 the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Pedro Falcato <pfalcato@suse.de>
Subject: selftests/mm: skip uprobe vma merge test if uprobes are not enabled
Date: Tue, 10 Jun 2025 13:22:09 +0100
If uprobes are not enabled, the test currently fails with:
7151 12:46:54.627936 # # # RUN merge.handle_uprobe_upon_merged_vma ...
7152 12:46:54.639014 # # f /sys/bus/event_source/devices/uprobe/type
7153 12:46:54.639306 # # fopen: No such file or directory
7154 12:46:54.650451 # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected
read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
7155 12:46:54.650730 # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
7156 12:46:54.661750 # # # FAIL merge.handle_uprobe_upon_merged_vma
7157 12:46:54.662030 # # not ok 8 merge.handle_uprobe_upon_merged_vma
Skipping is a more sane and friendly behavior here.
Link: https://lkml.kernel.org/r/20250610122209.3177587-1-pfalcato@suse.de
Fixes: efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")
Signed-off-by: Pedro Falcato <pfalcato@suse.de>
Reported-by: Aishwarya <aishwarya.tcv@arm.com>
Closes: https://lore.kernel.org/linux-mm/20250610103729.72440-1-aishwarya.tcv@arm.com/
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Pu Lehui <pulehui@huawei.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/mm/merge.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/tools/testing/selftests/mm/merge.c~selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled
+++ a/tools/testing/selftests/mm/merge.c
@@ -477,7 +477,9 @@ TEST_F(merge, handle_uprobe_upon_merged_
ASSERT_GE(fd, 0);
ASSERT_EQ(ftruncate(fd, page_size), 0);
- ASSERT_EQ(read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type), 0);
+ if (read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) != 0) {
+ SKIP(goto out, "Failed to read uprobe sysfs file, skipping");
+ }
memset(&attr, 0, attr_sz);
attr.size = attr_sz;
@@ -498,6 +500,7 @@ TEST_F(merge, handle_uprobe_upon_merged_
ASSERT_NE(mremap(ptr2, page_size, page_size,
MREMAP_MAYMOVE | MREMAP_FIXED, ptr1), MAP_FAILED);
+out:
close(fd);
remove(probe_file);
}
_
Patches currently in -mm which might be from pfalcato@suse.de are
selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: + selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch added to mm-new branch
2025-06-10 20:05 + selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch added to mm-new branch Andrew Morton
@ 2025-06-16 18:03 ` Pedro Falcato
2025-06-16 19:19 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Falcato @ 2025-06-16 18:03 UTC (permalink / raw)
To: Andrew Morton
Cc: mm-commits, vbabka, shuah, pulehui, lorenzo.stoakes, liam.howlett,
jannh, broonie, aishwarya.tcv
On Tue, Jun 10, 2025 at 01:05:28PM -0700, Andrew Morton wrote:
>
Andrew,
Can you queue this into mm-hotfixes? This fix complements the one at
selftests-mm-add-configs-to-fix-testcase-failure.patch for systems that do not
support uprobes. We should also have sufficient reviews, I think.
Thanks!
> The patch titled
> Subject: selftests/mm: skip uprobe vma merge test if uprobes are not enabled
> has been added to the -mm mm-new branch. Its filename is
> selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch
>
> This patch will shortly appear at
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.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.
>
> 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 the mm-everything
> branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> and is updated there every 2-3 working days
>
> ------------------------------------------------------
> From: Pedro Falcato <pfalcato@suse.de>
> Subject: selftests/mm: skip uprobe vma merge test if uprobes are not enabled
> Date: Tue, 10 Jun 2025 13:22:09 +0100
>
> If uprobes are not enabled, the test currently fails with:
>
> 7151 12:46:54.627936 # # # RUN merge.handle_uprobe_upon_merged_vma ...
> 7152 12:46:54.639014 # # f /sys/bus/event_source/devices/uprobe/type
> 7153 12:46:54.639306 # # fopen: No such file or directory
> 7154 12:46:54.650451 # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected
> read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0)
> 7155 12:46:54.650730 # # # handle_uprobe_upon_merged_vma: Test terminated by assertion
> 7156 12:46:54.661750 # # # FAIL merge.handle_uprobe_upon_merged_vma
> 7157 12:46:54.662030 # # not ok 8 merge.handle_uprobe_upon_merged_vma
>
> Skipping is a more sane and friendly behavior here.
>
> Link: https://lkml.kernel.org/r/20250610122209.3177587-1-pfalcato@suse.de
> Fixes: efe99fabeb11b ("selftests/mm: add test about uprobe pte be orphan during vma merge")
> Signed-off-by: Pedro Falcato <pfalcato@suse.de>
> Reported-by: Aishwarya <aishwarya.tcv@arm.com>
> Closes: https://lore.kernel.org/linux-mm/20250610103729.72440-1-aishwarya.tcv@arm.com/
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Cc: Jann Horn <jannh@google.com>
> Cc: Liam Howlett <liam.howlett@oracle.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Pu Lehui <pulehui@huawei.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> tools/testing/selftests/mm/merge.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- a/tools/testing/selftests/mm/merge.c~selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled
> +++ a/tools/testing/selftests/mm/merge.c
> @@ -477,7 +477,9 @@ TEST_F(merge, handle_uprobe_upon_merged_
> ASSERT_GE(fd, 0);
>
> ASSERT_EQ(ftruncate(fd, page_size), 0);
> - ASSERT_EQ(read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type), 0);
> + if (read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) != 0) {
> + SKIP(goto out, "Failed to read uprobe sysfs file, skipping");
> + }
>
> memset(&attr, 0, attr_sz);
> attr.size = attr_sz;
> @@ -498,6 +500,7 @@ TEST_F(merge, handle_uprobe_upon_merged_
> ASSERT_NE(mremap(ptr2, page_size, page_size,
> MREMAP_MAYMOVE | MREMAP_FIXED, ptr1), MAP_FAILED);
>
> +out:
> close(fd);
> remove(probe_file);
> }
> _
>
> Patches currently in -mm which might be from pfalcato@suse.de are
>
> selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch
>
--
Pedro
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: + selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch added to mm-new branch
2025-06-16 18:03 ` Pedro Falcato
@ 2025-06-16 19:19 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2025-06-16 19:19 UTC (permalink / raw)
To: Pedro Falcato
Cc: mm-commits, vbabka, shuah, pulehui, lorenzo.stoakes, liam.howlett,
jannh, broonie, aishwarya.tcv
On Mon, 16 Jun 2025 19:03:48 +0100 Pedro Falcato <pfalcato@suse.de> wrote:
> On Tue, Jun 10, 2025 at 01:05:28PM -0700, Andrew Morton wrote:
> >
>
> Andrew,
>
> Can you queue this into mm-hotfixes? This fix complements the one at
> selftests-mm-add-configs-to-fix-testcase-failure.patch for systems that do not
> support uprobes. We should also have sufficient reviews, I think.
No probs, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-16 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 20:05 + selftests-mm-skip-uprobe-vma-merge-test-if-uprobes-are-not-enabled.patch added to mm-new branch Andrew Morton
2025-06-16 18:03 ` Pedro Falcato
2025-06-16 19:19 ` Andrew Morton
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.