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 6FE89C5B552 for ; Sun, 8 Jun 2025 15:26:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 069C66B0088; Sun, 8 Jun 2025 11:26:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 019F26B0089; Sun, 8 Jun 2025 11:26:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E72406B008A; Sun, 8 Jun 2025 11:26:37 -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 C2E956B0088 for ; Sun, 8 Jun 2025 11:26:37 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3972E121A38 for ; Sun, 8 Jun 2025 15:26:37 +0000 (UTC) X-FDA: 83532610434.10.95290B0 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) by imf08.hostedemail.com (Postfix) with ESMTP id 465BC16000F for ; Sun, 8 Jun 2025 15:26:35 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="XXFUfr2/"; spf=pass (imf08.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.185 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749396395; 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=0Jt4JQmErq4Yny7pnS33f1+VIu1hHHRGrT6P+hATzHU=; b=tHseFy7ZDVSQzaGSUFsxpchaLMbXEDGqrqvrHgjq62CpepIa791ErSz/bnIdkDY2PzesxW JnynQeIM+No1ijvoO6mnD6oNZoIoB/tnVOKiOaX5svxb4ZyhtmCA29N9t+JuxLc9G0IuVx 9XySDoiW7K8lpXuR5omzzjOWjWXytL4= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="XXFUfr2/"; spf=pass (imf08.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.185 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749396395; a=rsa-sha256; cv=none; b=ob7GX3PrKd4YKk7rIWIpFURDNQE2GJvbGJH4vjeRibhTanaZqiIlghmu+bBuu0oH12Zye0 c6lgFiIfsunhzWEPjHhUC+uiKW/BOG6KiTaKJpYSFx6WdSfzLSG/4YlbrRJEfo1rDdMGuM GtBfEdJoiQhunfOqLIW1Jf4Pyv+R3dM= Date: Sun, 8 Jun 2025 11:26:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749396392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0Jt4JQmErq4Yny7pnS33f1+VIu1hHHRGrT6P+hATzHU=; b=XXFUfr2/HE2QR5HzLf3Za2ogrd27YGSJfSOqWBrR1Zz8UJFlMtLOqrXlSl41lKdvy50MJj E9eLgGe7RAd3UhbMEaojSl62uK/F8Bb80qBbZesusr492NOg9DKncZ78ypNau4hijhDmD5 IUZ0na7Jr1lphTdNWeWjLfFAad3HWPU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: "Paul E. McKenney" Cc: syzbot , akpm@linux-foundation.org, josh@joshtriplett.org, linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [rcu?] [bcachefs?] BUG: unable to handle kernel NULL pointer dereference in rcu_core (3) Message-ID: References: <67a2b20a.050a0220.50516.0003.GAE@google.com> <9694d40a-072e-47c2-a950-3b258bbe04f5@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9694d40a-072e-47c2-a950-3b258bbe04f5@paulmck-laptop> X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Queue-Id: 465BC16000F X-Rspamd-Server: rspam09 X-Stat-Signature: jnesyx4491a8arwnis4mpq9u58djjrd5 X-HE-Tag: 1749396395-35751 X-HE-Meta: U2FsdGVkX18J7A1/MSE2mf3TdFqvECkUOWeiGzQUCigl2jw+b+FpgurwAk+0xbBYuZO49VyHktumzZeDahpfNTh15Qed8GD3fHFZOJ5B0TeE03Nr8oJcLGsSHeKsjg4TJtpJodfDTLG4S1p9gAELVGDEs6gSM1E7Jx3ZJSyruEgMZ+vv/vdR0O0vKX3xaaanJPSoqNpXEPd4TDisNn1no/xB3/1i1QqHjrsXC1o37Gf8rve1Rndh3zf5F17JIf8zmkbje0l+Y11qbTnqrq2QCGcW0qgMjycLbF8sEi8Ch7/pUF1I8uPjGflGjAFkf2LpyEp4Z+mfC9abCIp93OweYmhnxctraa07sI+DKHX3ebshiwCH/ttheBLCJeLSvsUCodj9TA+z+VjvGBvC3k7RZL3JKV4pOJrR3QD1sDp1Wx0gwwe2q0oaCB8XuhS3Rk0DxGAauorahp+a510TyyUJobmjekAsPp9uOfDJb3Ga3rX1WhOPBmZ6WyVgES6G8r+XYsLfkPRMnvnaNmTVORGJ8JOF5k19JYNjqWy/BU2P4Pl3GTCKS1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S75jgCJQlHwmSGJC2I1ve520chuI7/Hc0AxZr5sknYv2FEyP2z/FcaNvgTKch4dSNfyKLuGz9LTHHlH6D0UyILnd14xIhcSFEREQemLua6RhoSS1wAWe9HaeSV1UTBC0f4vvYVMAG2bN6mtK 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: On Wed, Feb 05, 2025 at 06:56:19AM -0800, Paul E. McKenney wrote: > On Tue, Feb 04, 2025 at 04:34:18PM -0800, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit: 0de63bb7d919 Merge tag 'pull-fix' of git://git.kernel.org/.. > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt?x=10faf5f8580000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=1909f2f0d8e641ce > > dashboard link: https://syzkaller.appspot.com/bug?extid=80e5d6f453f14a53383a > > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b69d18580000 > > > > Downloadable assets: > > disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-0de63bb7.raw.xz > > vmlinux: https://storage.googleapis.com/syzbot-assets/1142009a30a7/vmlinux-0de63bb7.xz > > kernel image: https://storage.googleapis.com/syzbot-assets/5d9e46a8998d/bzImage-0de63bb7.xz > > mounted in repro: https://storage.googleapis.com/syzbot-assets/526692501242/mount_0.gz > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > Reported-by: syzbot+80e5d6f453f14a53383a@syzkaller.appspotmail.com > > > > slab radix_tree_node start ffff88803bf382c0 pointer offset 24 size 576 > > BUG: kernel NULL pointer dereference, address: 0000000000000000 > > #PF: supervisor instruction fetch in kernel mode > > #PF: error_code(0x0010) - not-present page > > PGD 0 P4D 0 > > Oops: Oops: 0010 [#1] PREEMPT SMP KASAN NOPTI > > CPU: 0 UID: 0 PID: 5705 Comm: syz-executor Not tainted 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 > > Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 > > RIP: 0010:0x0 > > Code: Unable to access opcode bytes at 0xffffffffffffffd6. > > RSP: 0018:ffffc90000007bd8 EFLAGS: 00010246 > > RAX: dffffc0000000000 RBX: 1ffff110077e705c RCX: 23438dd059a4b100 > > RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff88803bf382d8 > > RBP: ffffc90000007e10 R08: ffffffff819f146c R09: 1ffff11003f8519a > > R10: dffffc0000000000 R11: 0000000000000000 R12: ffffffff81a6d507 > > R13: ffff88803bf382e0 R14: 0000000000000000 R15: ffff88803bf382d8 > > FS: 0000555567992500(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > CR2: ffffffffffffffd6 CR3: 000000004da38000 CR4: 0000000000352ef0 > > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > > Call Trace: > > > > rcu_do_batch kernel/rcu/tree.c:2546 [inline] > > The usual way that this happens is that someone clobbers the rcu_head > structure of something that has been passed to call_rcu(). The most > popular way of clobbering this structure is to pass the same something to > call_rcu() twice in a row, but other creative arrangements are possible. > > Building your kernel with CONFIG_DEBUG_OBJECTS_RCU_HEAD=y can usually > spot invoking call_rcu() twice in a row. I don't think it's that - syzbot's .config already has that enabled. KASAN, too. And the only place we do call_rcu() is from rcu_pending.c, where we've got a rearming rcu callback - but we track whether it's outstanding, and we do all relevant operations with a lock held. And we only use rcu_pending.c with SRCU, not regular RCU. We do use kfree_rcu() in a few places (all boring, I expect), but that doesn't (generally?) use the rcu callback list. So I'm not sure this is even a bcachefs bug.