Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F18B5C76195 for ; Mon, 20 Mar 2023 17:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjCTRvd (ORCPT ); Mon, 20 Mar 2023 13:51:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbjCTRvB (ORCPT ); Mon, 20 Mar 2023 13:51:01 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB5E2DE78; Mon, 20 Mar 2023 10:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xHmOUL5c7d7/FrFtZQKw5S5y23ri0niwCk3/YRUyPWQ=; b=bnAymxi8xO8MJaRLCHQLkuVkuX gxqbmObZ4bT0nmB/OiD+fyUXeCa5clslwnlIh/FE6Wjh+02GAkyZ4HEwhliG5nusQCGJsuDSyaQ1q oAnsNwLIB/T82wkRxsGcwJmqJNNLYiUUeKPrzdpdBFpItkCh7I5Klifh2awagmUCkuOeA/6h1Xale 6jm/BEEdQS0fp78/G2pxnz7DxtRkEJWuX/FCBU3KBetGlKfRuQMxzRQFmYNz+Mveyw3v2Rl0NMwBi 83w5xBuh5eKp/yLlqnNnlh5PCaE0ZwQQv17itQN2TtKtK2ooH1rdv2U7w0YD+C3PfacDLIqcVrKAI dXbjoV7w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1peIhj-003zqE-0F; Mon, 20 Mar 2023 16:49:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8C7FF300137; Mon, 20 Mar 2023 17:49:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 75486200A76E5; Mon, 20 Mar 2023 17:49:50 +0100 (CET) Date: Mon, 20 Mar 2023 17:49:50 +0100 From: Peter Zijlstra To: Lai Jiangshan Cc: "H. Peter Anvin" , Xin Li , linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, andrew.cooper3@citrix.com, seanjc@google.com, pbonzini@redhat.com, ravi.v.shankar@intel.com Subject: Re: [PATCH v5 22/34] x86/fred: FRED initialization code Message-ID: <20230320164950.GR2194297@hirez.programming.kicks-ass.net> References: <20230307023946.14516-1-xin3.li@intel.com> <20230307023946.14516-23-xin3.li@intel.com> <5D679723-D84F-42F0-AD8A-8BD1A38FB6CD@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 18, 2023 at 02:33:30PM +0800, Lai Jiangshan wrote: > If there is no other concrete reason other than overflowing for > assigning NMI and #DB with a stack level > 0, #VE should also > be assigned with a stack level > 0, and #BP too. #VE can happen > anytime and anywhere, so it is subject to overflowing too. So #BP needs the stack-gap (redzone) for text_poke_bp(). #BP can end up in kprobes which can then end up in ftrace/perf, depending on how it's all wired up. #VE is currently a trainwreck vs NMI/MCE, but I think FRED solves the worst of that. I'm not exactly sure how deep the #VE handler goes.