* [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
@ 2023-10-26 15:48 syzbot
2023-10-27 6:07 ` Hugh Dickins
` (7 more replies)
0 siblings, 8 replies; 19+ messages in thread
From: syzbot @ 2023-10-26 15:48 UTC (permalink / raw)
To: akpm, linux-kernel, linux-mm, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=111b0e71680000
kernel config: https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b8e671680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125a9df5680000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800098f26d40
x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
pte_offset_map_lock include/linux/mm.h:2939 [inline]
filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
do_fault_around mm/memory.c:4525 [inline]
do_read_fault mm/memory.c:4558 [inline]
do_fault mm/memory.c:4705 [inline]
do_pte_missing mm/memory.c:3669 [inline]
handle_pte_fault mm/memory.c:4978 [inline]
__handle_mm_fault mm/memory.c:5119 [inline]
handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1666
__mm_populate+0x240/0x3d8 mm/gup.c:1775
mm_populate include/linux/mm.h:3305 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: b006f948 b943a108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: b006f948 adrp x8, 0xdf29000
4: b943a108 ldr w8, [x8, #928]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
---
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@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
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.
If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
@ 2023-10-27 6:07 ` Hugh Dickins
2023-11-14 11:30 ` [syzbot] " syzbot
` (6 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: Hugh Dickins @ 2023-10-27 6:07 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: akpm, linux-kernel, linux-mm, syzkaller-bugs
In hope, redirecting this report to linux-arm-kernel
On Thu, 26 Oct 2023, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=111b0e71680000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b8e671680000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125a9df5680000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
>
> Unable to handle kernel paging request at virtual address dfff800000000004
> KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
> Mem abort info:
> ESR = 0x0000000096000005
> EC = 0x25: DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> FSC = 0x05: level 1 translation fault
> Data abort info:
> ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
> CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [dfff800000000004] address between user and kernel address ranges
> Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
> pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> sp : ffff800098f26d40
> x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
> x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
> x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
> x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
> x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
> x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
> x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
> x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
> x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
> Call trace:
> __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
> _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
> spin_lock include/linux/spinlock.h:351 [inline]
> __pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
> pte_offset_map_lock include/linux/mm.h:2939 [inline]
> filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
> do_fault_around mm/memory.c:4525 [inline]
> do_read_fault mm/memory.c:4558 [inline]
> do_fault mm/memory.c:4705 [inline]
> do_pte_missing mm/memory.c:3669 [inline]
> handle_pte_fault mm/memory.c:4978 [inline]
> __handle_mm_fault mm/memory.c:5119 [inline]
> handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
> faultin_page mm/gup.c:956 [inline]
> __get_user_pages+0x3e0/0xa24 mm/gup.c:1239
> populate_vma_page_range+0x254/0x328 mm/gup.c:1666
> __mm_populate+0x240/0x3d8 mm/gup.c:1775
> mm_populate include/linux/mm.h:3305 [inline]
> vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
> ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
> __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
> __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
> __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
> __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
> invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
> el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
> do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
> el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
> el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
> el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
> Code: b006f948 b943a108 34000208 d343fe68 (386c6908)
> ---[ end trace 0000000000000000 ]---
> ----------------
> Code disassembly (best guess):
> 0: b006f948 adrp x8, 0xdf29000
> 4: b943a108 ldr w8, [x8, #928]
> 8: 34000208 cbz w8, 0x48
> c: d343fe68 lsr x8, x19, #3
> * 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
>
>
> ---
> 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@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>
> If the bug is already fixed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> 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.
>
> If you want to overwrite bug's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the bug is a duplicate of another bug, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
I've spent a while worrying over this report, but have not been able
glean much from it: I'm not at all familiar with arm64 debugging, so
cannot deduce anything from the registers shown, though suspect they
would shed good light on it; but it may just be a waste of time, since
it was on a transient 6.6-rc6-based for-kernelci branch from last week.
If I read right, the reproducer is exercising MADV_PAGEOUT (splitting
huge pages) and MADV_COLLAPSE (assembling huge pages), on mmaps
MAP_FIXED MAP_SHARED MAP_ANONYMOUS i.e. shmem.
Suspicion falls on my 6.6-rc1 mm/khugepaged.c changes; but I don't see
what's wrong, and shall probably give up and ignore this - unless an
arm64 expert can take it further, or syzbot reproduces it on x86 on a
known tree.
Hugh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
@ 2023-10-27 6:07 ` Hugh Dickins
0 siblings, 0 replies; 19+ messages in thread
From: Hugh Dickins @ 2023-10-27 6:07 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: akpm, linux-kernel, linux-mm, syzkaller-bugs
In hope, redirecting this report to linux-arm-kernel
On Thu, 26 Oct 2023, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=111b0e71680000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b8e671680000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125a9df5680000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
>
> Unable to handle kernel paging request at virtual address dfff800000000004
> KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
> Mem abort info:
> ESR = 0x0000000096000005
> EC = 0x25: DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> FSC = 0x05: level 1 translation fault
> Data abort info:
> ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
> CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [dfff800000000004] address between user and kernel address ranges
> Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
> pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> sp : ffff800098f26d40
> x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
> x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
> x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
> x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
> x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
> x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
> x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
> x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
> x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
> Call trace:
> __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
> _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
> spin_lock include/linux/spinlock.h:351 [inline]
> __pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
> pte_offset_map_lock include/linux/mm.h:2939 [inline]
> filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
> do_fault_around mm/memory.c:4525 [inline]
> do_read_fault mm/memory.c:4558 [inline]
> do_fault mm/memory.c:4705 [inline]
> do_pte_missing mm/memory.c:3669 [inline]
> handle_pte_fault mm/memory.c:4978 [inline]
> __handle_mm_fault mm/memory.c:5119 [inline]
> handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
> faultin_page mm/gup.c:956 [inline]
> __get_user_pages+0x3e0/0xa24 mm/gup.c:1239
> populate_vma_page_range+0x254/0x328 mm/gup.c:1666
> __mm_populate+0x240/0x3d8 mm/gup.c:1775
> mm_populate include/linux/mm.h:3305 [inline]
> vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
> ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
> __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
> __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
> __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
> __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
> invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
> el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
> do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
> el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
> el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
> el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
> Code: b006f948 b943a108 34000208 d343fe68 (386c6908)
> ---[ end trace 0000000000000000 ]---
> ----------------
> Code disassembly (best guess):
> 0: b006f948 adrp x8, 0xdf29000
> 4: b943a108 ldr w8, [x8, #928]
> 8: 34000208 cbz w8, 0x48
> c: d343fe68 lsr x8, x19, #3
> * 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
>
>
> ---
> 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@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>
> If the bug is already fixed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> 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.
>
> If you want to overwrite bug's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the bug is a duplicate of another bug, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
I've spent a while worrying over this report, but have not been able
glean much from it: I'm not at all familiar with arm64 debugging, so
cannot deduce anything from the registers shown, though suspect they
would shed good light on it; but it may just be a waste of time, since
it was on a transient 6.6-rc6-based for-kernelci branch from last week.
If I read right, the reproducer is exercising MADV_PAGEOUT (splitting
huge pages) and MADV_COLLAPSE (assembling huge pages), on mmaps
MAP_FIXED MAP_SHARED MAP_ANONYMOUS i.e. shmem.
Suspicion falls on my 6.6-rc1 mm/khugepaged.c changes; but I don't see
what's wrong, and shall probably give up and ignore this - unless an
arm64 expert can take it further, or syzbot reproduces it on x86 on a
known tree.
Hugh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
2023-10-27 6:07 ` Hugh Dickins
@ 2023-11-14 11:30 ` syzbot
2023-11-14 11:47 ` syzbot
` (5 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 11:30 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: BUG: unable to handle kernel paging request in __pte_offset_map_lock
Author: jose.pekkarinen@foxhound.fi
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
03d1179639b1515dce087335c1fb5c962908683b
José Pekkarinen.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
2023-10-27 6:07 ` Hugh Dickins
2023-11-14 11:30 ` [syzbot] " syzbot
@ 2023-11-14 11:47 ` syzbot
2023-11-14 15:43 ` syzbot
` (4 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 11:47 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: BUG: unable to handle kernel paging request in __pte_offset_map_lock
Author: jose.pekkarinen@foxhound.fi
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
03d1179639b1515dce087335c1fb5c962908683b
José Pekkarinen.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
` (2 preceding siblings ...)
2023-11-14 11:47 ` syzbot
@ 2023-11-14 15:43 ` syzbot
2023-11-14 17:10 ` syzbot
` (3 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 15:43 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: BUG: unable to handle kernel paging request in __pte_offset_map_lock
Author: jose.pekkarinen@foxhound.fi
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
03d1179639b1515dce087335c1fb5c962908683b
José Pekkarinen.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
` (3 preceding siblings ...)
2023-11-14 15:43 ` syzbot
@ 2023-11-14 17:10 ` syzbot
2023-11-14 18:25 ` syzbot
` (2 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 17:10 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: BUG: unable to handle kernel paging request in __pte_offset_map_lock
Author: jose.pekkarinen@foxhound.fi
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
03d1179639b1515dce087335c1fb5c962908683b
José Pekkarinen.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
` (4 preceding siblings ...)
2023-11-14 17:10 ` syzbot
@ 2023-11-14 18:25 ` syzbot
2023-11-16 7:39 ` [syzbot] [mm?] " Hugh Dickins
2023-11-17 5:42 ` Hugh Dickins
7 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 18:25 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: BUG: unable to handle kernel paging request in __pte_offset_map_lock
Author: jose.pekkarinen@foxhound.fi
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
03d1179639b1515dce087335c1fb5c962908683b
José Pekkarinen.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-27 6:07 ` Hugh Dickins
@ 2023-11-15 19:39 ` Matthew Wilcox
-1 siblings, 0 replies; 19+ messages in thread
From: Matthew Wilcox @ 2023-11-15 19:39 UTC (permalink / raw)
To: Hugh Dickins
Cc: linux-arm-kernel, akpm, linux-kernel, linux-mm, syzkaller-bugs,
jose.pekkarinen
On Thu, Oct 26, 2023 at 11:07:35PM -0700, Hugh Dickins wrote:
> I've spent a while worrying over this report, but have not been able
> glean much from it: I'm not at all familiar with arm64 debugging, so
> cannot deduce anything from the registers shown, though suspect they
> would shed good light on it; but it may just be a waste of time, since
> it was on a transient 6.6-rc6-based for-kernelci branch from last week.
>
> If I read right, the reproducer is exercising MADV_PAGEOUT (splitting
> huge pages) and MADV_COLLAPSE (assembling huge pages), on mmaps
> MAP_FIXED MAP_SHARED MAP_ANONYMOUS i.e. shmem.
>
> Suspicion falls on my 6.6-rc1 mm/khugepaged.c changes; but I don't see
> what's wrong, and shall probably give up and ignore this - unless an
> arm64 expert can take it further, or syzbot reproduces it on x86 on a
> known tree.
Just to tie the two threads together ... it looks to me like what's
happening is __pte_offset_map_lock() is racing with pagetable_pte_dtor().
That is, we're walking the page tables, find a pmd, look up its
page/ptdesc, but because CONFIG_LOCKDEP is enabled, ptdesc->ptl is a
pointer to a lock, and that pointer is NULL.
More discussion here:
https://lore.kernel.org/linux-mm/ZVUWLgFgu+jE3QmW@casper.infradead.org/T/#t
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
@ 2023-11-15 19:39 ` Matthew Wilcox
0 siblings, 0 replies; 19+ messages in thread
From: Matthew Wilcox @ 2023-11-15 19:39 UTC (permalink / raw)
To: Hugh Dickins
Cc: linux-arm-kernel, akpm, linux-kernel, linux-mm, syzkaller-bugs,
jose.pekkarinen
On Thu, Oct 26, 2023 at 11:07:35PM -0700, Hugh Dickins wrote:
> I've spent a while worrying over this report, but have not been able
> glean much from it: I'm not at all familiar with arm64 debugging, so
> cannot deduce anything from the registers shown, though suspect they
> would shed good light on it; but it may just be a waste of time, since
> it was on a transient 6.6-rc6-based for-kernelci branch from last week.
>
> If I read right, the reproducer is exercising MADV_PAGEOUT (splitting
> huge pages) and MADV_COLLAPSE (assembling huge pages), on mmaps
> MAP_FIXED MAP_SHARED MAP_ANONYMOUS i.e. shmem.
>
> Suspicion falls on my 6.6-rc1 mm/khugepaged.c changes; but I don't see
> what's wrong, and shall probably give up and ignore this - unless an
> arm64 expert can take it further, or syzbot reproduces it on x86 on a
> known tree.
Just to tie the two threads together ... it looks to me like what's
happening is __pte_offset_map_lock() is racing with pagetable_pte_dtor().
That is, we're walking the page tables, find a pmd, look up its
page/ptdesc, but because CONFIG_LOCKDEP is enabled, ptdesc->ptl is a
pointer to a lock, and that pointer is NULL.
More discussion here:
https://lore.kernel.org/linux-mm/ZVUWLgFgu+jE3QmW@casper.infradead.org/T/#t
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
` (5 preceding siblings ...)
2023-11-14 18:25 ` syzbot
@ 2023-11-16 7:39 ` Hugh Dickins
2023-11-16 7:59 ` syzbot
2023-11-17 5:42 ` Hugh Dickins
7 siblings, 1 reply; 19+ messages in thread
From: Hugh Dickins @ 2023-11-16 7:39 UTC (permalink / raw)
To: syzbot
Cc: akpm, linux-kernel, linux-mm, syzkaller-bugs, jose.pekkarinen,
willy, jannh, hughd
On Thu, 26 Oct 2023, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=111b0e71680000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b8e671680000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125a9df5680000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
>
> Unable to handle kernel paging request at virtual address dfff800000000004
> KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
> Mem abort info:
> ESR = 0x0000000096000005
> EC = 0x25: DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> FSC = 0x05: level 1 translation fault
> Data abort info:
> ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
> CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [dfff800000000004] address between user and kernel address ranges
> Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
> pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> sp : ffff800098f26d40
> x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
> x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
> x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
> x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
> x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
> x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
> x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
> x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
> x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
> Call trace:
> __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
> _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
> spin_lock include/linux/spinlock.h:351 [inline]
> __pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
> pte_offset_map_lock include/linux/mm.h:2939 [inline]
> filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
> do_fault_around mm/memory.c:4525 [inline]
> do_read_fault mm/memory.c:4558 [inline]
> do_fault mm/memory.c:4705 [inline]
> do_pte_missing mm/memory.c:3669 [inline]
> handle_pte_fault mm/memory.c:4978 [inline]
> __handle_mm_fault mm/memory.c:5119 [inline]
> handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
> faultin_page mm/gup.c:956 [inline]
> __get_user_pages+0x3e0/0xa24 mm/gup.c:1239
> populate_vma_page_range+0x254/0x328 mm/gup.c:1666
> __mm_populate+0x240/0x3d8 mm/gup.c:1775
> mm_populate include/linux/mm.h:3305 [inline]
> vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
> ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
> __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
> __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
> __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
> __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
> invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
> el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
> do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
> el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
> el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
> el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
> Code: b006f948 b943a108 34000208 d343fe68 (386c6908)
> ---[ end trace 0000000000000000 ]---
> ----------------
> Code disassembly (best guess):
> 0: b006f948 adrp x8, 0xdf29000
> 4: b943a108 ldr w8, [x8, #928]
> 8: 34000208 cbz w8, 0x48
> c: d343fe68 lsr x8, x19, #3
> * 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
>
>
> ---
> 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@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>
> If the bug is already fixed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> 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.
>
> If you want to overwrite bug's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the bug is a duplicate of another bug, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
Okay, let's try again by replying to the full orginal report
(see thread Matthew linked to for discussion leading to this):
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b85ea95d086471afb4ad062012a4d73cd328fa86
Subject: [PATCH] mm/pgtable: smp_rmb() to match smp_wmb() in pmd_install()
Not-Yet-Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/memory.c | 2 ++
mm/pgtable-generic.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/mm/memory.c b/mm/memory.c
index 1f18ed4a5497..8939357f1509 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -425,6 +425,8 @@ void pmd_install(struct mm_struct *mm, pmd_t *pmd, pgtable_t *pte)
* being the notable exception) will already guarantee loads are
* seen in-order. See the alpha page table accessors for the
* smp_rmb() barriers in page table walking code.
+ *
+ * See __pte_offset_map() for the smp_rmb() at the pte level.
*/
smp_wmb(); /* Could be smp_wmb__xxx(before|after)_spin_lock */
pmd_populate(mm, pmd, *pte);
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index 4fcd959dcc4d..3330b666e9c3 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -297,6 +297,11 @@ pte_t *__pte_offset_map(pmd_t *pmd, unsigned long addr, pmd_t *pmdvalp)
pmd_clear_bad(pmd);
goto nomap;
}
+ /*
+ * Pair with the smp_wmb() in pmd_install(): make sure that the
+ * page table lock and page table contents are visibly initialized.
+ */
+ smp_rmb();
return __pte_map(&pmdval, addr);
nomap:
rcu_read_unlock();
--
2.35.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-11-16 7:39 ` [syzbot] [mm?] " Hugh Dickins
@ 2023-11-16 7:59 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-16 7:59 UTC (permalink / raw)
To: akpm, hughd, jannh, jose.pekkarinen, linux-kernel, linux-mm,
syzkaller-bugs, willy
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6731 Comm: syz-executor.5 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800097066d40
x29: ffff800097067000 x28: ffff8000808f70ac x27: ffff700012e0ce18
x26: 1ffff00011c64088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff700012e0cdd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800097067750
x17: ffff80008e31d000 x16: ffff80008a73b6ac x15: 0000000000000001
x14: ffff80008e320448 x13: ffff800097066e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e320444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f70ac x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:378
pte_offset_map_lock include/linux/mm.h:2946 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4588 [inline]
do_read_fault mm/memory.c:4621 [inline]
do_fault mm/memory.c:4764 [inline]
do_pte_missing mm/memory.c:3732 [inline]
handle_pte_fault mm/memory.c:5040 [inline]
__handle_mm_fault mm/memory.c:5181 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5346
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3379 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 90070528 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 90070528 adrp x8, 0xe0a4000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=14cf3388e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=136db347680000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
` (6 preceding siblings ...)
2023-11-16 7:39 ` [syzbot] [mm?] " Hugh Dickins
@ 2023-11-17 5:42 ` Hugh Dickins
2023-11-17 6:24 ` syzbot
7 siblings, 1 reply; 19+ messages in thread
From: Hugh Dickins @ 2023-11-17 5:42 UTC (permalink / raw)
To: syzbot
Cc: akpm, linux-kernel, linux-mm, syzkaller-bugs, jose.pekkarinen,
willy, jannh, hughd
On Thu, 26 Oct 2023, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 78124b0c1d10 Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=111b0e71680000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f27cd6e68911e026
> dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b8e671680000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125a9df5680000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bd512de820ae/disk-78124b0c.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/a47a437b1d4f/vmlinux-78124b0c.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3ae8b966bcd7/Image-78124b0c.gz.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
>
> Unable to handle kernel paging request at virtual address dfff800000000004
> KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
> Mem abort info:
> ESR = 0x0000000096000005
> EC = 0x25: DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> FSC = 0x05: level 1 translation fault
> Data abort info:
> ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
> CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [dfff800000000004] address between user and kernel address ranges
> Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
> pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> sp : ffff800098f26d40
> x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
> x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
> x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
> x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
> x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
> x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
> x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
> x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
> x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
> Call trace:
> __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
> lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
> __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
> _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
> spin_lock include/linux/spinlock.h:351 [inline]
> __pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
> pte_offset_map_lock include/linux/mm.h:2939 [inline]
> filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
> do_fault_around mm/memory.c:4525 [inline]
> do_read_fault mm/memory.c:4558 [inline]
> do_fault mm/memory.c:4705 [inline]
> do_pte_missing mm/memory.c:3669 [inline]
> handle_pte_fault mm/memory.c:4978 [inline]
> __handle_mm_fault mm/memory.c:5119 [inline]
> handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
> faultin_page mm/gup.c:956 [inline]
> __get_user_pages+0x3e0/0xa24 mm/gup.c:1239
> populate_vma_page_range+0x254/0x328 mm/gup.c:1666
> __mm_populate+0x240/0x3d8 mm/gup.c:1775
> mm_populate include/linux/mm.h:3305 [inline]
> vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
> ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
> __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
> __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
> __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
> __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
> invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
> el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
> do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
> el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
> el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
> el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
> Code: b006f948 b943a108 34000208 d343fe68 (386c6908)
> ---[ end trace 0000000000000000 ]---
> ----------------
> Code disassembly (best guess):
> 0: b006f948 adrp x8, 0xdf29000
> 4: b943a108 ldr w8, [x8, #928]
> 8: 34000208 cbz w8, 0x48
> c: d343fe68 lsr x8, x19, #3
> * 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
>
>
> ---
> 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@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>
> If the bug is already fixed, let syzbot know by replying with:
> #syz fix: exact-commit-title
>
> 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.
>
> If you want to overwrite bug's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
>
> If the bug is a duplicate of another bug, reply with:
> #syz dup: exact-subject-of-another-report
>
> If you want to undo deduplication, reply with:
> #syz undup
I expect syzbot to approve of this one...
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b85ea95d086471afb4ad062012a4d73cd328fa86
[PATCH] mm: fix oops when filemap_map_pmd() without prealloc_pte
[text to be filled in a little later]
Fixes: f9ce0be71d1f ("mm: Cleanup faultaround and finish_fault() codepaths")
Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index 9710f43a89ac..3d4dae9d1070 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3371,7 +3371,7 @@ static bool filemap_map_pmd(struct vm_fault *vmf, struct folio *folio,
}
}
- if (pmd_none(*vmf->pmd))
+ if (pmd_none(*vmf->pmd) && vmf->prealloc_pte)
pmd_install(mm, vmf->pmd, &vmf->prealloc_pte);
return false;
--
2.35.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023-11-17 5:42 ` Hugh Dickins
@ 2023-11-17 6:24 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-17 6:24 UTC (permalink / raw)
To: akpm, hughd, jannh, jose.pekkarinen, linux-kernel, linux-mm,
syzkaller-bugs, willy
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=14e7e350e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=1586ca14e80000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
[not found] <aa2ae5537093181aac903a420c029113@foxhound.fi>
@ 2023-11-14 18:49 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 18:49 UTC (permalink / raw)
To: jose.pekkarinen, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 7876 Comm: syz-executor.4 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800099b16d40
x29: ffff800099b17000 x28: ffff8000808f718c x27: ffff700013362e18
x26: 1ffff00011c62088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff700013362dd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800099b17750
x17: 0000000000000000 x16: ffff80008a7389ec x15: 0000000000000001
x14: ffff80008e310448 x13: ffff800099b16e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e310444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f718c x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x158/0x294 mm/pgtable-generic.c:375
pte_offset_map_lock include/linux/mm.h:2946 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4586 [inline]
do_read_fault mm/memory.c:4619 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5344
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3379 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 900704a8 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 900704a8 adrp x8, 0xe094000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1052c057680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=1071c13f680000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
[not found] <674a0d1a2b541f6d3c199b5bddda8db9@foxhound.fi>
@ 2023-11-14 17:38 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 17:38 UTC (permalink / raw)
To: jose.pekkarinen, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 8592 Comm: syz-executor.4 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800097706d40
x29: ffff800097707000 x28: ffff8000808f718c x27: ffff700012ee0e18
x26: 1ffff00011c62088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff700012ee0dd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800097707750
x17: 0000000000000000 x16: ffff80008a7369ec x15: 0000000000000001
x14: ffff80008e310448 x13: ffff800097706e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e310444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f718c x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x160/0x2a8 mm/pgtable-generic.c:375
pte_offset_map_lock include/linux/mm.h:2946 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4586 [inline]
do_read_fault mm/memory.c:4619 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5344
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3379 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 900704a8 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 900704a8 adrp x8, 0xe094000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=121fa70f680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=17cf0304e80000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
[not found] <58662b6bdb914d8c6411d0994e791d53@foxhound.fi>
@ 2023-11-14 16:11 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 16:11 UTC (permalink / raw)
To: jose.pekkarinen, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 7577 Comm: syz-executor.0 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff8000980e6d40
x29: ffff8000980e7000 x28: ffff8000808f70a8 x27: ffff70001301ce18
x26: 1ffff00011c62088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff70001301cdd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff8000980e7750
x17: 0000000000000000 x16: ffff80008a7375ec x15: 0000000000000001
x14: ffff80008e310448 x13: ffff8000980e6e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e310444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f70a8 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x154/0x288 mm/pgtable-generic.c:375
pte_offset_map_lock include/linux/mm.h:2946 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4586 [inline]
do_read_fault mm/memory.c:4619 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5344
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3379 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 900704a8 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 900704a8 adrp x8, 0xe094000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=174d171f680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=167d4a3f680000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
[not found] <82909cf60e85b216c14be8fa3ef036f0@foxhound.fi>
@ 2023-11-14 12:16 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 12:16 UTC (permalink / raw)
To: jose.pekkarinen, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 8555 Comm: syz-executor.5 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff80009b8e6d40
x29: ffff80009b8e7000 x28: ffff8000808f70a8 x27: ffff70001371ce18
x26: 1ffff00011c62088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff70001371cdd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff80009b8e7750
x17: 0000000000000000 x16: ffff80008a7375ec x15: 0000000000000001
x14: ffff80008e310448 x13: ffff80009b8e6e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e310444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f70a8 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x154/0x288 mm/pgtable-generic.c:375
pte_offset_map_lock include/linux/mm.h:2948 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4586 [inline]
do_read_fault mm/memory.c:4619 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5344
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3381 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 900704a8 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 900704a8 adrp x8, 0xe094000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=11ae6aff680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=161a7338e80000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock
[not found] <306c9c271642326cb02d59447b6fb4d6@foxhound.fi>
@ 2023-11-14 11:57 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2023-11-14 11:57 UTC (permalink / raw)
To: jose.pekkarinen, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in __pte_offset_map_lock
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 7783 Comm: syz-executor.4 Not tainted 6.7.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800099216d40
x29: ffff800099217000 x28: ffff8000808f70a8 x27: ffff700013242e18
x26: 1ffff00011c62088 x25: 0000000000000000 x24: 0000000000000000
x23: ffff700013242dd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800099217750
x17: 0000000000000000 x16: ffff80008a7375ec x15: 0000000000000001
x14: ffff80008e310448 x13: ffff800099216e80 x12: dfff800000000000
x11: ffff80008031ef10 x10: ffff80008e310444 x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808f70a8 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
__lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__pte_offset_map_lock+0x154/0x288 mm/pgtable-generic.c:375
pte_offset_map_lock include/linux/mm.h:2946 [inline]
filemap_map_pages+0x5cc/0x112c mm/filemap.c:3531
do_fault_around mm/memory.c:4586 [inline]
do_read_fault mm/memory.c:4619 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x35ec/0x49f8 mm/memory.c:5344
faultin_page mm/gup.c:956 [inline]
__get_user_pages+0x3e0/0xa24 mm/gup.c:1239
populate_vma_page_range+0x254/0x328 mm/gup.c:1677
__mm_populate+0x240/0x3d8 mm/gup.c:1786
mm_populate include/linux/mm.h:3379 [inline]
vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1425
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: 900704a8 b9424108 34000208 d343fe68 (386c6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 900704a8 adrp x8, 0xe094000
4: b9424108 ldr w8, [x8, #576]
8: 34000208 cbz w8, 0x48
c: d343fe68 lsr x8, x19, #3
* 10: 386c6908 ldrb w8, [x8, x12] <-- trapping instruction
Tested on:
commit: b85ea95d Linux 6.7-rc1
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=15de58fb680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fffc11e84313b7c6
dashboard link: https://syzkaller.appspot.com/bug?extid=89edd67979b52675ddec
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=16826a57680000
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2023-11-17 6:24 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-26 15:48 [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock syzbot
2023-10-27 6:07 ` Hugh Dickins
2023-10-27 6:07 ` Hugh Dickins
2023-11-15 19:39 ` Matthew Wilcox
2023-11-15 19:39 ` Matthew Wilcox
2023-11-14 11:30 ` [syzbot] " syzbot
2023-11-14 11:47 ` syzbot
2023-11-14 15:43 ` syzbot
2023-11-14 17:10 ` syzbot
2023-11-14 18:25 ` syzbot
2023-11-16 7:39 ` [syzbot] [mm?] " Hugh Dickins
2023-11-16 7:59 ` syzbot
2023-11-17 5:42 ` Hugh Dickins
2023-11-17 6:24 ` syzbot
[not found] <306c9c271642326cb02d59447b6fb4d6@foxhound.fi>
2023-11-14 11:57 ` syzbot
[not found] <82909cf60e85b216c14be8fa3ef036f0@foxhound.fi>
2023-11-14 12:16 ` syzbot
[not found] <58662b6bdb914d8c6411d0994e791d53@foxhound.fi>
2023-11-14 16:11 ` syzbot
[not found] <674a0d1a2b541f6d3c199b5bddda8db9@foxhound.fi>
2023-11-14 17:38 ` syzbot
[not found] <aa2ae5537093181aac903a420c029113@foxhound.fi>
2023-11-14 18:49 ` syzbot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.