Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp854719pxk; Thu, 17 Sep 2020 19:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI/YUSZT9Uz85TT7GBpvu6+/D5jxKcVIoj3i/5eMneuQOiAL1pgcIZmVTxv86k/sI50m5P X-Received: by 2002:a17:906:178d:: with SMTP id t13mr34890359eje.410.1600395089528; Thu, 17 Sep 2020 19:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600395089; cv=none; d=google.com; s=arc-20160816; b=JbAJoQHhSxVIQyxDUeYXmdpa4mx4ZRzr9kRVYGNQfR157cZa+anaVPy7Y4qWwU+4u1 xwTtCrLEh6xSAgd5f1nOXWmOStQi0bSDryvfXDh8OLMz1jx8awX1T8bM3KkBpxzMVYVh UyECldkRFAcnkQRkP7gpuHqhNZaVngxZTCAunC5ejTFVOf+MPMS5HZbdyCLgygjPlSIA TDsnShBSOJTGMgMtEodP0CkppehDz6w40Y9sbS2y+lEBbRmhIpdLQiVrFlgmcbEnXdlt 3mBGoRXTnymzlNdaOJcNmNjYJXEOyRD/3bp4kR8uvjuiNSb7BGSSNQ8j3FlP1gvFiKAz gUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aSAmiemmag1WrzY048ovPfHMRo+OkowUr9cd6DGQMgk=; b=RFMw9F7MAB5FOgO7UjZA+qlfvuo+IAeEjEEk68VoQ5Q73uhCxNKJ0VLrJun4uZSK7M 0q/iK8Cz0skPVhngsrBn9T/r4Dtd9v+0Gz+WxxqpIOpYwWm+v5/IsZYu8oSR2XkWy5y+ 9knAPIs2e7UEZHOmKA0SQwW4BZVcrvqL2gKiXDDn7Whkx8Pj7F4CRJ2Gx7Wf8zBwUHL2 eRE4CzMafYYTbI8qzMZL0fyRFOlzkc2bnMuidZ6x8TpPnyM2YW+Lr409SHPwRf8VAzRM VtZkAbzmQtAxXGMIcVwEokEORQExUrzP/OCRPPKLDXUWcn0r8UNz3e+P8XbUQWcq+MZW m1aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wT9TdVtj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si1108275edp.136.2020.09.17.19.11.06; Thu, 17 Sep 2020 19:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wT9TdVtj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726912AbgIRCHH (ORCPT + 99 others); Thu, 17 Sep 2020 22:07:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727080AbgIRCGm (ORCPT ); Thu, 17 Sep 2020 22:06:42 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7F3323888; Fri, 18 Sep 2020 02:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394801; bh=Yrp0izKS9oOY/IRZAj6y24s8B44W/wunpiMFYqCWDHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wT9TdVtjzzkIGiIvsbc2Cyij4kRTP85MiJf0gue2hz63nrQAEyqvKYVmvqFklpnJI rNrKGm2hDrzhIpOp0UvZdvkOwBqSkRIC64q4L+lGeMesjvZUaJQYxRby3UGEuBacm6 +tgzqclpulzUR1fQYlvw2yKyE9vH1ncvLAM7wbpY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicholas Piggin , Michael Ellerman , Christophe Leroy , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 270/330] powerpc/traps: Make unrecoverable NMIs die instead of panic Date: Thu, 17 Sep 2020 22:00:10 -0400 Message-Id: <20200918020110.2063155-270-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Piggin [ Upstream commit 265d6e588d87194c2fe2d6c240247f0264e0c19b ] System Reset and Machine Check interrupts that are not recoverable due to being nested or interrupting when RI=0 currently panic. This is not necessary, and can often just kill the current context and recover. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20200508043408.886394-16-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/traps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 014ff0701f245..9432fc6af28a5 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -510,11 +510,11 @@ out: #ifdef CONFIG_PPC_BOOK3S_64 BUG_ON(get_paca()->in_nmi == 0); if (get_paca()->in_nmi > 1) - nmi_panic(regs, "Unrecoverable nested System Reset"); + die("Unrecoverable nested System Reset", regs, SIGABRT); #endif /* Must die if the interrupt is not recoverable */ if (!(regs->msr & MSR_RI)) - nmi_panic(regs, "Unrecoverable System Reset"); + die("Unrecoverable System Reset", regs, SIGABRT); if (saved_hsrrs) { mtspr(SPRN_HSRR0, hsrr0); @@ -858,7 +858,7 @@ void machine_check_exception(struct pt_regs *regs) /* Must die if the interrupt is not recoverable */ if (!(regs->msr & MSR_RI)) - nmi_panic(regs, "Unrecoverable Machine check"); + die("Unrecoverable Machine check", regs, SIGBUS); return; -- 2.25.1