Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2334287imu; Sat, 22 Dec 2018 19:28:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN56e3ydnWeqv5PUtZdqwzs8ERE2sTYElhpYLfXRWkP6dib9Zm3lWe2Yx7CDmel1va8xzmhM X-Received: by 2002:a17:902:680f:: with SMTP id h15mr8394119plk.40.1545535739238; Sat, 22 Dec 2018 19:28:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545535739; cv=none; d=google.com; s=arc-20160816; b=h/yrvTQyp37942tV2K3w4Ph/+s7HM2417MHiwwZRY9C2pXaDPtHtGT6dbEyMVSmGNi GQGEo9FInAhXzACCdoq3SK6UiMfcBs1WMUTN5Ncwp+L+zwheszEXtj0ee9rsaRJKr2vA EUmt12yVRyDf6D+hys4JOEKs0t6IGl4m1TGqkWwaYNLdkeRXZwSJ4+qINUu+/D5wYgLE 0hGST3+ME/hqUZxoh99XJk6hbPtafPmlIT78f1PGK9b2VESYq7jLs/yaGltsa46GJK3f L7bijqNA3VcnIcmktykyE9lf39aWLTYY27ZxfSaR9wyxY/7jeGLOveSSFPiZ4VuvJ2zz +i9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PzppjXRiY4roiSY/ITEUo9//Yop7ItU+nC//YhGS4lg=; b=IxvxK/Py3sxXbQ4bvkti8lDXyGJv+wHp14SwHzlhog3KGSNgBOmU3WyM9tIA7WkAWn rQdtDBWOXN1h31YMAS/Dpx+oOgix8POVi0dtDJzmhmHBOC73tRx46W90uJW1iyDiaZiY BJzeP+61kXpz5QRFvKk6zvj3gPDzF7P83D5/gzBFzyKERbatSYudKMyovyX4d4ocy1SO EBxNlH4l2TmtpyS25yiuAl6LGTzcKAwJ87e4E687vMHnDPIp1OXUaV59fqjzqkywRz1E XCPXkzuSDAeddwIC92SHN+COsGvU+TQvoddkdetjsDFGvgfEXOaq+IKuXnEeuHAKJLB2 +4HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d39si21411365pla.278.2018.12.22.19.28.43; Sat, 22 Dec 2018 19:28:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391509AbeLUSwY (ORCPT + 99 others); Fri, 21 Dec 2018 13:52:24 -0500 Received: from foss.arm.com ([217.140.101.70]:56798 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731021AbeLUSwY (ORCPT ); Fri, 21 Dec 2018 13:52:24 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9A1D380D; Fri, 21 Dec 2018 10:52:23 -0800 (PST) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D25A03F575; Fri, 21 Dec 2018 10:52:21 -0800 (PST) Subject: Re: [PATCH] ACPI/APEI: Clear GHES block_status before panic() To: Borislav Petkov , David Arcari Cc: "Rafael J. Wysocki" , Linux ACPI , Lenny Szubowicz , Len Brown , Tony Luck , "Eric W. Biederman" , Alexandru Gagniuc , linux-kernel@vger.kernel.org References: <1545238252-79630-1-git-send-email-darcari@redhat.com> <20181220192447.GG31403@zn.tnic> <1691682.ckC9UJvgEr@aspire.rjw.lan> From: James Morse Message-ID: <0bb80989-4fe5-c320-8ffc-0f39502110c9@arm.com> Date: Fri, 21 Dec 2018 18:52:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <1691682.ckC9UJvgEr@aspire.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/12/2018 11:17, Rafael J. Wysocki wrote: > On Thursday, December 20, 2018 8:24:47 PM CET Borislav Petkov wrote: >> + James. Thanks, >> On Wed, Dec 19, 2018 at 11:50:52AM -0500, David Arcari wrote: >>> From: Lenny Szubowicz >>> >>> In __ghes_panic() clear the block status in the APEI generic >>> error status block for that generic hardware error source before >>> calling panic() to prevent a second panic() in the crash kernel >>> for exactly the same fatal error. >>> >>> Otherwise ghes_probe(), running in the crash kernel, would see >>> an unhandled error in the APEI generic error status block and >>> panic again, thereby precluding any crash dump. I bet that was fun to watch! >>> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c >>> index 02c6fd9..f008ba7 100644 >>> --- a/drivers/acpi/apei/ghes.c >>> +++ b/drivers/acpi/apei/ghes.c >>> @@ -691,6 +691,8 @@ static void __ghes_panic(struct ghes *ghes) >>> { >>> __ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus); >>> >>> + ghes_clear_estatus(ghes); >>> + >>> /* reboot to log the error! */ >>> if (!panic_timeout) >>> panic_timeout = ghes_panic_timeout; >> >> Acked-by: Borislav Petkov > > Patch applied, thanks! Great! Do we need to ghes_ack_error() too? With the location cleared the new kernel will never find the records, and firmware can never re-use that location because it wasn't ack'd. The upshot is RAS records can't be generated for the kdump kernel. The acpi spec talks about use of the memory, so I don't think its fair for it to use this to disarm a watchdog. I think we can live with this as the kdump kernel isn't going to handle RAS errors for the bulk of memory anyway. Thanks, James