Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3255904iob; Mon, 16 May 2022 17:18:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFM0cNJ/MUEAtZrEMqkYj8s5IcKUh+i9ypSdjK+OM+TIBZSfHSkms7J1yjv+uQcYZMfXOU X-Received: by 2002:a05:6402:2752:b0:41c:b898:19a6 with SMTP id z18-20020a056402275200b0041cb89819a6mr15976511edd.30.1652746696427; Mon, 16 May 2022 17:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652746696; cv=none; d=google.com; s=arc-20160816; b=bqILdvkTzfx1R3P5TEqzE2LZ4J9HsQTWOO2+3SwU0hUR6AcqX/3W96hN7+uXuw3A+u N15cqu/X2k87A5zr7VYSpHZ6ALrRbVGtnb/NEdcXI2Z6uECV55iYgOdAIqdh1vicQLpg K/PulsgFvTzGekGrhTbf4URrRU6b5BiF6ZT1Cmn+Cq3TKIMditAXsxkx2mnKyz5VYuy2 ykFQDAwpHPwZ1hpvlL7GH3q3k6I5a6obIemQJlsFF5epOaRG2a8YfqsGsemi1eV/UGxf xUn8JJ0XvoSaGLbTN14Sb9bG8kHagwOZJl6xInC2ET99nBl6RVUDpLyPSTkFvoVsBdbn 2VBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=HgrMtSbI+gEv7Nc/Og4GBmwT9gy5wt2WJIqYEKJ7Npg=; b=Kqw30QJUo7dt0Scx98ccLDJHio0+1yuvuvkYWt/7V/qCnu/NVyqfVc6HvVzHkJ1ZVq 8l2SNZH7Q1KcMUkqs4gwG2BqLS3ws9nRXxggRDZGpeYhmHA0aLPbtodLqE66X0MV3dHi PU47SOI9eY8ubRJXgR51PL6sbu4lgFhRg3H1IZpj11fuGGpusI+FOvx8QgMmODFiyUW0 A3PSzzHWdF7DOtx8M7XFX4mFtTITllxaH8QIWgVXD7aqu5XVdv5Y+EoG3ASZSQvcC/B1 0jXF/jo5aUmhy0OGB9ML8ajnIPvGAbEHvwU7/7v0fm4xbyCVqPDYYfSwZuxq44twaArx YCpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bF9VnhLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a170906974600b006f3a15fb802si1018739ejy.486.2022.05.16.17.17.50; Mon, 16 May 2022 17:18:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bF9VnhLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244649AbiEPOtF (ORCPT + 99 others); Mon, 16 May 2022 10:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232753AbiEPOtC (ORCPT ); Mon, 16 May 2022 10:49:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0EAB2EA22; Mon, 16 May 2022 07:49:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E505614E2; Mon, 16 May 2022 14:49:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D592CC385AA; Mon, 16 May 2022 14:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652712540; bh=EKoHX+5y+RbWGcamK+8qjsOXmOiTTL6e7+ONLetrMnk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bF9VnhLjpkIZY3AxG/5MyQud5PChf1hzlgY0CEQldaHDIbGMsBdsBSbT1vQlky/Tt YJlcysBwqx9dKeyc6vfSbXFSuvnAo0Wl5t7QTXwqZ7nCg+Z9UfBYXcFd+uqpb0kl1W h0MGyprG5aFKJfmPxKu71FMlojCR6N1cBm3Gq81x3kZinc+Evkyrm2y6p3OHzfmZiG 37A/xzwQmgPtsgJ1cbkizeW7No94c1U7MuPqMbsEl3RyT12FoUfxUzQ39a8sib9k/r Gk+zfl6lb+x+oAYqQz+TFtmPV7PFGmiBQWc8SrvBmiiGuEIvCclMVFsiY9O+235azV F51q6o5iKwzmA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nqc1p-00BdrO-T0; Mon, 16 May 2022 15:48:58 +0100 Date: Mon, 16 May 2022 15:48:57 +0100 Message-ID: <87k0al5y92.wl-maz@kernel.org> From: Marc Zyngier To: Naresh Kamboju Cc: open list , Linux-Next Mailing List , lkft-triage@lists.linaro.org, Stephen Rothwell , Thomas Gleixner , pali@kernel.org, Ingo Molnar Subject: Re: Unexpected kernel BRK exception at EL1 - Internal error: BRK handler: f20003e8 - gic_dist_config In-Reply-To: References: <87o7zylztd.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: naresh.kamboju@linaro.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, lkft-triage@lists.linaro.org, sfr@canb.auug.org.au, tglx@linutronix.de, pali@kernel.org, mingo@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2022 14:58:28 +0100, Naresh Kamboju wrote: > > Hi Marc, > > Thanks for looking into this report. > > On Mon, 16 May 2022 at 12:38, Marc Zyngier wrote: > > > > On Mon, 16 May 2022 07:16:22 +0100, > > Naresh Kamboju wrote: > > > > > > The kernel crash reported on arm64 juno-r2 device with kselftest-merge config > > > while booting Linux next-20220513 kernel [1]. > > > > > > > Huh. Who inserts random BRKs like this? > > > > > [ 0.000000] Internal error: BRK handler: f20003e8 [#1] PREEMPT SMP > > > [ 0.000000] Modules linked in: > > > [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted > > > 5.18.0-rc6-next-20220513 #1 > > > [ 0.000000] Hardware name: ARM Juno development board (r2) (DT) > > > [ 0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) > > > [ 0.000000] pc : gic_dist_config+0x4c/0x68 > > > [ 0.000000] lr : gic_init_bases+0xd4/0x248 > > > > Please provide a disassembly of this function. > > objdump snipper is here. > http://ix.io/3XUW Wrong function (I wasn't clear I wanted the breaking function, not the caller). > The vmlinux file is located in this url > Please make use of it. > http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/juno/lkft/linux-next/1226/ ffff8000087f9908 : ffff8000087f9908: a9bd7bfd stp x29, x30, [sp, #-48]! ffff8000087f990c: 910003fd mov x29, sp ffff8000087f9910: a90153f3 stp x19, x20, [sp, #16] ffff8000087f9914: f90013f5 str x21, [sp, #32] ffff8000087f9918: 2a0103f3 mov w19, w1 ffff8000087f991c: aa0003f4 mov x20, x0 ffff8000087f9920: aa0203f5 mov x21, x2 ffff8000087f9924: aa1e03e0 mov x0, x30 ffff8000087f9928: 97e0de72 bl ffff8000080312f0 <_mcount> ffff8000087f992c: 7100827f cmp w19, #0x20 ffff8000087f9930: 54000149 b.ls ffff8000087f9958 // b.plast ffff8000087f9934: 52800402 mov w2, #0x20 // #32 ffff8000087f9938: 53027c40 lsr w0, w2, #2 ffff8000087f993c: 91300000 add x0, x0, #0xc00 ffff8000087f9940: 8b000280 add x0, x20, x0 ffff8000087f9944: b900001f str wzr, [x0] ffff8000087f9948: 11004042 add w2, w2, #0x10 ffff8000087f994c: 6b02027f cmp w19, w2 ffff8000087f9950: 54ffff48 b.hi ffff8000087f9938 // b.pmore ffff8000087f9954: d4207d00 brk #0x3e8 What the hell is this??? This function has no WARN_ON, no BUG_ON, the allowed values for the immediate are: #define KPROBES_BRK_IMM 0x004 #define UPROBES_BRK_IMM 0x005 #define KPROBES_BRK_SS_IMM 0x006 #define FAULT_BRK_IMM 0x100 #define KGDB_DYN_DBG_BRK_IMM 0x400 #define KGDB_COMPILED_DBG_BRK_IMM 0x401 #define BUG_BRK_IMM 0x800 #define KASAN_BRK_IMM 0x900 #define KASAN_BRK_MASK 0x0ff and 0x3e8 isn't one of them. This seems like a GCC 'division by zero' hack, but there are no divisions by zero here. Your kernel is also full of the stuff. What sort of odd options do you have? I can't help but notice that you have the Rust stuff in your tree. Can you please start by disabling this, just in case there is an interaction with your toolchain? Thanks, M. -- Without deviation from the norm, progress is not possible.