From: sashiko-bot@kernel.org
To: "Xionggui Chen" <evers_chen@163.com>, akpm@linux-foundation.org
Cc: david@kernel.org, shuah@kernel.org, ljs@kernel.org,
linux-mm@kvack.org,
"Xionggui Chen" <chenxionggui@lanxincomputing.com>
Subject: Re: [PATCH v2] selftests/mm: handle implicit read permissions in madv_populate
Date: Wed, 18 Nov 2026 07:07:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-220290@kernel.org> (raw)
In-Reply-To: <20261117070606.3752-1-evers_chen@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/mm: wrong Fixes trailer in madv_populate
test_prot_write()
--
commit a72c4c7dc3b5c0ebca1f3529ca19931b9c980959
Author: Xionggui Chen <chenxionggui@lanxincomputing.com>
> selftests/mm: handle implicit read permissions in madv_populate
>
> The madv_populate selftest assumes that mmap(PROT_WRITE) creates a VMA
> without VM_READ and expects MADV_POPULATE_READ to fail with EINVAL.
>
> On RISC-V, commit 6c7559f22b6f ("riscv/mm: ensure PROT_WRITE leads to
> VM_READ | VM_WRITE") makes the kernel set VM_READ for mappings requested
> with PROT_WRITE. MADV_POPULATE_READ checks this VMA permission, so it
> succeeds and the test fails incorrectly.
>
> Adjust the expected result for RISC-V using an architecture-specific
> conditional, while preserving the existing behavior on other
> architectures.
>
> On RISC-V with Linux 7.2.0, the original test fails 1 out of 16 tests,
> while the updated test passes all 16 tests.
>
> Link: https://lore.kernel.org/20261112031811.56500-1-evers_chen@163.com
> Fixes: e5bfac53e310 ("selftests/vm: add test for MADV_POPULATE_(READ|WRITE)")
> Signed-off-by: Xionggui Chen <chenxionggui@lanxincomputing.com>
[Severity: Low]
Should the Fixes: tag point to 6c7559f22b6f ("riscv/mm: ensure PROT_WRITE
leads to VM_READ | VM_WRITE") instead?
When e5bfac53e310 ("selftests/vm: add test for MADV_POPULATE_(READ|WRITE)")
added test_prot_write(), mmap(PROT_WRITE) on RISC-V did not set VM_READ and
MADV_POPULATE_READ returned -EINVAL as expected. Backporting this change to
stable trees older than 6c7559f22b6f ("riscv/mm: ensure PROT_WRITE leads to
VM_READ | VM_WRITE") will cause test_prot_write() to fail on RISC-V.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117070606.3752-1-evers_chen@163.com?part=1
prev parent reply other threads:[~2026-11-18 7:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 3:18 [PATCH] selftests/mm: Handle implicit read permissions in madv_populate Xionggui Chen
2026-11-12 19:32 ` Andrew Morton
2026-11-13 2:12 ` 陈熊贵
2026-11-13 3:15 ` cxg
2026-11-13 3:19 ` sashiko-bot
2026-11-13 3:58 ` cxg
2026-11-13 19:02 ` David Hildenbrand (Arm)
2026-11-16 7:00 ` cxg
2026-11-17 5:59 ` Andrew Morton
2026-11-17 7:06 ` [PATCH v2] selftests/mm: handle " Xionggui Chen
2026-11-17 8:58 ` David Hildenbrand (Arm)
2026-11-17 9:34 ` cxg
2026-11-18 7:07 ` sashiko-bot [this message]
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=sashiko-outbox-220290@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chenxionggui@lanxincomputing.com \
--cc=david@kernel.org \
--cc=evers_chen@163.com \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shuah@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