Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp200150lql; Fri, 12 Apr 2024 07:57:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVv1sj4EJil1olVLUBDhzxA10GuRQQM4v1u1T5UdGnJk4dTXuVPG+MziqXI5h17kBo1NZB8oN/bC7eRXhQjsSg3gSEzspeLPv6axteU2Q== X-Google-Smtp-Source: AGHT+IEyW9prAJkqPuZjmy5KWJTcKpveLffJntAwQYVzX5sGDTJTYfa88J91bQ8/LDJ2TA5KV4Ni X-Received: by 2002:a17:90a:e2cf:b0:2a5:3aec:fdef with SMTP id fr15-20020a17090ae2cf00b002a53aecfdefmr2286376pjb.47.1712933849048; Fri, 12 Apr 2024 07:57:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712933849; cv=pass; d=google.com; s=arc-20160816; b=cbDUdWJ+mnvS8qC1fZ2M+eJQIjGIyjURJfoZUhqpPjGjKiU3tQGuSmdgr9pf+p0tzW GRNoVj5keIVO/fgHdndaqYXIi0GRTqdEdf/hMVEqh4HEPjOc3f3+v0s9gih9Pms1VO1X KH8DYxS8smOVDJeGoO3ywP9NiZLordmyG3OlofeKKmk2ezpxeO21RHp1FrJjvi02hY+h lRYx4Kil+wlNgyZJ2+GiEOWqmr/Sv5yilTmPpCnt4kDQMTN2Pu1zrUeWwk1HH4uP7/BO b0ZD18LVX6I/TeltKzsWyLKnVTGBONanj2P2wzS4za9lFp4tbO/WVocrKu+FwhAXo9+N K/Bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YNmRXhTqNHapf904DYr3UOK2gHdYTsUhf4/aRIA9fLg=; fh=xeOog3a4NyESiwia2wxxamSuCNyudm+1Qj93+zevXTY=; b=cSgWwdYduhA6gJbeofKfKzXHXenPpIHa7Mb46cLmLhFuTqRtMScS8vG8ZVRLLnfhaq 5DLiCbFf3TPyMxS0aQCbQGOtAui2ZzjY6ckJuQu2rVFlaTbLEmpaWiCOKFIal9FLEnOP ggizJFqNuIuj/A3+f6o21dtbcaQFFMGw5maiEqAh01/Kz8i5IqttCgZ/TcwH7RiYK28x vc0N7aQzKM8syz6xZ0MCch4VIv6vXMPLtygK9+q508OVcYCu/ZwItPF+S7jyaB0faQC5 7Ys3XqW9gipM2GPMXW4syeZZLzbGea3gsVa8Y63VBB/5VoxfuIz8/A0M3HzE2oN7uwFN kzTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nt4w8qTi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w4-20020a17090a1b8400b002a539098abdsi3502063pjc.174.2024.04.12.07.57.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 07:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nt4w8qTi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2063-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 94457282A38 for ; Fri, 12 Apr 2024 14:57:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AE161474D9; Fri, 12 Apr 2024 14:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nt4w8qTi" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17734146D5F; Fri, 12 Apr 2024 14:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712933832; cv=none; b=mSdT2+h+kWerK01iz1QKTN2v4H4hfZLZzECabDVR4wz26dnI5VeJzcU20b91OYZcItd2SXG/4209Bg14cQloMxhldCe7lQ2T4G1HOaLaNmnk8S1i0YWJQVr342ONvIOknbMsjZwFV/SJ4toLolRgC39m/AkIvqGjPd70bBSgyXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712933832; c=relaxed/simple; bh=DJu1ruU/2it86iiNywivAApRohuSOMQ8YBfr0G0U1I0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=b3PUz5iEbBF4FmW9B1t2cdCU2ZlNGl+jFcoTOuYDEWvmPvdmi/LXRPy1qHbavNyJW6PYIckh8UE3TzLp5c2sgHw7RN+i14XnibMtTtsX98i6YbEb6ysiey6/03WeWvGy62++1NRuqnu6l6qIFedeCugujproIo+29Qgw6zXV0dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nt4w8qTi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35DF7C113CC; Fri, 12 Apr 2024 14:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712933831; bh=DJu1ruU/2it86iiNywivAApRohuSOMQ8YBfr0G0U1I0=; h=From:To:Cc:Subject:Date:From; b=nt4w8qTilNtnTpj+xcg/r10zFAbZ06lS+wtFg87+RHnE3WtDCh8TGLMCaNTQikjYb K89hammQ+9ArbQuNifV0ERov/6nTbmJ9lfWFoOvYUuz4GmQy4XAAJNPl95xB2XvSCf PXi611njBptUD7MhZC0wSX8nf5yZB4/W2CBiuh6o7AMvOJAeMJa8fjnDLbtyYP1Kor sFCXU2KeZDt/goItO7y2Ka65dfDl+vQr/PJFHwowE4a92VseemlxgStSzdVCzI4218 WwEY6gqJkcO746T5h1SBP3hH+TcsKP0gEvULkwGlsijEgVi1Rgyg/mNtsYltkuVJaw uoIuTqwqHLmzQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: linux-fsdevel@vger.kernel.org, Alexander Viro , Christian Brauner , Jan Kara , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org, Conor Dooley Subject: riscv32 EXT4 splat, 6.8 regression? Date: Fri, 12 Apr 2024 16:57:08 +0200 Message-ID: <878r1ibpdn.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! I've been looking at an EXT4 splat on riscv32, that LKFT found [1]: | EXT4-fs (vda): mounted filesystem 13697a42-d10e-4a9e-8e56-cb9083be92f9 = ro with ordered data mode. Quota mode: disabled. | VFS: Mounted root (ext4 filesystem) readonly on device 254:0. | Unable to handle kernel NULL pointer dereference at virtual address 000= 00006 | Oops [#1] | Modules linked in: | CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0 #41 | Hardware name: riscv-virtio,qemu (DT) | epc : ext4_search_dir+0x52/0xe4 | ra : __ext4_find_entry+0x1d6/0x578 | epc : c035b60e ra : c035b876 sp : c253fc10 | gp : c21a7380 tp : c25c8000 t0 : 44c0657f | t1 : 0000000c t2 : 1de5b089 s0 : c253fc50 | s1 : 00000000 a0 : fffffffc a1 : fffff000 | a2 : 00000000 a3 : c29c04f8 a4 : c253fd00 | a5 : 00000000 a6 : c253fcfc a7 : fffffff3 | s2 : 00001000 s3 : 00000000 s4 : 00001000 | s5 : c29c04f8 s6 : c292db40 s7 : c253fcfc | s8 : fffffff7 s9 : c253fd00 s10: fffff000 | s11: c292db40 t3 : 00000007 t4 : 5e8b4525 | t5 : 00000000 t6 : 00000000 | status: 00000120 badaddr: 00000006 cause: 0000000d | [] ext4_search_dir+0x52/0xe4 | [] __ext4_find_entry+0x1d6/0x578 | [] ext4_lookup+0x92/0x200 | [] __lookup_slow+0x8e/0x142 | [] walk_component+0x104/0x174 | [] path_lookupat+0x78/0x182 | [] filename_lookup+0x96/0x158 | [] kern_path+0x38/0x56 | [] init_mount+0x46/0x96 | [] devtmpfs_mount+0x44/0x7a | [] prepare_namespace+0x226/0x27c | [] kernel_init_freeable+0x27e/0x2a0 | [] kernel_init+0x2a/0x158 | [] ret_from_fork+0xe/0x20 | Code: 84ae a809 d303 0044 949a 0f63 0603 991a fd63 0584 (c603) 0064=20 | ---[ end trace 0000000000000000 ]--- | Kernel panic - not syncing: Attempted to kill init! exitcode=3D0x000000= 0b This was not present in 6.7. Bisection wasn't really helpful (to me at least); I got it down to commit c604110e662a ("Merge tag 'vfs-6.8.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs"), and when I revert the commits in the vfs merge the splat went away, but I *really* struggle to see how those are related... What I see in ext4_search_dir() is that search_buf is 0xfffff000, and at some point the address wraps to zero, and boom. I doubt that 0xfffff000 is a sane address. Maybe this is something the the fs folks can spot directly? In the meantime I'll continue to dig... Thanks, and have a nice weeked! Bj=C3=B6rn [1] https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.8.y/build/v6= .8.4-281-g6d08df6c401e/testrun/23369914/suite/log-parser-test/tests/