Re: [syzbot] [mm?] WARNING in hpage_collapse_scan_pmd

From: Peter Xu
Date: Thu Jan 11 2024 - 05:00:43 EST


On Tue, Jan 09, 2024 at 11:26:26AM -0800, Yang Shi wrote:
> On Tue, Jan 9, 2024 at 10:23 AM syzbot
> <syzbot+ed79e0896ae923de13fa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 5eff55d725a4 Merge tag 'platform-drivers-x86-v6.7-7' of gi..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=17472409e80000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=655f8abe9fe69b3b
> > dashboard link: https://syzkaller.appspot.com/bug?extid=ed79e0896ae923de13fa
> > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> >
> > Unfortunately, I don't have any reproducer for this issue yet.
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/496bf4f0c628/disk-5eff55d7.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/43482bd7ec93/vmlinux-5eff55d7.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/fa81d2743202/bzImage-5eff55d7.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+ed79e0896ae923de13fa@xxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 35 at arch/x86/include/asm/pgtable.h:403 pte_uffd_wp arch/x86/include/asm/pgtable.h:403 [inline]
> > WARNING: CPU: 1 PID: 35 at arch/x86/include/asm/pgtable.h:403 hpage_collapse_scan_pmd+0x233e/0x4fe0 mm/khugepaged.c:1309
> > Modules linked in:
> > CPU: 1 PID: 35 Comm: khugepaged Not tainted 6.7.0-rc8-syzkaller-00055-g5eff55d725a4 #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
> > RIP: 0010:pte_uffd_wp arch/x86/include/asm/pgtable.h:403 [inline]
>
> Khugepaged saw a uffd wp PTE is writable. Khugepaged just scans the
> page table at this stage, so it sounds like something is out of sync?
>
> Cc'ed Peter.

Thanks for copying me, Yang.

Currently I have no clue of what is going wrong. I'll need to have a
closer look some day later on the rest logs, or wait for a reproducer with
some more information.

>
> > RIP: 0010:hpage_collapse_scan_pmd+0x233e/0x4fe0 mm/khugepaged.c:1309
> > Code: 24 d8 00 00 00 49 81 c6 00 10 00 00 4c 3b b4 24 f0 00 00 00 0f 83 a8 06 00 00 e8 bd 72 9d ff e9 61 fc ff ff e8 b3 72 9d ff 90 <0f> 0b 90 41 bc 09 00 00 00 45 31 f6 e9 45 f4 ff ff e8 9c 72 9d ff
> > RSP: 0018:ffffc90000abf780 EFLAGS: 00010293
> > RAX: ffffffff81f1073d RBX: 0000000000000002 RCX: ffff8880142f1dc0
> > RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
> > RBP: ffffc90000abfbf0 R08: ffffffff81f0ea47 R09: 1ffffd400022a006
> > R10: dffffc0000000000 R11: fffff9400022a007 R12: 00000000203ea000
> > R13: 1ffff92000157f14 R14: 00000000455eac67 R15: 00000000000001ea
> > FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00007f942157a038 CR3: 000000008cd03000 CR4: 00000000003506f0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > <TASK>
> > khugepaged_scan_mm_slot mm/khugepaged.c:2415 [inline]
> > khugepaged_do_scan mm/khugepaged.c:2503 [inline]
> > khugepaged+0x9bf/0x17a0 mm/khugepaged.c:2559
> > kthread+0x2d3/0x370 kernel/kthread.c:388
> > ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
> > ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
> > </TASK>
> >
> >
> > ---
> > This report is generated by a bot. It may contain errors.
> > See https://goo.gl/tpsmEJ for more information about syzbot.
> > syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
> >
> > syzbot will keep track of this issue. See:
> > https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> >
> > If the report is already addressed, let syzbot know by replying with:
> > #syz fix: exact-commit-title
> >
> > If you want to overwrite report's subsystems, reply with:
> > #syz set subsystems: new-subsystem
> > (See the list of subsystem names on the web dashboard)
> >
> > If the report is a duplicate of another one, reply with:
> > #syz dup: exact-subject-of-another-report
> >
> > If you want to undo deduplication, reply with:
> > #syz undup
> >
>

--
Peter Xu