syzbot


WARNING in __folio_rmap_sanity_checks

Status: fixed on 2024/01/30 15:47
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+50ef73537bbc393a25bb@syzkaller.appspotmail.com
Fix commit: 9c5938694cd0 mm/rmap: silence VM_WARN_ON_FOLIO() in __folio_rmap_sanity_checks()
First crash: 115d, last: 110d
Cause bisection: introduced by (bisect log) :
commit 68f0320824fa59c5429cbc811e6c46e7a30ea32c
Author: David Hildenbrand <david@redhat.com>
Date: Wed Dec 20 22:44:31 2023 +0000

  mm/rmap: convert folio_add_file_rmap_range() into folio_add_file_rmap_[pte|ptes|pmd]()

Crash: WARNING in folio_add_file_rmap_ptes (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] WARNING in __folio_rmap_sanity_checks 14 (15) 2024/01/06 04:36

Sample crash report:
 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook mm/slub.c:3813 [inline]
 slab_alloc_node mm/slub.c:3860 [inline]
 kmem_cache_alloc+0x136/0x320 mm/slub.c:3867
 vm_area_alloc+0x1f/0x220 kernel/fork.c:465
 mmap_region+0x3ae/0x2a90 mm/mmap.c:2804
 do_mmap+0x890/0xef0 mm/mmap.c:1379
 vm_mmap_pgoff+0x1a7/0x3c0 mm/util.c:573
 ksys_mmap_pgoff+0x421/0x5a0 mm/mmap.c:1425
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
 __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd0/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x62/0x6a
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5059 at include/linux/rmap.h:202 __folio_rmap_sanity_checks+0x4d5/0x630 include/linux/rmap.h:202
Modules linked in:
CPU: 1 PID: 5059 Comm: syz-executor115 Not tainted 6.7.0-rc8-next-20240102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:__folio_rmap_sanity_checks+0x4d5/0x630 include/linux/rmap.h:202
Code: 41 83 e4 01 44 89 e6 e8 79 bc b7 ff 45 84 e4 0f 85 08 fc ff ff e8 3b c1 b7 ff 48 c7 c6 e0 b5 d9 8a 48 89 df e8 5c 12 f7 ff 90 <0f> 0b 90 e9 eb fb ff ff e8 1e c1 b7 ff be 01 00 00 00 48 89 df e8
RSP: 0018:ffffc900038df978 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea00008cde00 RCX: ffffffff81687419
RDX: ffff88807becbb80 RSI: ffffffff81d06104 RDI: 0000000000000000
RBP: ffffea00008cde00 R08: 0000000000000000 R09: fffffbfff1e75f6a
R10: ffffffff8f3afb57 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000555556508380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000c0 CR3: 0000000079000000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __folio_add_rmap mm/rmap.c:1167 [inline]
 __folio_add_file_rmap mm/rmap.c:1452 [inline]
 folio_add_file_rmap_ptes+0x8e/0x2c0 mm/rmap.c:1478
 insert_page_into_pte_locked.isra.0+0x34d/0x960 mm/memory.c:1874
 insert_page mm/memory.c:1900 [inline]
 vm_insert_page+0x62c/0x8c0 mm/memory.c:2053
 packet_mmap+0x314/0x570 net/packet/af_packet.c:4594
 call_mmap include/linux/fs.h:2090 [inline]
 mmap_region+0x745/0x2a90 mm/mmap.c:2819
 do_mmap+0x890/0xef0 mm/mmap.c:1379
 vm_mmap_pgoff+0x1a7/0x3c0 mm/util.c:573
 ksys_mmap_pgoff+0x421/0x5a0 mm/mmap.c:1425
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
 __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd0/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x62/0x6a
RIP: 0033:0x7ff89df16329
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcbc3eb618 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007ffcbc3eb7f8 RCX: 00007ff89df16329
RDX: 0000000000000000 RSI: 0000000001000000 RDI: 0000000020568000
RBP: 00007ff89df89610 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcbc3eb7e8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (168):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/02 18:57 linux-next ab0b3e6ef50d fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/08 04:01 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/08 00:22 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 21:12 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 16:33 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 16:09 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 14:55 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 13:53 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 12:15 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 09:58 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 04:17 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/07 02:29 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 23:53 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 18:54 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 15:48 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 14:08 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 11:18 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 10:27 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/06 05:21 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 22:59 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 20:15 linux-next e2425464bc87 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 14:05 linux-next e2425464bc87 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 11:02 linux-next e2425464bc87 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 09:30 linux-next e2425464bc87 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 05:19 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 04:07 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 02:56 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 02:40 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/05 01:35 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 22:57 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 19:59 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 13:03 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 11:39 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 09:56 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 08:41 linux-next d0b3c8aa5e37 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 05:53 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 01:30 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/04 00:35 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 22:53 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 20:03 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 18:38 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 16:34 linux-next 0fef202ac2f8 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 15:32 linux-next 0fef202ac2f8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 14:06 linux-next 0fef202ac2f8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 12:04 linux-next 0fef202ac2f8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
2024/01/03 11:22 linux-next 0fef202ac2f8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __folio_rmap_sanity_checks
* Struck through repros no longer work on HEAD.