All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zenghui Yu <zenghui.yu@linux.dev>
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, shuah@kernel.org,
	usama.anjum@arm.com
Subject: Re: [PATCH] selftests/mm: pagemap_ioctl: use the correct page size for transact_test()
Date: Sun, 28 Jun 2026 11:13:29 -0700	[thread overview]
Message-ID: <20260628111329.9cfcd9c67925869307020aba@linux-foundation.org> (raw)
In-Reply-To: <20260628101118.35861-1-zenghui.yu@linux.dev>

On Sun, 28 Jun 2026 18:11:18 +0800 Zenghui Yu <zenghui.yu@linux.dev> wrote:

> There are several places in transact_test() where we use the hardcoded
> 0x1000 (4k) as page size, which is not always correct for architectures
> supporting multiple page sizes.

doh.

> Switch to use the correct page size. Otherwise ./ksft_pagemap.sh on a
> 16k-page-size arm64 box fails with
> 
>  $ ./ksft_pagemap.sh
>  [...]
>  # ok 96 mprotect_tests Both pages written after remap and mprotect
>  # ok 97 mprotect_tests Clear and make the pages written
>  # Bail out! ioctl failed
>  # # Planned tests != run tests (117 != 97)
>  # # Totals: pass:97 fail:0 xfail:0 xpass:0 skip:0 error:0
>  # [FAIL]
>  not ok 1 pagemap_ioctl # exit=1
>  # SUMMARY: PASS=0 SKIP=0 FAIL=1
>  1..1

Thanks.  I'll add a cc:stable to this.

>  tools/testing/selftests/mm/pagemap_ioctl.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

I'd like to see this code initialize page_size and hpage_size before
calling init_uffd(), hugetlb_setup_default(), etc.  That won't fix
anything but it's safer and saner to get these globals set up before
doing other things.


      reply	other threads:[~2026-06-28 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28 10:11 [PATCH] selftests/mm: pagemap_ioctl: use the correct page size for transact_test() Zenghui Yu
2026-06-28 18:13 ` Andrew Morton [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=20260628111329.9cfcd9c67925869307020aba@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --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=usama.anjum@arm.com \
    --cc=vbabka@kernel.org \
    --cc=zenghui.yu@linux.dev \
    /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 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.