2024-03-09 11:25:46

by syzbot

[permalink] [raw]
Subject: [syzbot] [mm?] WARNING in try_to_migrate_one (2)

Hello,

syzbot found the following issue on:

HEAD commit: 3aaa8ce7a335 Merge tag 'mm-hotfixes-stable-2024-03-07-16-1..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1289abde180000
kernel config: https://syzkaller.appspot.com/x/.config?x=74a95eee532b237a
dashboard link: https://syzkaller.appspot.com/bug?extid=ddf4b4c0005944105a9e
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: i386

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-3aaa8ce7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/84038f5e2c04/vmlinux-3aaa8ce7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/dc9d60eea301/bzImage-3aaa8ce7.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

------------[ cut here ]------------
WARNING: CPU: 2 PID: 43 at arch/x86/include/asm/pgtable.h:404 pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
WARNING: CPU: 2 PID: 43 at arch/x86/include/asm/pgtable.h:404 try_to_migrate_one+0x19d4/0x36b0 mm/rmap.c:2256
Modules linked in:
CPU: 2 PID: 43 Comm: kcompactd0 Not tainted 6.8.0-rc7-syzkaller-00142-g3aaa8ce7a335 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
RIP: 0010:try_to_migrate_one+0x19d4/0x36b0 mm/rmap.c:2256
Code: 89 e7 e8 4f dd 0e 00 e9 16 f8 ff ff e8 d5 47 b4 ff 31 ff 4c 89 ee e8 db 42 b4 ff 4d 85 ed 0f 84 e4 09 00 00 e8 bd 47 b4 ff 90 <0f> 0b 90 e8 b4 47 b4 ff 48 83 cd 04 e9 65 f7 ff ff e8 a6 47 b4 ff
RSP: 0018:ffffc9000069f330 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea0000a02d80 RCX: ffffffff81d79d15
RDX: ffff888018728000 RSI: ffffffff81d79d23 RDI: 0000000000000007
RBP: d7ffe7fffafe9202 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000003 R12: 0000000000000400
R13: 0000000000000002 R14: dffffc0000000000 R15: 0000000000000800
FS: 0000000000000000(0000) GS:ffff88802c400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c00f07b020 CR3: 000000000d378000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
rmap_walk_anon+0x228/0x580 mm/rmap.c:2599
rmap_walk mm/rmap.c:2676 [inline]
rmap_walk mm/rmap.c:2671 [inline]
try_to_migrate+0x2ba/0x300 mm/rmap.c:2328
migrate_folio_unmap mm/migrate.c:1244 [inline]
migrate_pages_batch+0x10c7/0x2c60 mm/migrate.c:1675
migrate_pages_sync mm/migrate.c:1841 [inline]
migrate_pages+0x1b31/0x27d0 mm/migrate.c:1950
compact_zone+0x1dcb/0x3f90 mm/compaction.c:2554
proactive_compact_node+0x118/0x1d0 mm/compaction.c:2814
kcompactd+0x712/0xd80 mm/compaction.c:3130
kthread+0x2c6/0x3b0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:243
</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 [email protected].

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


2024-04-11 02:04:31

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] [mm?] WARNING in try_to_migrate_one (2)

syzbot has found a reproducer for the following issue on:

HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=14db82bd180000
kernel config: https://syzkaller.appspot.com/x/.config?x=1e5b814e91787669
dashboard link: https://syzkaller.appspot.com/bug?extid=ddf4b4c0005944105a9e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13111a4d180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=156ae155180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5f73b6ef963d/disk-480e035f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/46c949396aad/vmlinux-480e035f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e3b4d0f5a5f8/bzImage-480e035f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

------------[ cut here ]------------
WARNING: CPU: 0 PID: 5134 at arch/x86/include/asm/pgtable.h:404 pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
WARNING: CPU: 0 PID: 5134 at arch/x86/include/asm/pgtable.h:404 try_to_migrate_one+0x18e9/0x3ae0 mm/rmap.c:2256
Modules linked in:
CPU: 0 PID: 5134 Comm: syz-executor306 Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
RIP: 0010:try_to_migrate_one+0x18e9/0x3ae0 mm/rmap.c:2256
Code: ac ff 41 83 e7 42 bf 40 00 00 00 4c 89 fe e8 9e 74 ac ff 49 83 ff 40 0f 84 91 08 00 00 e8 af 6f ac ff eb 09 e8 a8 6f ac ff 90 <0f> 0b 90 49 83 cd 04 48 8b 3c 24 e8 b7 89 ff ff 89 c3 48 b8 00 00
RSP: 0018:ffffc9000458f1e0 EFLAGS: 00010293
RAX: ffffffff81e885a8 RBX: d000000000000000 RCX: ffff8880177a3c00
RDX: 0000000000000000 RSI: 0000000000000400 RDI: 0000000000000000
RBP: ffffc9000458f550 R08: ffffffff81e88560 R09: 1ffffd40003c10d8
R10: dffffc0000000000 R11: fffff940003c10d9 R12: 0000000000000001
R13: d7ffe7fff0fbc802 R14: 0000000000000002 R15: 000000007821bc67
FS: 00007f2b2a0666c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2b2a06b9f0 CR3: 0000000023ffe000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
rmap_walk_anon+0x36f/0x680 mm/rmap.c:2599
try_to_migrate+0x3de/0x4b0
migrate_folio_unmap mm/migrate.c:1244 [inline]
migrate_pages_batch+0x10b4/0x3570 mm/migrate.c:1675
migrate_pages_sync mm/migrate.c:1841 [inline]
migrate_pages+0x1eaf/0x3320 mm/migrate.c:1950
do_mbind mm/mempolicy.c:1344 [inline]
kernel_mbind mm/mempolicy.c:1486 [inline]
__do_sys_mbind mm/mempolicy.c:1560 [inline]
__se_sys_mbind+0x11f5/0x1a70 mm/mempolicy.c:1556
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f2b2a0af089
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2b2a066228 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f2b2a138408 RCX: 00007f2b2a0af089
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000
RBP: 00007f2b2a138400 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2b2a1054f4
R13: 0000000000000011 R14: 00007ffca01beb70 R15: 00007ffca01bec58
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

