From patchwork Wed Apr 25 20:39:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alex G." X-Patchwork-Id: 10364251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3194F6038F for ; Wed, 25 Apr 2018 20:40:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23D0528FCB for ; Wed, 25 Apr 2018 20:40:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13EAF28FCA; Wed, 25 Apr 2018 20:40:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 891FA28FCA for ; Wed, 25 Apr 2018 20:40:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751544AbeDYUkd (ORCPT ); Wed, 25 Apr 2018 16:40:33 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:37273 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751022AbeDYUka (ORCPT ); Wed, 25 Apr 2018 16:40:30 -0400 Received: by mail-ot0-f195.google.com with SMTP id 77-v6so20774983otd.4; Wed, 25 Apr 2018 13:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9K0MVqB99bTtNuDoN7tXdHes/412/42zKxNaMm5+sGI=; b=WbCLnp+ndHHTCP2ZOvN1crJ34nWxQ2nDcC0pFi5R1h2dHPUxTZErhTMl8/Men/OiJ5 bUjiYsfV6oA4T8KLvhVEnu+b3onwMbZ2yI5rXkgSbvPARkQHaFqZ8aoFIxQPPGwcMYba omFp3JhVP2HwAmoX7TDvfxvOAjApXBnJ+D+PMRaGDURDptqTZxQjI2IUy+ZOs5iEAqM8 HdOTWNW9CRhGj8T54bDOOZ2UH2zPxyAVIfxwL+M+k/o8/X1SBClzD9ji5qrlXmZiTha1 aHFZn5fhO8czjhxRaPC8g2OxKatxX9e5anhPbJIn0DPRrppHTod7lYc50XTqtNAvtAch 6bnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9K0MVqB99bTtNuDoN7tXdHes/412/42zKxNaMm5+sGI=; b=LhH/47KOvqHzXa+qRQ5Td3+h8us79qwd4yVV383e9w4yvgH8Phbb7rU/QxwMudhh9U 3PQuC3cK1RJT5ar4BLPiKoyuiZZu1pgti7eigGYrkbbAaYyh3xYBScGbK0+bzNIoT/Pa Z0NAUUaJpQIgNDF7+cD9yLwTJSAaiGc856kWFZzaLilNK3IZ6xKtDH06RQug1qOfuvZE A1dRud94k7ZzewSHLMJIhdsJv8RlycMq1ikdewx4D72sxfclu6JpMwgV5uwuP8kMxVQ5 gybvqbvnhyUCEPa6Sb9d2nSi9BKgHG2RyCGmWjFkq9nwnq8ZXohjEXIrsI0OdiRUDOKz OAkQ== X-Gm-Message-State: ALQs6tAW9X1lh+IMmWMUSc3Id8N9y7A3CDiHJldLccEDTgegbij4CAs9 Q6Mzqex8BX2mX02t4ukf1e+bJJHj X-Google-Smtp-Source: AIpwx4/C6W2BlK2ApE7xWm/sPuwmE6bA5UXJvjbRp4bub+eU08r5LLlmsOtSE2fTMMZxqrOrju9qdQ== X-Received: by 2002:a9d:53cd:: with SMTP id i13-v6mr13325784oth.181.1524688829153; Wed, 25 Apr 2018 13:40:29 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-197-2-30.hsd1.tx.comcast.net. [98.197.2.30]) by smtp.gmail.com with ESMTPSA id o189-v6sm9729908oia.19.2018.04.25.13.40.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Apr 2018 13:40:28 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org Cc: Alexandru Gagniuc , "Rafael J. Wysocki" , Len Brown , Tony Luck , Borislav Petkov , Mauro Carvalho Chehab , Robert Moore , Erik Schmauss , Tyler Baicar , Will Deacon , James Morse , Shiju Jose , "Jonathan (Zhixiong) Zhang" , Dongjiu Geng , linux-kernel@vger.kernel.org, devel@acpica.org Subject: [RFC PATCH v3 3/3] acpi: apei: Warn when GHES marks correctable errors as "fatal" Date: Wed, 25 Apr 2018 15:39:51 -0500 Message-Id: <20180425203957.18224-4-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180425203957.18224-1-mr.nuke.me@gmail.com> References: <20180416215903.7318-1-mr.nuke.me@gmail.com> <20180425203957.18224-1-mr.nuke.me@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There seems to be a culture amongst BIOS teams to want to crash the OS when an error can't be handled in firmware. Marking GHES errors as "fatal" is a very common way to do this. However, a number of errors reported by GHES may be fatal in the sense a device or link is lost, but are not fatal to the system. When there is a disagreement with firmware about the handleability of an error, print a warning message. Signed-off-by: Alexandru Gagniuc --- drivers/acpi/apei/ghes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 8ccb9cc10fc8..34d0da692dd0 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -539,6 +539,12 @@ static void ghes_do_proc(struct ghes *ghes, sec_sev, err, gdata->error_data_length); } + + } + + if ((sev >= GHES_SEV_PANIC) && (ghes_actual_severity(ghes) < sev)) { + pr_warn("FIRMWARE BUG: Firmware sent fatal error that we were able to correct"); + pr_warn("BROKEN FIRMWARE: Complain to your hardware vendor"); } }