Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: cxg <evers_chen@163.com>
To: sashiko-reviews@lists.linux.dev, 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 16:03:38 +0800	[thread overview]
Message-ID: <138084c8-e177-42fb-b37d-7e8342ef309c@163.com> (raw)
In-Reply-To: <sashiko-outbox-220290@kernel.org>

Hi Andrew,

I noticed that the Fixes tag in the patch currently in mm-new points to 
the original selftest commit.

Since the test failure was introduced by the RISC-V VMA permission 
change, the Fixes tag should instead be:

Fixes: 6c7559f22b6f ("riscv/mm: ensure PROT_WRITE leads to VM_READ | 
VM_WRITE")

Could you please update the Fixes tag in mm-new?

The code itself does not need any changes.

Thanks,
Xionggui


On 11/18/26 15:07, sashiko-bot@kernel.org wrote:
> 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.
>



  reply	other threads:[~2026-11-18  8:04 UTC|newest]

Thread overview: 15+ 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
2026-11-18  8:03     ` cxg [this message]
2026-11-18  8:12       ` Andrew Morton

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=138084c8-e177-42fb-b37d-7e8342ef309c@163.com \
    --to=evers_chen@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=chenxionggui@lanxincomputing.com \
    --cc=david@kernel.org \
    --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