Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master commit f1104a036d47c3ef5551c078b7bf6aec133e6a6d Author: Wei Yang AuthorDate: Thu Jul 9 13:09:15 2020 +1000 Commit: Stephen Rothwell CommitDate: Thu Jul 9 13:09:15 2020 +1000 mm/mremap: use pmd_addr_end to simplify the calculate of extent The purpose of this code is to calculate the smaller extent in old and new range. Let's leverage pmd_addr_end() to do the calculation. Hope this would make the code easier to read. Link: http://lkml.kernel.org/r/20200708095028.41706-5-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Dmitry Osipenko Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Peter Xu Cc: Sean Christopherson Cc: Thomas Hellstrom Cc: Thomas Hellstrom (VMware) Cc: Vlastimil Babka Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell 9855a99dbd mm/mremap: start addresses are properly aligned f1104a036d mm/mremap: use pmd_addr_end to simplify the calculate of extent +------------------------------------------------------------+------------+------------+ | | 9855a99dbd | f1104a036d | +------------------------------------------------------------+------------+------------+ | boot_successes | 27 | 0 | | boot_failures | 57 | 23 | | UBSAN:shift-out-of-bounds_in_include/linux/hugetlb.h | 57 | 10 | | Mem-Info | 1 | | | BUG:kernel_NULL_pointer_dereference,address | 0 | 5 | | Oops:#[##] | 0 | 8 | | EIP:rb_insert_color | 0 | 1 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 9 | | BUG:Bad_page_state_in_process | 0 | 2 | | EIP:copy_page_to_iter_iovec | 0 | 1 | | BUG:Bad_page_map_in_process | 0 | 11 | | kernel_BUG_at_include/linux/swapops.h | 0 | 1 | | invalid_opcode:#[##] | 0 | 1 | | EIP:zap_pte_range | 0 | 3 | | EIP:find_and_remove_object | 0 | 2 | | BUG:unable_to_handle_page_fault_for_address | 0 | 3 | | BUG:Bad_rss-counter_state_mm:(ptrval)type:MM_ANONPAGES_val | 0 | 1 | | BUG:Bad_rss-counter_state_mm:#type:MM_SWAPENTS_val | 0 | 5 | | BUG:Bad_rss-counter_state_mm:#type:MM_ANONPAGES_val | 0 | 3 | | BUG:Bad_rss-counter_state_mm:#type:MM_FILEPAGES_val | 0 | 3 | | WARNING:at_mm/mincore.c:#mincore_pte_range | 0 | 1 | | EIP:mincore_pte_range | 0 | 1 | | EIP:rb_erase | 0 | 1 | | BUG:Bad_rss-counter_state_mm:#type:MM_SHMEMPAGES_val | 0 | 1 | | EIP:unpin_user_page | 0 | 1 | | WARNING:at_mm/kmemleak.c:#__delete_object | 0 | 1 | | EIP:__delete_object | 0 | 1 | | INFO:trying_to_register_non-static_key | 0 | 1 | | EIP:kmem_cache_alloc | 0 | 1 | | WARNING:at_include/linux/mm.h:#try_grab_page | 0 | 1 | | EIP:try_grab_page | 0 | 1 | +------------------------------------------------------------+------------+------------+ If you fix the issue, kindly add following tag Reported-by: kernel test robot [ 118.246570] futex_wake_op: trinity-c0 tries to shift op by -49; fix this program [ 121.382278] warning: process `trinity-c3' used the obsolete bdflush system call [ 121.385496] Fix your initscripts? [ 121.422479] warning: process `trinity-c3' used the obsolete bdflush system call [ 121.425824] Fix your initscripts? [ 125.760934] BUG: Bad page map in process trinity-c3 pte:dead4ead pmd:31770067 [ 125.763758] addr:b50e5000 vm_flags:000020fb anon_vma:00000000 mapping:f10dba10 index:2 [ 125.766756] file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0 [ 125.773060] CPU: 1 PID: 1012 Comm: trinity-c3 Not tainted 5.8.0-rc4-00214-gf1104a036d47c #2 [ 125.776026] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 125.779014] Call Trace: [ 125.780148] dump_stack+0x15f/0x206 [ 125.781603] print_bad_pte+0x290/0x360 [ 125.783055] ? shmem_write_begin+0x140/0x140 [ 125.784641] ? shmem_link+0x1c0/0x1c0 [ 125.786063] vm_normal_page+0x138/0x180 [ 125.787514] follow_page_pte+0x39d/0x7c0 [ 125.789173] follow_pmd_mask+0x2f8/0x3d0 [ 125.790842] follow_page_mask+0x17b/0x2a0 [ 125.792368] __get_user_pages+0x4d5/0xc30 [ 125.793927] populate_vma_page_range+0xe9/0x180 [ 125.795584] __mm_populate+0x121/0x290 [ 125.797050] do_mlock+0x161/0x4f0 [ 125.798371] __ia32_sys_mlock+0x3c/0x50 [ 125.799876] do_syscall_32_irqs_on+0x5e/0x440 [ 125.801525] do_int80_syscall_32+0x71/0x110 [ 125.803123] entry_INT80_32+0x131/0x131 [ 125.804669] EIP: 0x809b132 [ 125.805862] Code: Bad RIP value. [ 125.807218] EAX: ffffffda EBX: b50e3000 ECX: 00054000 EDX: 0000b9fe [ 125.809271] ESI: 48274cbe EDI: 7a3895a2 EBP: 0000ffac ESP: bfc91d48 [ 125.811367] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [ 125.813744] Disabling lock debugging due to kernel taint [ 125.815564] BUG: Bad page map in process trinity-c3 pte:ffffffff pmd:31770067 [ 125.818317] addr:b50e6000 vm_flags:000020fb anon_vma:00000000 mapping:f10dba10 index:3 [ 125.821457] file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0 [ 125.823801] CPU: 1 PID: 1012 Comm: trinity-c3 Tainted: G B 5.8.0-rc4-00214-gf1104a036d47c #2 [ 125.827344] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 125.830608] Call Trace: [ 125.831811] dump_stack+0x15f/0x206 [ 125.833337] print_bad_pte+0x290/0x360 [ 125.834822] ? shmem_write_begin+0x140/0x140 [ 125.836544] ? shmem_link+0x1c0/0x1c0 [ 125.838122] vm_normal_page+0x138/0x180 [ 125.839728] follow_page_pte+0x39d/0x7c0 [ 125.841574] follow_pmd_mask+0x2f8/0x3d0 [ 125.843381] follow_page_mask+0x17b/0x2a0 [ 125.845054] __get_user_pages+0x4d5/0xc30 [ 125.846703] populate_vma_page_range+0xe9/0x180 [ 125.848492] __mm_populate+0x121/0x290 [ 125.850007] do_mlock+0x161/0x4f0 [ 125.851342] __ia32_sys_mlock+0x3c/0x50 [ 125.852864] do_syscall_32_irqs_on+0x5e/0x440 [ 125.854480] do_int80_syscall_32+0x71/0x110 [ 125.856134] entry_INT80_32+0x131/0x131 [ 125.857760] EIP: 0x809b132 [ 125.859033] Code: Bad RIP value. [ 125.860446] EAX: ffffffda EBX: b50e3000 ECX: 00054000 EDX: 0000b9fe [ 125.862733] ESI: 48274cbe EDI: 7a3895a2 EBP: 0000ffac ESP: bfc91d48 [ 125.864966] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [ 125.867407] BUG: Bad page map in process trinity-c3 pte:ffffffff pmd:31770067 [ 125.870255] addr:b50e7000 vm_flags:000020fb anon_vma:00000000 mapping:f10dba10 index:4 [ 125.873464] file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0 [ 125.877095] CPU: 1 PID: 1012 Comm: trinity-c3 Tainted: G B 5.8.0-rc4-00214-gf1104a036d47c #2 [ 125.900236] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 125.921597] Call Trace: [ 125.929723] dump_stack+0x15f/0x206 [ 125.940132] print_bad_pte+0x290/0x360 [ 125.951054] ? shmem_write_begin+0x140/0x140 [ 125.962861] ? shmem_link+0x1c0/0x1c0 [ 125.977507] vm_normal_page+0x138/0x180 [ 125.988461] follow_page_pte+0x39d/0x7c0 [ 126.000507] follow_pmd_mask+0x2f8/0x3d0 [ 126.012336] follow_page_mask+0x17b/0x2a0 [ 126.023392] __get_user_pages+0x4d5/0xc30 [ 126.034615] populate_vma_page_range+0xe9/0x180 [ 126.046823] __mm_populate+0x121/0x290 [ 126.057422] do_mlock+0x161/0x4f0 [ 126.067047] __ia32_sys_mlock+0x3c/0x50 [ 126.077643] do_syscall_32_irqs_on+0x5e/0x440 [ 126.089063] do_int80_syscall_32+0x71/0x110 [ 126.100183] entry_INT80_32+0x131/0x131 [ 126.111129] EIP: 0x809b132 [ 126.119913] Code: Bad RIP value. [ 126.133911] EAX: ffffffda EBX: b50e3000 ECX: 00054000 EDX: 0000b9fe [ 126.142208] ESI: 48274cbe EDI: 7a3895a2 EBP: 0000ffac ESP: bfc91d48 [ 126.145208] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [ 126.148066] BUG: Bad page map in process trinity-c3 pte:c354d3ec pmd:31770067 [ 126.151113] addr:b50e8000 vm_flags:000020fb anon_vma:00000000 mapping:f10dba10 index:5 [ 126.154247] file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0 [ 126.156473] CPU: 1 PID: 1012 Comm: trinity-c3 Tainted: G B 5.8.0-rc4-00214-gf1104a036d47c #2 [ 126.166053] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 126.169344] Call Trace: [ 126.170573] dump_stack+0x15f/0x206 [ 126.172093] print_bad_pte+0x290/0x360 [ 126.173715] ? shmem_write_begin+0x140/0x140 [ 126.175442] ? shmem_link+0x1c0/0x1c0 [ 126.177020] vm_normal_page+0x138/0x180 [ 126.178617] follow_page_pte+0x39d/0x7c0 [ 126.180408] follow_pmd_mask+0x2f8/0x3d0 [ 126.182113] follow_page_mask+0x17b/0x2a0 [ 126.183644] __get_user_pages+0x4d5/0xc30 [ 126.185232] populate_vma_page_range+0xe9/0x180 [ 126.186978] __mm_populate+0x121/0x290 [ 126.189597] do_mlock+0x161/0x4f0 [ 126.191021] __ia32_sys_mlock+0x3c/0x50 [ 126.192639] do_syscall_32_irqs_on+0x5e/0x440 [ 126.194394] do_int80_syscall_32+0x71/0x110 [ 126.196084] entry_INT80_32+0x131/0x131 [ 126.197698] EIP: 0x809b132 [ 126.198973] Code: Bad RIP value. [ 126.200382] EAX: ffffffda EBX: b50e3000 ECX: 00054000 EDX: 0000b9fe [ 126.202723] ESI: 48274cbe EDI: 7a3895a2 EBP: 0000ffac ESP: bfc91d48 [ 126.205025] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [ 126.207550] BUG: Bad page map in process trinity-c3 pte:c2ae7741 pmd:31770067 [ 126.210291] addr:b50eb000 vm_flags:000020fb anon_vma:00000000 mapping:f10dba10 index:8 [ 126.213372] file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0 [ 126.215498] CPU: 1 PID: 1012 Comm: trinity-c3 Tainted: G B 5.8.0-rc4-00214-gf1104a036d47c #2 [ 126.219137] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 126.222415] Call Trace: [ 126.223628] dump_stack+0x15f/0x206 [ 126.225153] print_bad_pte+0x290/0x360 [ 126.226759] ? shmem_write_begin+0x140/0x140 [ 126.228471] ? shmem_link+0x1c0/0x1c0 [ 126.230055] vm_normal_page+0x138/0x180 [ 126.231633] follow_page_pte+0x39d/0x7c0 [ 126.233392] follow_pmd_mask+0x2f8/0x3d0 [ 126.235032] follow_page_mask+0x17b/0x2a0 [ 126.236713] __get_user_pages+0x4d5/0xc30 [ 126.238373] populate_vma_page_range+0xe9/0x180 [ 126.240178] __mm_populate+0x121/0x290 [ 126.241706] do_mlock+0x161/0x4f0 [ 126.243158] __ia32_sys_mlock+0x3c/0x50 [ 126.244810] do_syscall_32_irqs_on+0x5e/0x440 [ 126.246540] do_int80_syscall_32+0x71/0x110 [ 126.248228] entry_INT80_32+0x131/0x131 [ 126.249837] EIP: 0x809b132 [ 126.251117] Code: Bad RIP value. [ 126.252571] EAX: ffffffda EBX: b50e3000 ECX: 00054000 EDX: 0000b9fe [ 126.254856] ESI: 48274cbe EDI: 7a3895a2 EBP: 0000ffac ESP: bfc91d48 [ 126.257122] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [child3:1012] Error opening /sys/kernel/debug/tracing/trace : Permission denied *** Error in `/bin/trinity': free(): invalid pointer: 0x080eaf28 *** ======= Backtrace: ========= [0x806e46f] [0x80739c4] # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD git bisect start b966b5cf71790478be7726593d011cb085a97a94 v5.7 -- git bisect good 26e122e97a3d0390ebec389347f64f3730fdf48f # 18:16 G 23 0 13 13 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm git bisect good 0c408219e7773d7ffbaf7ef436f1712ed732cf80 # 18:46 G 23 0 17 17 Merge remote-tracking branch 'samsung-krzk/for-next' git bisect good 63f2c55cfc9d778387658e1e7b6a463b826445de # 19:06 G 23 0 13 13 Merge remote-tracking branch 'mmc/next' git bisect good 82d884a166081883e273ad67a7226ab51021e662 # 19:30 G 22 0 13 13 Merge remote-tracking branch 'scsi/for-next' git bisect good 1fdce87867399202634b99db185f13126bd3ed8e # 20:02 G 23 0 14 14 Merge remote-tracking branch 'fsi/next' git bisect good dbbca4852ac35a926514d6065d8f84d281ffa7f1 # 20:45 G 22 0 14 14 Merge remote-tracking branch 'trivial/for-next' git bisect good de4bd07781ba491496110d2cdcbea55e928b9b97 # 21:10 G 22 0 14 14 Merge remote-tracking branch 'set_fs/set_fs-rw' git bisect good 1bc8e2bcabb553d9504487831548193dd6f156c5 # 22:10 G 21 0 15 15 mm: clean up the last pieces of page fault accountings git bisect bad afabc73d31e9ec69a7f9217899cb565bc7a906ac # 22:50 B 1 2 1 1 mm/shuffle: remove dynamic reconfiguration git bisect bad 26478f8223dd087f0d69d4c530d3f33b9d7abed5 # 23:09 B 14 1 12 12 kasan: update required compiler versions in documentation git bisect bad d32ad962bf52707051d260391d8c72ec98439fc5 # 23:31 B 2 1 2 2 mm/sparse: only sub-section aligned range would be populated git bisect good a797c37cd813891477f587f6835a13cbb856b471 # 23:58 G 21 0 17 17 mm/mremap: calculate extent in one place git bisect bad f1104a036d47c3ef5551c078b7bf6aec133e6a6d # 00:12 B 1 1 1 1 mm/mremap: use pmd_addr_end to simplify the calculate of extent git bisect good 9855a99dbd48c5bbf273893c48f0eeb788afddc9 # 00:36 G 21 0 16 16 mm/mremap: start addresses are properly aligned # first bad commit: [f1104a036d47c3ef5551c078b7bf6aec133e6a6d] mm/mremap: use pmd_addr_end to simplify the calculate of extent git bisect good 9855a99dbd48c5bbf273893c48f0eeb788afddc9 # 01:09 G 63 0 39 55 mm/mremap: start addresses are properly aligned # extra tests with debug options git bisect bad f1104a036d47c3ef5551c078b7bf6aec133e6a6d # 01:28 B 2 2 2 2 mm/mremap: use pmd_addr_end to simplify the calculate of extent # extra tests on revert first bad commit git bisect good f7894daf438a2bf0a62be184553e95c66b518656 # 02:29 G 22 0 15 15 Revert "mm/mremap: use pmd_addr_end to simplify the calculate of extent" # good: [f7894daf438a2bf0a62be184553e95c66b518656] Revert "mm/mremap: use pmd_addr_end to simplify the calculate of extent" --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/lkp@lists.01.org