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,URIBL_BLOCKED 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 1F54BC433EF for ; Tue, 7 Sep 2021 20:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0AED96115C for ; Tue, 7 Sep 2021 20:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346650AbhIGU0Y (ORCPT ); Tue, 7 Sep 2021 16:26:24 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:45836 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346598AbhIGU0C (ORCPT ); Tue, 7 Sep 2021 16:26:02 -0400 Message-ID: <20210907200848.757498280@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631046294; 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=vdOb3B94uaQ6D5vdO4GrdIwN0ZNsKolr5RscJSoVIctxBh5ahZ+FSF9I6qCr8LOVc99mfi uJ5YAdG10jrCDYySW/O2X/64YdjlZGYCpSpj8d4mMOuO2NvTnefPjULtWbYBsiTPLMq0BY m44SnSfVzFzU8NsPJAvmUWiDq1n+YQnYkidqU7IALHznIsr+kzwDQxBX7Y+E64NotyX7B2 /pwHWjCUFmgJAysWWIc1hMXEowrGc7xYWLwk/A3azwhEZPu4BVkN09UmyiW8CIjOGjRe7K q1CRbQodh+sLLOsRC7J5M8Pkmfj5wZjDHEljT3o5yw87RKrNNFuuACFmWWIE4Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631046294; 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=6yD10BSvdrg2eIj+CmXhyVQLEbHZLOvpe5csZEI3bOCa2CjviWb0apJWhv0V2+zv8gnpMR fdJjri/UoRtJfJDA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Al Viro , Linus Torvalds , Tony Luck , Song Liu , Alexei Starovoitov , Daniel Borkmann , Peter Ziljstra Subject: [patch V2.1 09/20] x86/extable: Remove EX_TYPE_FAULT from MCE safe fixups References: <20210907200722.067068005@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 7 Sep 2021 22:24:54 +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;