From: Sarthak Sharma <sarthak.sharma@arm.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Kalesh Singh <kaleshsingh@google.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Park Tae-sun <ts930@dgu.ac.kr>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 4/9] selftests/mm: mremap_test: correct multiple VMA range size
Date: Thu, 1 Oct 2026 18:12:55 +0530 [thread overview]
Message-ID: <59c330ba-211f-46d9-902f-59ca5f0f8120@arm.com> (raw)
In-Reply-To: <3d13be9d-a4c9-4123-a047-67371fa4586e@kernel.org>
Hi David!
On 10/1/26 5:24 PM, David Hildenbrand (Arm) wrote:
> On 9/24/26 07:00, Sarthak Sharma wrote:
>> In the test mremap_move_multiple_vmas(), pages 4
>> to 6 form a single VMA. But the helper function
>> is_multiple_vma_range_ok() checks pages 4 and 5 as
>> one range and treats page 6 separately.
>>
>> Check all three pages as a single range and skip
>> the page 6 iteration to match the actual VMA layout.
>>
>> Fixes: d53f248258e1 ("tools/testing/selftests: extend mremap_test to test multi-VMA mremap")
>> Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
>> ---
>> tools/testing/selftests/mm/mremap_test.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
>> index ba9b7f7566d0..869df22d46db 100644
>> --- a/tools/testing/selftests/mm/mremap_test.c
>> +++ b/tools/testing/selftests/mm/mremap_test.c
>> @@ -373,7 +373,10 @@ static bool is_multiple_vma_range_ok(unsigned int pattern_seed,
>> for (i = 0; i <= 10; i += 2) {
>> int j;
>> char *buf = &ptr[i * page_size];
>> - size_t size = i == 4 ? 2 * page_size : page_size;
>> + size_t size = i == 4 ? 3 * page_size : page_size;
>> +
>> + if (i == 6)
>> + continue;
>>
>> for (j = 0; j < size; j++) {
>> char chr = rand();
>
> What is the impact of this that it warrants a Fixes? Will the test fail?
I read through this again, and realized it is just populating and
validating parts of one VMA in two iterations, which is not wrong, just
a bit odd since others VMAs were being validated in one go. I think I'd
gotten confused with the layout and pictured something else :).
So you're right, this doesn't require a Fixes tag. Infact I think I'll
drop this patch altogether since it is validating stuff correctly.
next prev parent reply other threads:[~2026-10-01 12:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 5:00 [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 1/9] selftests/mm: mremap_test: use kselftest helpers Sarthak Sharma
2026-09-29 7:58 ` David Hildenbrand (Arm)
2026-09-29 9:12 ` Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 2/9] selftests/mm: mremap_test: skip test when userfaultfd is unavailable Sarthak Sharma
2026-09-29 8:00 ` David Hildenbrand (Arm)
2026-09-29 9:17 ` Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 3/9] selftests/mm: mremap_test: fail unexpected mremap successes Sarthak Sharma
2026-09-29 8:17 ` David Hildenbrand (Arm)
2026-09-24 5:00 ` [PATCH RESEND 4/9] selftests/mm: mremap_test: correct multiple VMA range size Sarthak Sharma
2026-10-01 11:54 ` David Hildenbrand (Arm)
2026-10-01 12:42 ` Sarthak Sharma [this message]
2026-09-24 5:00 ` [PATCH RESEND 5/9] selftests/mm: mremap_test: fail on data corruption Sarthak Sharma
2026-10-01 11:54 ` David Hildenbrand (Arm)
2026-09-24 5:00 ` [PATCH RESEND 6/9] selftests/mm: mremap_test: replace random data with deterministic pattern Sarthak Sharma
2026-10-01 12:00 ` David Hildenbrand (Arm)
2026-10-01 13:16 ` Sarthak Sharma
2026-10-01 13:19 ` David Hildenbrand (Arm)
2026-09-24 5:00 ` [PATCH RESEND 7/9] selftests/mm: mremap_test: remove perf tests and timing Sarthak Sharma
2026-10-01 11:56 ` David Hildenbrand (Arm)
2026-09-24 5:00 ` [PATCH RESEND 8/9] selftests/mm: mremap_test: remove validation threshold Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 9/9] selftests/mm: mremap_test: strengthen multi VMA validation Sarthak Sharma
2026-09-29 5:54 ` [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-29 7:32 ` Kalesh Singh
2026-09-29 7:47 ` David Hildenbrand (Arm)
2026-09-29 9:05 ` Sarthak Sharma
2026-09-29 8:36 ` Lorenzo Stoakes (ARM)
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=59c330ba-211f-46d9-902f-59ca5f0f8120@arm.com \
--to=sarthak.sharma@arm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=david@kernel.org \
--cc=jhubbard@nvidia.com \
--cc=kaleshsingh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=ts930@dgu.ac.kr \
--cc=vbabka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®