Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4796884imm; Mon, 18 Jun 2018 23:24:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIZnjr0ZhitLiIWOcsMAOLLi0lZano5LfGWPBhFeKro2bf5oqTXKJyF6ZLEYH9hAamvwNg4 X-Received: by 2002:a17:902:530e:: with SMTP id b14-v6mr17645464pli.316.1529389487156; Mon, 18 Jun 2018 23:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529389487; cv=none; d=google.com; s=arc-20160816; b=Xo+kTK0A4sMjPhyZ6e6hj92DujErFnaTRAB2IUUr3QZobrFfCyqsYzl/djLL7mfBIj elAvbrT4uBKoYL8BAz4PWBLM7tl2698lEpS4+k1n+66uFiFii6tSilGvFUkytCn01qoe GxO2w89OtsjsLhIWNh0vPJc6B4J9POGzfbXFpNm5wEhb3TOr1vkK8pvgcWoRZ/QUAyRw LbrVM8N8A8tWSc5QQJRgGXGm7uJ+eV9/EjN1s8mAbBeHfu+V1HGR03d+H1nPvTL7v887 V94NVlrRBZhAm4spsmkEg3j/eetDRP907tlPRY/jVGvbacb5Hzobg0I5InBgDwlIRQ7I phwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=Bv6xLfG6iUOtkRjWUxfB8FuGdJN3duWhb7Qm7ek+pWU=; b=qV5QgXgyJpyBx+/+v0As8qpYpicAxUKRawrEXgB2fLfH3NkvUowgB9mg6r1VxzzKDC 2eSLYwQXl/y7qVodi3k3gp1ohPm8hkXp2KwvjDRl0nOvCVkERnB3m/T3x9PlmaQDQVZC PnyDXplS/JeucOy4NUnQPyevLkn15hG1uYFWX0glMTXbLjSeQ9OgNjTxFaPPZS61+T+A ENmpD02ukpEOkniUIKT2RSNC3f8PTC6wCW6Ej86TITBWukrD5JsryD9vb2P3IXMeTvQV tJP1pmMdhsZ8e60aD+jBH4QWNHTP+Fm9oxImXS6jnEEhpxKf495YubzedpeiL7cJ4V8Z XdTg== 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 u189-v6si13807197pgd.260.2018.06.18.23.24.33; Mon, 18 Jun 2018 23:24:47 -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 S965409AbeFSGXq (ORCPT + 99 others); Tue, 19 Jun 2018 02:23:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:56326 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965152AbeFSGXp (ORCPT ); Tue, 19 Jun 2018 02:23:45 -0400 Received: from p4fea482e.dip0.t-ipconnect.de ([79.234.72.46] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fVA3L-0000Zv-NE; Tue, 19 Jun 2018 08:23:43 +0200 Date: Tue, 19 Jun 2018 08:23:40 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: Siarhei.Liakh@concurrent-rt.com, LKML , X86 ML , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov Subject: Re: [PATCH] x86: Call fixup_exception() before notify_die() in math_error() In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jun 2018, Andy Lutomirski wrote: > On Thu, Jun 14, 2018 at 10:10 PM Siarhei Liakh > wrote: > > > > fpu__drop() has an explicit fwait which under some conditions can trigger > > a fixable FPU exception while in kernel. Thus, we should attempt to fixup > > the exception first, and only call notify_die() if the fixup failed just > > like in do_general_protection(). The original call sequence incorrectly > > triggers KDB entry on debug kernels under particular FPU-intensive > > workloads. This issue had been privately observed, fixed, and tested > > on 4.9.98, while this patch brings the fix to the upstream. > > Reviewed-by: Andy Lutomirski > > With the caveat that you are perpetuating what is arguably a bug in > some of the other entries: math_error() can now be called with IRQs > off and return with IRQs on. If we actually start asserting good > behavior in the entry code, we'll need to fix this. Confused. math_error() is still invoked with interrupts off. What's different now is that notify_die() is called with interrupts conditionally enabled while upstream it's always called with interrupts disabled. Thanks, tglx