From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 DC0B4C433EF for ; Wed, 8 Sep 2021 13:30:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C69B16120E for ; Wed, 8 Sep 2021 13:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351735AbhIHNbO (ORCPT ); Wed, 8 Sep 2021 09:31:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51108 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351432AbhIHNad (ORCPT ); Wed, 8 Sep 2021 09:30:33 -0400 Message-ID: <20210908132525.445255957@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631107765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=U5xM49pdLb5dSGIBKozT2XtRlv1dw1hHJxy+JQJj3ek=; b=4rnjx2AETuzm9KWxuP9ioQpX7gYlczGVQ9C8YNC1z1linRjkrADimzYnjihSFRNjqQY1LG uAeuu25CFzRzSLgQkEn226a4TceLcsGMMhLuiB5FDVxEWUfdZPq0abxntaaw6odyFn9FN9 F2U96SGnJ1hVHU6221Ic6HglfxQFXe6douzgadJ6Y5YTsvnGPhC2Dn7nWA2r/Zb/bMpJNB 1w2ISL/x17yIaQurbr7Y8T0wztTM6hPFZWTsxgNNbmvvQUVt5DuBsEgS9QxFdU3xWnIsOQ Ek6UfZuIX6qandaZbNPDo87xzPACOQAAkZcIFeuWz+xrHnzrn8Gkp4pFJQe0nw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631107765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=U5xM49pdLb5dSGIBKozT2XtRlv1dw1hHJxy+JQJj3ek=; b=lDTRldDbiKB4VzlA6MMkpnJ8mPKnyYhWjjkVPwBnZVGJE2u0W7ZXBMznUVbajLLm4IBc3o XtmkQUKNdmp1dLAw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Al Viro , Linus Torvalds , Tony Luck , Alexei Starovoitov , Peter Ziljstra , Song Liu , Daniel Borkmann Subject: [patch V3 09/20] x86/extable: Remove EX_TYPE_FAULT from MCE safe fixups References: <20210908130922.118265849@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Wed, 8 Sep 2021 15:29:24 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the MC safe copy and FPU have been converted to use the MCE safe fixup types remove EX_TYPE_FAULT from the list of types which MCE considers to be safe to be recovered in kernel. This removes the SGX exception handling of ENCLS from the #MC safe handling, but according to the SGX wizards the current SGX implementations cannot survive #MC on ENCLS: https://lore.kernel.org/r/YS+upEmTfpZub3s9@google.com The code relies on the trap number being stored if ENCLS raised an exception. That's still working, but it does not longer trick the MCE code to assume that #MC is handled correctly for ENCLS. Signed-off-by: Thomas Gleixner --- V2: New patch --- arch/x86/kernel/cpu/mce/severity.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/x86/kernel/cpu/mce/severity.c +++ b/arch/x86/kernel/cpu/mce/severity.c @@ -277,7 +277,6 @@ static int error_context(struct mce *m, return IN_KERNEL; m->kflags |= MCE_IN_KERNEL_COPYIN; fallthrough; - case EX_TYPE_FAULT: case EX_TYPE_FAULT_MCE_SAFE: case EX_TYPE_DEFAULT_MCE_SAFE: m->kflags |= MCE_IN_KERNEL_RECOV;