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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C34F4C433B4 for ; Wed, 21 Apr 2021 15:50:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 402B16144A for ; Wed, 21 Apr 2021 15:50:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 402B16144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:Cc:To: From:Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HHnL7Gza3eAkWeWy2HJWurhx8IPik3HN1kmsoSea0CU=; b=L+AdXSIJDMLlw8gpteEvp1/F+ PgBoquoDd1bq/p2JYiyFxsBZiFm/58AP/00n6tMu/ncXTqRLYstCK4K6nP1uEBF91szqxMaBmK8uK H49pbwOrzq86iQgjZztrYOMx4i0UZP1J2Vr7WfGCj+o10X2n8VT9jtN8fIV6+ilC/gW8sW3tY01rK QFMHwPslfyUiRNiD3WKW2WoL4k5ZqSIKlM/1MpYefteblg+xl0wfXNvj9whreFpfns5nfWlcMAAR/ 1Et4WQjmDt2wZe7ozWmaEwa3B++yrwyaY4iAtsB2XoLniTFh1G+ILaoChxk9obmrfc7mLi+vz2/Sy uNdBBRSNg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZF6G-00EhsV-RW; Wed, 21 Apr 2021 15:49:13 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZF6E-00EhsK-0T for linux-arm-kernel@desiato.infradead.org; Wed, 21 Apr 2021 15:49:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/6dFXTg1/6Ub7j3fofdJMV7IaHKaWu57axVddaUa8w4=; b=m/ZUOX1nvl9hYNJvxNP5NI65bz GOg4GlF+lh2aWOWTPIUlxhvW0ue1glmIx4N6AuAzsq1PvUvU10NI4NiAfY2F3XEHldi4IaStzziXx Mfhd27KuDyG8gXsOCssgy5ES0+vnWcP+ChZ/KMOyFpSyoNH93X1mGtuK+ovScnafYJwsDiozRhswD nQVwAGhxzpJcNOCIDkqoZxg5qMCufEjeADHl9IuPOS06k0VOTaJw1mwsIPFN/qbsWfT1NHNHrh1uJ qw9u0/0JKOGv+vnc5wMZOJhtS15uicv7g1M7yMDhIfV2zMBnHvxge0kQ73s8wqSp/GCcY0OKwKDe5 +jMoMUyg==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZF6B-00D0cD-9I for linux-arm-kernel@lists.infradead.org; Wed, 21 Apr 2021 15:49:08 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E64D86144A; Wed, 21 Apr 2021 15:49:06 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] 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) (envelope-from ) id 1lZF68-008irZ-K6; Wed, 21 Apr 2021 16:49:04 +0100 Date: Wed, 21 Apr 2021 16:49:03 +0100 Message-ID: <87wnsvprio.wl-maz@kernel.org> From: Marc Zyngier To: dann frazier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sumit Garg , kernel-team@android.com, Russell King , Catalin Marinas , Thomas Gleixner , Will Deacon , Fu Wei Subject: Re: [PATCH 08/11] irqchip/gic: Configure SGIs as standard interrupts In-Reply-To: References: <20200519161755.209565-1-maz@kernel.org> <20200519161755.209565-9-maz@kernel.org> <8735vjrjj3.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") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: dann.frazier@canonical.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sumit.garg@linaro.org, kernel-team@android.com, linux@arm.linux.org.uk, catalin.marinas@arm.com, tglx@linutronix.de, will@kernel.org, fu.wei@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210421_084907_394621_C74F5CCA X-CRM114-Status: GOOD ( 31.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 21 Apr 2021 15:52:52 +0100, dann frazier wrote: > > [ + Fu Wei ] [...] > > > > Please feed this stacktrace to scripts/decode_stacktrace.sh so that I > > can get an idea about what is going wrong. I bet something is playing > > ungodly games with the one of the IPIs, and things go horribly wrong. > > hey Marc, > Sure: > > [ 7.927289] Unable to handle kernel read from unreadable memory at virtual address 0000000000000028 > [ 7.936326] Mem abort info: > [ 7.939108] ESR = 0x96000004 > [ 7.942151] EC = 0x25: DABT (current EL), IL = 32 bits > [ 7.947451] SET = 0, FnV = 0 > [ 7.950494] EA = 0, S1PTW = 0 > [ 7.953624] Data abort info: > [ 7.956492] ISV = 0, ISS = 0x00000004 > [ 7.960316] CM = 0, WnR = 0 > [ 7.963273] [0000000000000028] user address but active_mm is swapper > [ 7.969616] Internal error: Oops: 96000004 [#1] SMP > [ 7.974483] Modules linked in: > [ 7.977531] CPU: 9 PID: 1 Comm: swapper/0 Not tainted 5.12.0-rc8 #19 > [ 7.983874] Hardware name: GIGABYTE R120-T33/MT30-GS1, BIOS F02 08/06/2019 > [ 7.990737] pstate: 40400085 (nZcv daIf +PAN -UAO -TCO BTYPE=--) > [ 7.996732] pc : __ipi_send_mask (/home/ubuntu/linux/./include/linux/irqdomain.h:537 /home/ubuntu/linux/kernel/irq/ipi.c:283) > [ 8.000910] lr : smp_cross_call (/home/ubuntu/linux/arch/arm64/kernel/smp.c:958) > [ 8.004913] sp : ffff800012753c10 > [ 8.008216] x29: ffff800012753c10 x28: ffff000100de5d00 > [ 8.013521] x27: 000000000000000a x26: ffff80001225da20 > [ 8.018825] x25: 0000000000000000 x24: ffff000ff62719b0 > [ 8.024129] x23: ffff80001225d000 x22: ffff800012368108 > [ 8.029433] x21: ffff800010f69a20 x20: 0000000000000000 > [ 8.034737] x19: ffff000100143c60 x18: 0000000000000020 > [ 8.040041] x17: 000000008e74252f x16: 00000000bf0ab2ad > [ 8.045345] x15: ffffffffffffffff x14: 0000000000000000 > [ 8.050649] x13: 003d090000000000 x12: 00003d0900000000 > [ 8.055953] x11: 0000000000000000 x10: 00003d0900000000 > [ 8.061257] x9 : ffff800010027f14 x8 : 0000000000000000 > [ 8.066561] x7 : 00000000ffffffff x6 : ffff000ff6148698 > [ 8.071865] x5 : ffff80001159d040 x4 : ffff80001159d110 > [ 8.077169] x3 : ffff800010f69a00 x2 : 0000000000000000 > [ 8.082473] x1 : ffff800010f69a20 x0 : 0000000000000000 > [ 8.087777] Call trace: > [ 8.090213] __ipi_send_mask (/home/ubuntu/linux/./include/linux/irqdomain.h:537 /home/ubuntu/linux/kernel/irq/ipi.c:283) Thanks for that. This resolves to: if (irq_domain_is_ipi_per_cpu(data->domain)) { data->domain is NULL, and we probably are using freed memory... > > Now, here's a hunch: in the fine TX1 tradition, the firmware is broken > > and the GTDT table looks unusable. Amusingly, the crash happens right > > after the SBSA watchdog fails to probe. > > Yeah, I noticed that, but didn't highlight it as I didn't see it in > the backtrace... > > > And looking at the code that implements that driver, it looks dodgy as > > hell, as it unmaps an interrupt it doesn't even know is valid. And it > > does that right when the driver fails the way you experienced it. If, > > by any chance, the interrupt field is 0 in the firmware table, this > > results in SGI0 being unmapped. Given that this is the rescheduling > > interrupt, fireworks happen. > > ... and that explains why. I wouldn't have gotten there, but wish I'd > thought to test w/ the watchdog compiled out :( No worries. This IRQ series has uncovered a number of terrible driver behaviours since I merged it, and these bugs are worth every penny. > > Can you have a go with the patchlet below, and let me know if that > > helps? > > It does! Awesome. I'll Cc you on the actual patch, feel free to respond with a Tested-by: if you want. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel