linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Potapenko <glider@google.com>
To: David Hildenbrand <david@redhat.com>
Cc: syzbot <syzbot+1d335893772467199ab6@syzkaller.appspotmail.com>,
	 akpm@linux-foundation.org, axboe@kernel.dk,
	catalin.marinas@arm.com,  jgg@ziepe.ca, jhubbard@nvidia.com,
	linux-kernel@vger.kernel.org,  linux-mm@kvack.org,
	peterx@redhat.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] kernel BUG in sanity_check_pinned_pages
Date: Mon, 23 Jun 2025 11:53:15 +0200	[thread overview]
Message-ID: <CAG_fn=WBBwkZZZzBMp0SO3=POgKzNaJGkU_YJKcAKRVQdEYPqw@mail.gmail.com> (raw)
In-Reply-To: <b5aa34ed-d7d4-4445-b8bb-6187b4100682@redhat.com>

On Mon, Jun 23, 2025 at 11:29 AM 'David Hildenbrand' via
syzkaller-bugs <syzkaller-bugs@googlegroups.com> wrote:
>
> On 21.06.25 23:52, syzbot wrote:
> > syzbot has found a reproducer for the following issue on:
> >
> > HEAD commit:    9aa9b43d689e Merge branch 'for-next/core' into for-kernelci
> > git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1525330c580000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=27f179c74d5c35cd
> > dashboard link: https://syzkaller.appspot.com/bug?extid=1d335893772467199ab6
> > compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
> > userspace arch: arm64
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16d73370580000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=160ef30c580000
>
> There is not that much magic in there, I'm afraid.
>
> fork() is only used to spin up guests, but before the memory region of
> interest is actually allocated, IIUC. No threading code that races.
>
> IIUC, it triggers fairly fast on aarch64. I've left it running for a
> while on x86_64 without any luck.
>
> So maybe this is really some aarch64-special stuff (pointer tagging?).
>
> In particular, there is something very weird in the reproducer:
>
>    syscall(__NR_madvise, /*addr=*/0x20a93000ul, /*len=*/0x4000ul,
>            /*advice=MADV_HUGEPAGE|0x800000000*/ 0x80000000eul);
>
> advise is supposed to be a 32bit int. What does the magical
> "0x800000000" do?

I am pretty sure this is a red herring.
Syzkaller sometimes mutates integer flags, even if the result makes no
sense - because sometimes it can trigger interesting bugs.
This `advice` argument will be discarded by is_valid_madvise(),
resulting in -EINVAL.


  reply	other threads:[~2025-06-23  9:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 15:31 syzbot
2025-06-03 16:22 ` David Hildenbrand
2025-06-03 17:20   ` Jens Axboe
2025-06-03 17:25     ` David Hildenbrand
2025-06-03 17:36       ` Jens Axboe
2025-06-21 21:52 ` syzbot
2025-06-23  9:29   ` David Hildenbrand
2025-06-23  9:53     ` Alexander Potapenko [this message]
2025-06-23 10:10       ` David Hildenbrand
2025-06-23 12:22         ` David Hildenbrand
2025-06-23 12:47           ` David Hildenbrand
2025-06-23 14:58           ` Jens Axboe
2025-06-23 15:11             ` David Hildenbrand
2025-06-23 16:48               ` Pavel Begunkov
2025-06-23 16:59                 ` David Hildenbrand
2025-06-23 17:36                   ` David Hildenbrand
2025-06-23 18:02                     ` Pavel Begunkov

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='CAG_fn=WBBwkZZZzBMp0SO3=POgKzNaJGkU_YJKcAKRVQdEYPqw@mail.gmail.com' \
    --to=glider@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=catalin.marinas@arm.com \
    --cc=david@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=syzbot+1d335893772467199ab6@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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