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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 698F1C433ED for ; Wed, 28 Apr 2021 21:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C59E6144B for ; Wed, 28 Apr 2021 21:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbhD1VbX (ORCPT ); Wed, 28 Apr 2021 17:31:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:37250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbhD1VbV (ORCPT ); Wed, 28 Apr 2021 17:31:21 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9E7C61441; Wed, 28 Apr 2021 21:30:33 +0000 (UTC) Date: Wed, 28 Apr 2021 17:30:32 -0400 From: Steven Rostedt To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Lai Jiangshan , Thomas Gleixner , Paolo Bonzini , Sean Christopherson , Andi Kleen , Andy Lutomirski , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Uros Bizjak , Maxim Levitsky , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Alexandre Chartre , Juergen Gross , Joerg Roedel , Jian Cai Subject: Re: [PATCH 2/4] x86/entry: Use asm_noist_exc_nmi() for NMI in early booting stage Message-ID: <20210428173032.10a5e959@gandalf.local.home> In-Reply-To: <20210426230949.3561-3-jiangshanlai@gmail.com> References: <20210426230949.3561-1-jiangshanlai@gmail.com> <20210426230949.3561-3-jiangshanlai@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Apr 2021 07:09:47 +0800 Lai Jiangshan wrote: > While the other entries for the exceptions which use Interrupt stacks can > be also used on the kernel stack, asm_exc_nmi() can not be used on the > kernel stack for it relies on the RSP-located "NMI executing" variable > which expects to on a fixed location in the NMI IST stack. When it is > unexpectedly called from the kernel stack, the RSP-located "NMI executing" > variable is also on the kernel stack and is "uninitialized" and can cause > the NMI entry to run in the wrong way. Acked-by: Steven Rostedt (VMware) -- Steve