Received: by 10.192.165.156 with SMTP id m28csp859028imm; Thu, 19 Apr 2018 08:42:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49B92Ww16a9WxWmfPLQB0C1eSytYJd0RyGFzFjRK7uXDrLCMDN3eLm4q94tGBTAqC1N+cZA X-Received: by 10.98.67.141 with SMTP id l13mr6252578pfi.166.1524152521999; Thu, 19 Apr 2018 08:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524152521; cv=none; d=google.com; s=arc-20160816; b=l7IJgvEKJmorS1S6P/u4dV7o22BfDZk0bGeyRLMtsfFGzihSONOtDTkJDv+/4vLSba cQLVSY6wdREysVLyXZ6qxCszDQBNk2EXCn8yimdSojU9g8VX1ENqbxDZWsU2SDrH3++t Cd9hnBh+MwkrGX8ZoX/86Vtf6NcHv0K3XKGEIsC046CGAx+JHytu8BE1cAcOySEc6iWr l1Uyj9guHXHCA10KIvrROthMbC5xxbS6MPUbw51BXD8qIZoHpcaxCVHSHQU4oJ7FM0H3 vgJ5RWzhLO/vuDe/+7f1imR3nmwsd/wYhocjtWeHcBFWvEs4CWwF881PirEV9zXrp8dW oHGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=4z4434ZhyRF6YG4flihkBOY/8agVK4UrN/nP6LY+2c8=; b=QjrzPkkJ065JZT9xZwseKlTDjfNhUC9zKiUBOHn6flygSdROXqboFc1WnjqtbClYcj EKChEGCJrX2NhrGJ42mIZ+lXu5FYu0hEIcgN/Y28q5wSzulBYSKgl8IGE3meS7SlDve3 q6kp1AK2+YKzsJIWdfPEfwlTe85fdtgBgnyq5ligbcbUcVZcIGL7H+dpJB34LA5Z33d1 9E2IRrhu11jQ/oxBiL+vR1blkW7TsHA22ZNWmgAsGFV1M4j4rWrziSVRSppn+GRMWpnj dznbU1hsSWHyYmYhOWgqFEAhWd6UJwPWKnqwcrlrZSKfSUaaM1B4MVb10MHXFDKD6NFE lEoQ== 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 c23-v6si3484899plo.80.2018.04.19.08.41.46; Thu, 19 Apr 2018 08:42: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; 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 S1753186AbeDSPk3 (ORCPT + 99 others); Thu, 19 Apr 2018 11:40:29 -0400 Received: from mail.skyhub.de ([5.9.137.197]:36498 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbeDSPk0 (ORCPT ); Thu, 19 Apr 2018 11:40:26 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Lmth3TcetZpR; Thu, 19 Apr 2018 17:40:09 +0200 (CEST) Received: from pd.tnic (p200300EC2BCA860048F6EE183CD5DF96.dip0.t-ipconnect.de [IPv6:2003:ec:2bca:8600:48f6:ee18:3cd5:df96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 837271EC02CF; Thu, 19 Apr 2018 17:40:09 +0200 (CEST) Date: Thu, 19 Apr 2018 17:40:06 +0200 From: Borislav Petkov To: "Alex G." Cc: linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, 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 Subject: Re: [RFC PATCH v2 3/4] acpi: apei: Do not panic() when correctable errors are marked as fatal. Message-ID: <20180419154006.GE3600@pd.tnic> References: <20180416215903.7318-1-mr.nuke.me@gmail.com> <20180416215903.7318-4-mr.nuke.me@gmail.com> <20180418175415.GJ4795@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 19, 2018 at 09:57:07AM -0500, Alex G. wrote: > ghes_severity() is a one-to-one mapping from a set of unsorted > severities to monotonically increasing numbers. The "one-to-one" mapping > part of the sentence is obvious from the function name. To change it to > parse the entire GHES would completely destroy this, and I think it > would apply policy in the wrong place. So do a wrapper or whatever. Do a ghes_compute_severity() or however you would wanna call it and do the iteration there. > Should I do that, I might have to call it something like > ghes_parse_and_apply_policy_to_severity(). But that misses the whole > point if these changes. What policy? You simply compute the severity like we do in the mce code. > I would like to get to the handlers first, and then decide if things are > okay or not, Why? Give me an example why you'd handle an error first and then decide whether we're ok or not? Usually, the error handler decides that in one place. So what exactly are you trying to do differently that doesn't fit that flow? > I don't want to leave people scratching their heads, but I also don't > want to make AER a special case without having a generic way to handle > these cases. People are just as susceptible to scratch their heads > wondering why AER is a special case and everything else crashes. Not if it is properly done *and* documented why we applying the respective policy for the error type. > Maybe it's better move the AER handling to NMI/IRQ context, since > ghes_handle_aer() is only scheduling the real AER andler, and is irq > safe. I'm scratching my head about why we're messing with IRQ work from > NMI context, instead of just scheduling a regular handler to take care > of things. No, first pls explain what exactly you're trying to do and then we can talk about how to do it. Btw, a real-life example to accompany that intention goes a long way. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.