2024-04-11 19:55:20

by Andrew Morton

[permalink] [raw]
Subject: Re: [syzbot] [mm?] WARNING in try_to_migrate_one (2)

On Wed, 10 Apr 2024 19:04:21 -0700 syzbot <[email protected]> wrote:

> syzbot has found a reproducer for the following issue on:

Thanks.

> HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=14db82bd180000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1e5b814e91787669
> dashboard link: https://syzkaller.appspot.com/bug?extid=ddf4b4c0005944105a9e
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13111a4d180000

Seems to be userfaultfd related.

> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=156ae155180000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/5f73b6ef963d/disk-480e035f.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/46c949396aad/vmlinux-480e035f.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/e3b4d0f5a5f8/bzImage-480e035f.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: [email protected]
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 5134 at arch/x86/include/asm/pgtable.h:404 pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
> WARNING: CPU: 0 PID: 5134 at arch/x86/include/asm/pgtable.h:404 try_to_migrate_one+0x18e9/0x3ae0 mm/rmap.c:2256
> Modules linked in:
> CPU: 0 PID: 5134 Comm: syz-executor306 Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
> RIP: 0010:pte_uffd_wp arch/x86/include/asm/pgtable.h:404 [inline]
> RIP: 0010:try_to_migrate_one+0x18e9/0x3ae0 mm/rmap.c:2256
> Code: ac ff 41 83 e7 42 bf 40 00 00 00 4c 89 fe e8 9e 74 ac ff 49 83 ff 40 0f 84 91 08 00 00 e8 af 6f ac ff eb 09 e8 a8 6f ac ff 90 <0f> 0b 90 49 83 cd 04 48 8b 3c 24 e8 b7 89 ff ff 89 c3 48 b8 00 00
> RSP: 0018:ffffc9000458f1e0 EFLAGS: 00010293
> RAX: ffffffff81e885a8 RBX: d000000000000000 RCX: ffff8880177a3c00
> RDX: 0000000000000000 RSI: 0000000000000400 RDI: 0000000000000000
> RBP: ffffc9000458f550 R08: ffffffff81e88560 R09: 1ffffd40003c10d8
> R10: dffffc0000000000 R11: fffff940003c10d9 R12: 0000000000000001
> R13: d7ffe7fff0fbc802 R14: 0000000000000002 R15: 000000007821bc67
> FS: 00007f2b2a0666c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f2b2a06b9f0 CR3: 0000000023ffe000 CR4: 00000000003506f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> rmap_walk_anon+0x36f/0x680 mm/rmap.c:2599
> try_to_migrate+0x3de/0x4b0
> migrate_folio_unmap mm/migrate.c:1244 [inline]
> migrate_pages_batch+0x10b4/0x3570 mm/migrate.c:1675
> migrate_pages_sync mm/migrate.c:1841 [inline]
> migrate_pages+0x1eaf/0x3320 mm/migrate.c:1950
> do_mbind mm/mempolicy.c:1344 [inline]
> kernel_mbind mm/mempolicy.c:1486 [inline]
> __do_sys_mbind mm/mempolicy.c:1560 [inline]
> __se_sys_mbind+0x11f5/0x1a70 mm/mempolicy.c:1556
> do_syscall_64+0xfb/0x240
> entry_SYSCALL_64_after_hwframe+0x6d/0x75
> RIP: 0033:0x7f2b2a0af089
> Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007f2b2a066228 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
> RAX: ffffffffffffffda RBX: 00007f2b2a138408 RCX: 00007f2b2a0af089
> RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000
> RBP: 00007f2b2a138400 R08: 0000000000000000 R09: 0000000000000002
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2b2a1054f4
> R13: 0000000000000011 R14: 00007ffca01beb70 R15: 00007ffca01bec58
> </TASK>
>
>
> ---
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.

2024-04-15 15:43:40

by Peter Xu

[permalink] [raw]
Subject: Re: [syzbot] [mm?] WARNING in try_to_migrate_one (2)

On Thu, Apr 11, 2024 at 12:55:13PM -0700, Andrew Morton wrote:
> On Wed, 10 Apr 2024 19:04:21 -0700 syzbot <[email protected]> wrote:
>
> > syzbot has found a reproducer for the following issue on:
>
> Thanks.
>
> > HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi..
> > git tree: upstream
> > console+strace: https://syzkaller.appspot.com/x/log.txt?x=14db82bd180000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=1e5b814e91787669
> > dashboard link: https://syzkaller.appspot.com/bug?extid=ddf4b4c0005944105a9e
> > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13111a4d180000
>
> Seems to be userfaultfd related.
>
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=156ae155180000

I can't easily trigger with the reproducer, neither did I get more
information from the syzbot reproducer, and it doesn't include an
UFFDIO_REGISTER.

Before go reading more on syzbot itself on this specific reproducer, I'll
see whether I can come up with something better than commit c2da319c2e2: I
don't remember the details why I didn't do the sanity check when updating
the pgtable rather than walking it. I'll give it a shot this time.

Thanks,

--
Peter Xu