Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754372AbbLOTX7 (ORCPT ); Tue, 15 Dec 2015 14:23:59 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:32909 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbbLOTXz (ORCPT ); Tue, 15 Dec 2015 14:23:55 -0500 MIME-Version: 1.0 From: Dmitry Vyukov Date: Tue, 15 Dec 2015 20:23:34 +0100 Message-ID: Subject: BUG_ON(!PageLocked(page)) in munlock_vma_page/migrate_pages/__block_write_begin To: Andrew Morton , "Kirill A. Shutemov" , Vlastimil Babka , Eric B Munson , David Rientjes , Andrea Arcangeli , Jeff Vander Stoep , Alexander Kuleshov , "linux-mm@kvack.org" , LKML , Sasha Levin , Hugh Dickins Cc: syzkaller , Kostya Serebryany , Alexander Potapenko , Eric Dumazet Content-Type: multipart/mixed; boundary=001a113d812ef61a130526f4ba48 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 23573 Lines: 375 --001a113d812ef61a130526f4ba48 Content-Type: text/plain; charset=UTF-8 Hello, I am seeing lots of similar BUGs in different functions all pointing to BUG_ON(!PageLocked(page)). I reproduced them on several recent commits, including stock 6764e5ebd5c62236d082f9ae030674467d0b2779 (Dec 9) with no changes on top and no KASAN/etc. ------------[ cut here ]------------ kernel BUG at fs/buffer.c:1917! invalid opcode: 0000 [#1] SMP Modules linked in: CPU: 3 PID: 17243 Comm: executor Not tainted 4.4.0-rc4+ #53 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff8800347ac380 ti: ffff880033510000 task.ti: ffff880033510000 RIP: 0010:[] [ ][< none >] __block_write_begin+0x450/0x480 fs/buffer.c:1919 RSP: 0018:ffff880033513be8 EFLAGS: 00010246 RAX: 01fffc000000086c RBX: ffffea0000c57340 RCX: ffffffff812eb890 RDX: 0000000000001000 RSI: 0000000000000000 RDI: ffffea0000c57340 RBP: ffff880033513c90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000 R13: 00000000fffffff2 R14: ffffffff812eb890 R15: ffff8800721ca4a0 FS: 000000000254f880(0063) GS:ffff88007fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00000000007100b8 CR3: 0000000034b22000 CR4: 00000000000006e0 Stack: ffff88003ff6aeb8 ffff880033513c68 0000000000000002 ffff880033513c40 ffffffff823f976e ffffea0000c57340 ffffea0000c57340 ffff8800721ca2b0 ffffffff812eb890 ffff8800721ca2b0 ffff8800721ca4a0 ffff880033513c90 Call Trace: [] block_page_mkwrite+0x9a/0xd0 fs/buffer.c:2449 [] ext4_page_mkwrite+0x270/0x400 fs/ext4/inode.c:5286 [] do_page_mkwrite+0x40/0x80 mm/memory.c:1970 [< inline >] wp_page_shared mm/memory.c:2240 [] do_wp_page+0x356/0x4e0 mm/memory.c:2344 [< inline >] handle_pte_fault mm/memory.c:3311 [< inline >] __handle_mm_fault mm/memory.c:3413 [] handle_mm_fault+0xd70/0x1a70 mm/memory.c:3442 [] __do_page_fault+0x18a/0x410 arch/x86/mm/fault.c:1238 [] trace_do_page_fault+0x43/0xd0 arch/x86/mm/fault.c:1331 [] do_async_page_fault+0x14/0x80 arch/x86/kernel/kvm.c:264 [] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:988 Code: b4 44 8b 4d b0 4c 8b 55 a8 e9 3b fd ff ff 8b 55 bc 8b 75 b8 48 8b 7d 80 e8 5e ef ff ff e9 dc fe ff ff 0f 0b e8 de 08 41 00 0f 0b <0f> 0b be 0f 00 00 00 48 c7 c7 41 c4 95 82 4c 89 55 a8 44 89 4d RIP [] __block_write_begin+0x450/0x480 fs/buffer.c:1919 RSP ---[ end trace c0d117b74b7a2ba6 ]--- ------------[ cut here ]------------ kernel BUG at include/linux/swapops.h:106! invalid opcode: 0000 [#1] SMP KASAN Modules linked in: CPU: 2 PID: 10089 Comm: syzkaller_execu Tainted: G W 4.4.0-rc4+ #161 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff880037715e00 ti: ffff8800006a0000 task.ti: ffff8800006a0000 RIP: 0010:[] [] try_to_unmap_one+0x74b/0x960 RSP: 0018:ffff8800006a6fb0 EFLAGS: 00010212 RAX: ffff880037715e00 RBX: ffff88005a650000 RCX: ffffc900048f6000 RDX: 0000000000003fff RSI: 0000000000004000 RDI: ffff88005a650130 RBP: ffff8800006a7078 R08: 0000000000000001 R09: 0000000000000000 R10: ffffed000fffec13 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000002 R14: 80000000424ad007 R15: 0000000000000018 FS: 00007f84b59d1700(0000) GS:ffff88006da00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000020797ff8 CR3: 000000000fb77000 CR4: 00000000000006e0 Stack: 0000000000000000 ffff880000000000 0000000000000212 ffff880046dc4780 0000000000000001 1ffff100000d4dfe 00000000006f0000 ffffea0001092b40 0000000041b58ab3 ffffffff86a6af3b ffffffff81686d90 ffffffff81653e38 Call Trace: [< inline >] rmap_walk_anon mm/rmap.c:1600 [] rmap_walk+0x54e/0xa10 mm/rmap.c:1668 [] try_to_unmap+0xd9/0x180 mm/rmap.c:1495 [< inline >] __unmap_and_move mm/migrate.c:890 [< inline >] unmap_and_move mm/migrate.c:950 [] migrate_pages+0xcc0/0x25b0 mm/migrate.c:1149 [] compact_zone+0xe2e/0x2180 mm/compaction.c:1411 [] compact_zone_order+0xea/0x160 mm/compaction.c:1504 [] try_to_compact_pages+0x323/0xa60 mm/compaction.c:1555 [] __alloc_pages_direct_compact+0x7f/0x280 mm/page_alloc.c:2765 [< inline >] __alloc_pages_slowpath mm/page_alloc.c:3076 [] __alloc_pages_nodemask+0xb20/0x15f0 mm/page_alloc.c:3235 [< inline >] __alloc_pages include/linux/gfp.h:415 [< inline >] __alloc_pages_node include/linux/gfp.h:428 [] alloc_pages_vma+0x49f/0x600 mm/mempolicy.c:2001 [] do_huge_pmd_wp_page+0x9ba/0x1ab0 mm/huge_memory.c:1189 [< inline >] wp_huge_pmd mm/memory.c:3250 [< inline >] __handle_mm_fault mm/memory.c:3382 [] handle_mm_fault+0x2b44/0x3a30 mm/memory.c:3442 [] __do_page_fault+0x376/0x8d0 arch/x86/mm/fault.c:1238 [] trace_do_page_fault+0xb3/0x3d0 arch/x86/mm/fault.c:1331 [] do_async_page_fault+0x14/0x70 arch/x86/kernel/kvm.c:264 [] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:988 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 Code: fc e7 ff f0 48 ff 8b 48 03 00 00 f0 48 ff 83 50 03 00 00 4c 89 e1 48 c1 e9 39 48 8d 14 09 4c 89 e1 e9 2d fd ff ff e8 a5 fc e7 ff <0f> 0b e8 9e fc e7 ff 48 89 df 48 8b b5 68 ff ff ff 48 8b 95 50 RIP [< inline >] make_migration_entry include/linux/swapops.h:106 RIP [] try_to_unmap_one+0x74b/0x960 mm/rmap.c:1390 RSP ---[ end trace 4641abb232e75cf4 ]--- ------------[ cut here ]------------ kernel BUG at mm/mlock.c:179! invalid opcode: 0000 [#1] SMP KASAN Modules linked in: CPU: 3 PID: 13580 Comm: syzkaller_execu Tainted: G W 4.4.0-rc4+ #161 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88003d825e00 ti: ffff88003ab88000 task.ti: ffff88003ab88000 RIP: 0010:[] [] munlock_vma_page+0x1c4/0x200 RSP: 0018:ffff88003ab8f4a8 EFLAGS: 00010297 RAX: ffffffff8166fb84 RBX: ffffea00017d0840 RCX: ffffc900070a6000 RDX: 0000000000000720 RSI: 0000000000000721 RDI: 000000000000001f RBP: ffff88003ab8f4d8 R08: 0000000000000001 R09: 0000000000000001 R10: ffffed000fffec1b R11: 0000000000000000 R12: 00000000000007c0 R13: ffff88007fff7000 R14: ffff88006ad38d48 R15: ffff880031018010 FS: 00007fa3ef2d9700(0000) GS:ffff88006db00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000020002006 CR3: 00000000380b9000 CR4: 00000000000006e0 Stack: 00000000000007c0 ffff88006ad38cf8 ffffea00017d0840 0000000000000001 ffff88006ad38d48 ffff880031018010 ffff88003ab8f5c0 ffffffff8166010e 0000000020003000 ffff880036e098c0 ffff88002f22cbe8 80000000635c0067 Call Trace: [] wp_page_copy.isra.56+0x93e/0xe60 mm/memory.c:2171 [] do_wp_page+0x17f/0xf20 mm/memory.c:2354 [< inline >] handle_pte_fault mm/memory.c:3311 [< inline >] __handle_mm_fault mm/memory.c:3413 [] handle_mm_fault+0x1d66/0x3a30 mm/memory.c:3442 [] __do_page_fault+0x376/0x8d0 arch/x86/mm/fault.c:1238 [] trace_do_page_fault+0xb3/0x3d0 arch/x86/mm/fault.c:1331 [] do_async_page_fault+0x14/0x70 arch/x86/kernel/kvm.c:264 [] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:988 [< inline >] SYSC_poll fs/select.c:969 [] SyS_poll+0xbc/0x3f0 fs/select.c:957 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 Code: 48 89 df e8 ff f3 ff ff 84 c0 74 ba e8 16 76 e9 ff 4c 89 ff e8 ee 6d 4f 04 48 89 df e8 b6 f2 ff ff e9 50 ff ff ff e8 fc 75 e9 ff <0f> 0b 48 89 df e8 12 ef 05 00 eb 88 e8 0b ef 05 00 e9 87 fe ff RIP [] munlock_vma_page+0x1c4/0x200 mm/mlock.c:179 RSP ---[ end trace 76823d12a049bf21 ]--- Unfortunately I cannot reproduce it without syzkaller fuzzer. Here are repro instructions using syzkaller infrastructure (you need Go1.5 toolchain installed and GOPATH env var setup): $ go get github.com/google/syzkaller/tools/execprog $ cd $GOPATH/src/github.com/google/syzkaller $ make executor Then copy $GOPATH/bin/execprog, $GOPATH/src/github.com/google/syzkaller/bin/executor and the attached file into the test machine. Run the following command inside of the test machine: $ ./execprog -executor ./executor -loop -procs 16 -cover=0 pagelocked It may require a hour or so to reproduce. Syzkaller's execprog will do something along the following lines (to give you idea of what's stressed): create a bunch of threads; mmap 2 shared files per test process (32 in this case); spawn 16 subprocesses; these subprocess will spawn another subproccess; these subprocesses will execute syscalls listed in the attached file in different threads in somewhat chaotic order. I've tried to reproduce it all in the attached mlocked.c file, but it did not trigger the BUGs for me. --001a113d812ef61a130526f4ba48 Content-Type: application/octet-stream; name=pagelocked Content-Disposition: attachment; filename=pagelocked Content-Transfer-Encoding: base64 X-Attachment-Id: f_ii7roqic0 bW1hcCgmKDB4N2YwMDAwMDAwMDAwKT1uaWwsICgweDEwMDApLCAweDMsIDB4MzIsIDB4ZmZmZmZm ZmZmZmZmZmZmZiwgMHgwKQptbWFwKCYoMHg3ZjAwMDAwMDAwMDApPW5pbCwgKDB4MTAwMCksIDB4 MywgMHgzMiwgMHhmZmZmZmZmZmZmZmZmZmZmLCAweDApCm1tYXAoJigweDdmMDAwMDAwMDAwMCk9 bmlsLCAoMHgxMDAwKSwgMHgzLCAweDMyLCAweGZmZmZmZmZmZmZmZmZmZmYsIDB4MCkKbXN5bmMo JigweDdmMDAwMGMwZjAwMCk9bmlsLCAoMHg0MDAwKSwgMHgxKQpyMSA9IGdldHRpZCgpCm1tYXAo JigweDdmMDAwMDAwMTAwMCk9bmlsLCAoMHgxMDAwKSwgMHgzLCAweDMyLCAweGZmZmZmZmZmZmZm ZmZmZmYsIDB4MCkKc2NoZWRfc2V0YXR0cihyMSwgJigweDdmMDAwMDAwMjAwMC0weDMwKT17MHgz MCwgMHgwLCAweDEsIDB4MiwgMHgyLCAweDcsIDB4MSwgMHg5fSwgMHgwKQptbWFwKCYoMHg3ZjAw MDAwMDIwMDApPW5pbCwgKDB4MTAwMCksI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G9wZW5h dCgweDE4NjlmLCAmKDB4N2YwMDAwMDA0MDAwKT0iMmUyZjY2Njk2YzY1MzAwMCIsIDB4MCwgMHgx NDApCm1tYXAoJigweDdmMDAwMDAwNDAwMCk9bmlsLCAoMHgxMDAwKSwgMHgzLCAweDMyLCAweGZm ZmZmZmZmZmZmZmZmZmYsIDB4MCkKbW1hcCgmKDB4N2YwMDAwMDA0MDAwKT1uaWwsICgweDEwMDAp LCAweDMsIDB4MzIsIDB4ZmZmZmZmZmZmZmZmZmZmZiwgMHgwKQpyNCA9IG9wZW4oJigweDdmMDAw MDAwNDAwMCsweDc1ZSk9IjJlMmY2Mjc1NzMwMCIsIDB4MTAxMDAwLCAweDUwKQptbWFwKCYoMHg3 ZjAwMDAwMDQwMDApPW5pbCwgKDB4MTAwMCksIDB4MywgMHgzMiwgMHhmZmZmZmZmZmZmZmZmZmZm LCAweDApCmxpbmthdChyMywgJigweDdmMDAwMDAwNDAwMCk9IjJlMmY2NjY5NmM2NTMwMDAiLCBy NCwgJigweDdmMDAwMDAwNTAwMC0weDUpPSIyZTJmNjY2OTZjNjUzMDAwIiwgMHgxMDAwKQptbWFw KCYoMHg3ZjAwMDAwMDUwMDApPW5pbCwgKDB4MTAwMCksIDB4MywgMHgzMiwgMHhmZmZmZmZmZmZm ZmZmZmZmLCAweDApCm1tYXAoJigweDdmMDAwMDAwNTAwMCk9bmlsLCAoMHgxMDAwKSwgMHgzLCAw eDMyLCAweGZmZmZmZmZmZmZmZmZmZmYsIDB4MCkKY2xvY2tfbmFub3NsZWVwKDB4ODhkMjZiMzcx ZmU2ZGFiMywgMHgxLCAmKDB4N2YwMDAwMDA1MDAwKT17MHg3NzM1OTQwMCwgMHgwfSwgJigweDdm MDAwMDAwNjAwMC0weDEwKT17MHgwLCAweDB9KQoK --001a113d812ef61a130526f4ba48 Content-Type: text/x-csrc; charset=US-ASCII; name="mlocked.c" Content-Disposition: attachment; filename="mlocked.c" Content-Transfer-Encoding: base64 X-Attachment-Id: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JCWlmICh3YWl0KDApICE9IC0xKQoJCQlmb3Jrd29ya2VyKCk7Cn0K --001a113d812ef61a130526f4ba48-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/