Received: by 10.192.165.156 with SMTP id m28csp1141635imm; Mon, 16 Apr 2018 15:01:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/FOk81UJvXBzKjDzZRM6gmlrQVbLxoLYOPcc//S2ihq78R8JRw3VFW6S68XDyBAEJQ91mO X-Received: by 10.101.86.139 with SMTP id v11mr14187786pgs.420.1523916061168; Mon, 16 Apr 2018 15:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523916061; cv=none; d=google.com; s=arc-20160816; b=uyeBjrrPpqOZ/7F0PC9HbTXOoEBjqGhU/z7emph3GOb4Zw06Ymbfm2QSdUl04Zx2qX Twf9l74oXP+5egOokyWzyE8FaLGJ38PVHm/Tt9bXv+hbWVg9E4AORTWMxsrgXL4tnE4D FIVUzIfrbnLB+sP4oTNeWJGEUG6a6o9z7qFBf9AIvrGmEK11ZHK0UsSrYQ9dvKhsqs9o BIQGbU9+/i2hPvFgvOTZiCqF2rRlX7WYdEyhFWdNdKgz71DEaPn6D7TVBgHHgaWGMOtD AXSECdYKXbJ+F3LBvhS0yg2gfpVmXWVVgN5NbmO3zoVq9zuY88sPOMXc0mzi992WaE69 1ToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+RJzjxSxWkY0karShsFmQqvdvSNUVTEQ+pu1FZPA16I=; b=I5a6HZl7oSji64USP8az3sAgIPmh/ZKR3x4z9gT90UcF6WPueNA/xgNkvi9acQrGGY AxnkIq7gWNLxXIhD9HoF8QrHcjuc4nLheTU//KvQ5/lVnKdR9ayT7PoUC3UVOOsmZUh3 sV7xveZ3LYbMOhUhe2r9Wf7p5MSJwqidFo1ZGAbEDZG+UaLG0/nVDmSsRgDnmk4Ws39y WZnh6tQxqEb31hzvKJgC8L8W/bAyR/soULSydbQqQ0hOBSoePh1oNVJJVVD6AyBpS2zR pADVU1MvG/LmNIjUW/3Uqg8cIqzKO81RYYdViUz9Qh+T6VaeerEd6bJBTMNaX7AX6scz BP6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KKPMtTdS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si2136189pgc.366.2018.04.16.15.00.46; Mon, 16 Apr 2018 15:01:01 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KKPMtTdS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbeDPV7g (ORCPT + 99 others); Mon, 16 Apr 2018 17:59:36 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:41256 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752848AbeDPV7V (ORCPT ); Mon, 16 Apr 2018 17:59:21 -0400 Received: by mail-ot0-f196.google.com with SMTP id m22-v6so19175456otf.8; Mon, 16 Apr 2018 14:59:20 -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=+RJzjxSxWkY0karShsFmQqvdvSNUVTEQ+pu1FZPA16I=; b=KKPMtTdS+PW5ymQbaOqEDCtUc0yotqKu6gbx6FEh8iukCmsBd+aaVuppOOT46izu/E wAMMRy/nt4q8EPBc+UMst8ZVnVQBTebMkM4ukbr6u23x8o6laD/MCHNONIDn1lqd5I0F hyolxtONL6jiUFq9zM7TmDnc8Lv12Z90AX+SYdWP1AsH85DfuVXAR2BZDYLknsLMZU7h 3pO3xJ0Iou3WCLcSrL+yyCrNUgesRii+SY7R4yIy//EreV6XiRaiieHu9YSNJLTC0Aq1 vEBq2FEl2q/MPBkwy4rbTQ8DaYi+A2htuvJX8KOYRlVUxZGs47cw+0y7byTCwcdzYVTS ACYw== 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=+RJzjxSxWkY0karShsFmQqvdvSNUVTEQ+pu1FZPA16I=; b=UQM62ihelyt1Zwb3GCylD7vsU9ruzf5BTeqSfKNuUO7wyZwJpGRcBqNRd9SM0YrH0X eVWq+ietK0etjngC/XKJLbUV3P3pcx1PbLoJ7QqaEX2qYR+xT6FdxaRvMeukchtOZuH2 HNskhky3T9VaZP2bt1rW9I7aSRI58skXI9AY1Z3Z0Av30nJTVWDp0vvA7lIFyJAD+fFH LSoDn2EzJLoisRiMS3tJ6QvFRE5P/FPNlHz2C3jNYP93FXY/5XTDlaPunt2bp+lLm4UV 4KA7y4HxrGCfXFN9TpVBz6TrjXff5tOCC8G7DQ8UOHHwFe6+YD8374epb+GxzazgW49W 5BDw== X-Gm-Message-State: ALQs6tBLYi5ReogzCC+lrD4jov+jyweImMNyjFYzN3qnKJ2l6o83eO+e /+KtJwPRCnG96p2gznEal4bO9ppA X-Received: by 2002:a9d:4312:: with SMTP id s18-v6mr12029638ote.187.1523915960137; Mon, 16 Apr 2018 14:59:20 -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 j23-v6sm8219960oiy.22.2018.04.16.14.59.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 14:59:19 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, bp@alien8.de, tbaicar@codeaurora.org, will.deacon@arm.com, james.morse@arm.com, shiju.jose@huawei.com, zjzhang@codeaurora.org, gengdongjiu@huawei.com, linux-kernel@vger.kernel.org, alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, devel@acpica.org, mchehab@kernel.org, robert.moore@intel.com, erik.schmauss@intel.com, Alexandru Gagniuc Subject: [RFC PATCH v2 4/4] acpi: apei: Warn when GHES marks correctable errors as "fatal" Date: Mon, 16 Apr 2018 16:59:03 -0500 Message-Id: <20180416215903.7318-5-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180416215903.7318-1-mr.nuke.me@gmail.com> References: <20180416215903.7318-1-mr.nuke.me@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index e0528da4e8f8..6a117825611d 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -535,13 +535,14 @@ static const struct ghes_handler *get_handler(const guid_t *type) static void ghes_do_proc(struct ghes *ghes, const struct acpi_hest_generic_status *estatus) { - int sev, sec_sev; + int sev, sec_sev, corrected_sev; struct acpi_hest_generic_data *gdata; const struct ghes_handler *handler; guid_t *sec_type; guid_t *fru_id = &NULL_UUID_LE; char *fru_text = ""; + corrected_sev = GHES_SEV_NO; sev = ghes_severity(estatus->error_severity); apei_estatus_for_each_section(estatus, gdata) { sec_type = (guid_t *)gdata->section_type; @@ -563,6 +564,13 @@ static void ghes_do_proc(struct ghes *ghes, sec_sev, err, gdata->error_data_length); } + + corrected_sev = max(corrected_sev, sec_sev); + } + + if ((sev >= GHES_SEV_PANIC) && (corrected_sev < sev)) { + pr_warn("FIRMWARE BUG: Firmware sent fatal error that we were able to correct"); + pr_warn("BROKEN FIRMWARE: Complain to your hardware vendor"); } } -- 2.14.3