From patchwork Tue Sep 29 11:00:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 262994 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=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 23065C4727F for ; Tue, 29 Sep 2020 12:25:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6A5C20848 for ; Tue, 29 Sep 2020 12:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601382347; bh=FYsT9KfWnWhlZjA8kDJ4p//bZ/GFoFMExTtd/EDIMBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dnNvS2wzS2195lJ2Jyn5QPC4QQuOrUMgxuixqoFw2buxkb9DIGl4vgaaZcruJ2uE5 e6IdCu//ClQ0u2iWO/kB3ntdDBLeB0d5nU7oMPgeLNQsu2eorh2dJGrKSeIMDvjaLt Gy/mmidKVgcW3nWD7O/BjGWpMJWxv4UTZLfxUjBo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732306AbgI2MZS (ORCPT ); Tue, 29 Sep 2020 08:25:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:50310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729676AbgI2Ldc (ORCPT ); Tue, 29 Sep 2020 07:33:32 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 0D20D23BDD; Tue, 29 Sep 2020 11:27:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378860; bh=FYsT9KfWnWhlZjA8kDJ4p//bZ/GFoFMExTtd/EDIMBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2YOG11yC5o0E/giYVenbG6+l42whGkSESXLlQIWYySVO/XMyCIyt1TBX4MUSu8Y3V nC9KmDd+Gky3zxKhGxYCyD3e7DP3yc0G0a7wZSzXLkIv9soifMnpYoH7Fea99q9zBL zxahS7WwXq06cc48NY5OvbQRrJydq0UC0GShTcLE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Piggin , Michael Ellerman , Christophe Leroy , Sasha Levin Subject: [PATCH 4.19 165/245] powerpc/traps: Make unrecoverable NMIs die instead of panic Date: Tue, 29 Sep 2020 13:00:16 +0200 Message-Id: <20200929105955.007781528@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105946.978650816@linuxfoundation.org> References: <20200929105946.978650816@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 d5f351f02c153..7781f0168ce8c 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -430,11 +430,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 (!nested) nmi_exit(); @@ -775,7 +775,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;