From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30A75C25B47 for ; Fri, 27 Oct 2023 06:07:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 556256B03B7; Fri, 27 Oct 2023 02:07:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 505D76B03B8; Fri, 27 Oct 2023 02:07:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A74B6B03B9; Fri, 27 Oct 2023 02:07:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 24B106B03B7 for ; Fri, 27 Oct 2023 02:07:53 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BC8FC1A10D4 for ; Fri, 27 Oct 2023 06:07:52 +0000 (UTC) X-FDA: 81390210384.23.242E0E5 Received: from mail-yw1-f193.google.com (mail-yw1-f193.google.com [209.85.128.193]) by imf04.hostedemail.com (Postfix) with ESMTP id F190C40013 for ; Fri, 27 Oct 2023 06:07:50 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=SlYlqbUg; spf=pass (imf04.hostedemail.com: domain of hughd@google.com designates 209.85.128.193 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698386871; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7UbYvl6tCL9BYjy1qjOMIRbYtv6kw8c/Q8X5TDSyiFM=; b=DZXApHrNu/L7R1tkKuNIBGACrZ+KS0GljxMtcqo0PTSDUYzsKNlydsSJ7IwV/tcb762su2 3CPC+1aKj/NYHk4XyPptpNdiH3JfgCHa0vSsdkqycSqfKsNiT9GWyISBrsOBZsiLfQ+Igi VEPZcSNekb0AXeZAesG+OWxapixMtxE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698386871; a=rsa-sha256; cv=none; b=wZ36BGCki5BzgZ55usNDSHaULCCQl5k7XhJzN+QP4CUGwcZg5P8zu7hA6Yk4BhSNAfHK4I gf9ObMIIE+BWxW1jK6J1XwH4PRkgr2RdU6GcpJzD19ZAB0l/A8za6Dg859XN7naPugi/M4 2QMdibcs8CQEc9o/TyZqccnjS/eY1I4= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=SlYlqbUg; spf=pass (imf04.hostedemail.com: domain of hughd@google.com designates 209.85.128.193 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yw1-f193.google.com with SMTP id 00721157ae682-5afbdbf3a19so2093627b3.2 for ; Thu, 26 Oct 2023 23:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698386870; x=1698991670; darn=kvack.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=7UbYvl6tCL9BYjy1qjOMIRbYtv6kw8c/Q8X5TDSyiFM=; b=SlYlqbUgslBkGhiB/0+X4hp7C6EpVXXRhWl1IUiBO3uaGg5GxcwlKDT3kUa8OszZWf YnOzgNFfDLFOA+izi772RpTYZz3+VHiq88uJahMPDx3bdskl8X831Olfb+c4vWA65cRo GzkNvJrtmV+3kw19mj74r5awRJqJfpq7pRziTijBi/Rg+I0d+FG6lDkZ3ETGW7gdO3Qr 5vzE+t9erC4DTytMnKPKZ9Jt2ZSXRgecoCfUJ/eueQuxtpVpeDAdrccJ8F9+3wuyeKix y2hwj/dc6xcyCuLWad+kJ3cbkGO4I4co9nVEZjRo5mH5321jHD97N0vc3t6tG8uwkU9n Kxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698386870; x=1698991670; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7UbYvl6tCL9BYjy1qjOMIRbYtv6kw8c/Q8X5TDSyiFM=; b=EaELSBfLLfo6kVNf7Bl3AyaNhJGYeVnGoteoD+Ih2m56+Q3TSUksHUkzKsYkUNj90j uI8awuWV/LBpPP6JLXeP8H5Gy/u/g3N40+jZm9qIJHb7MOxHmWNuwCO/BSrc7ah/C867 Hl90ud6smnZJoBEDkc6xjnnCl0oGRjVN1+VD8s8fcNqB5xetuQN5r5ild+Maf+4bxU3c f2hoqxsaFArNon9x8pGEzOgb4SZ4YgOQrAt4Q/6FFkB6qNoVHWP032GraHw/45jk4v2g gwv8Dx42q4eXMudE9lWIhhXINKf/jmLibRvIbTHtpwJi/GRjhcFE/desyneNuti0fmBg kbqA== X-Gm-Message-State: AOJu0YzLkYYB3uXRDiUOv1M9OIe8OTuiwZhUhMQY4hajHGcFa8VbjVVa UhDls2v0cUG9CMYaLELfShQtMQ== X-Google-Smtp-Source: AGHT+IEEu7eYjdMrlk5mIlO110lV+7FPVcxu3Is1OBBfqDj52jm4BBoQUnywbHaFWQvmYdaZAhr4jA== X-Received: by 2002:a81:c645:0:b0:59a:f131:50fa with SMTP id q5-20020a81c645000000b0059af13150famr1508357ywj.47.1698386869873; Thu, 26 Oct 2023 23:07:49 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id s4-20020a0de904000000b0058fc7604f45sm412694ywe.130.2023.10.26.23.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 23:07:48 -0700 (PDT) Date: Thu, 26 Oct 2023 23:07:35 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: linux-arm-kernel@lists.infradead.org cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock In-Reply-To: <0000000000005e44550608a0806c@google.com> Message-ID: References: <0000000000005e44550608a0806c@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Stat-Signature: 7uucga14cwtdbsoks581s8aytjqbs6az X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: F190C40013 X-Rspam-User: X-HE-Tag: 1698386870-726425 X-HE-Meta: U2FsdGVkX1/R7etfcrKFjMWECsagYdWSsd3peYNh4+Vib/FQTFG9ixTOVwlndBTTq6VIXI47nSat31ZREzOKbI7uD3Ldm2S4OfGG6xdpt0I0Jz0O5atnTuJfZXhRuQBxSWz7JRYeIqKx+vKY2F19Eo10xqU624f6cSgZwGqnb5fdqBxbJZ/qXHC7Z1AEOUW1QA+isrIrgutsWIFbN5RJG30XT+EkAY1FlspWS6BUPIp+c0c3tv/lBArIn9IitCUYTsqrxR+FdTPkVBuiLJQeZgtMtof4lKbePcVKSk+YWOg3V+HXrFW2HFJe0xKagcgHKXOLve80irjhVjx0OseAdaQQq0jvagcJJJwxLHgcRqDJ8EqTbNsdEurCJkGLQPxRxdCkwFmsuZ+SgjA4oIFBz65dRo9VTdq5Nl2WDe3imuQWXsA7h2r88IsiTLMJwyTWxrvnrcsHV9moHjwYJeSJzyABSI6K/UowhkDrtzGpzeNrOhkzqsE88tL4YPAtvVAGtbA86w43DdqQXHFgLc1RtC+vbnc4eK8k/Y8i24l2ow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AguP/3rCKcYxrOYd0pLOPp+hZkHQqLPALSXrInjb0QfwJ+lJUQQLHeDeAa3JFlEhh/uOfRh/AuW+JioQEI2bZNlpQAIJWn/YMYyYBCW7FcgiwmhHgczYqwIG1ckREtEJQk1Wr8nrJOkCZ3iO8vMN9KPYIvCF+nbbsGpHbPyQNTnjf9o8l6aTw50gz6vpc3uNj0veusN0XgDGgyInwPFrTb9JO6GjCCuQzNwfw+oEIwKDxhEGSoUM5p48NMQ7JrB6CvA73Y3XEx3KoD5+jkY9QNSGrgLYofPiDQ5p4Dv1G7/4ReagMfge5+z10O+ZVUIxXJ0X1K1Lll0wzpb0YFDb3eTaX5ql 0cHRQQCA xfHJoa0owzJIjKweByGjg4V35vy4FSwzwAapT4hzDd8gpCKvdxqvxS0wZd5OvTLzGHF2ucYNBfGb7NWJ1vWhbLd4hmTG6MdS7bS5cySIGhCxXAHaqMzUXA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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