From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B927CD2F7 for ; Thu, 6 Apr 2023 20:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=mWCYh+aHqMQPGU92cJY3RsdVCoOL6xggKE9AswxAjjI=; b=FVfGvilevbgchwqZb52BXeY8SA yM4/PlPBCQF19uANo8phcXNg55OCv069MBl+d8kfOQ5fzChyQXwG8hcFBV26OSUTZK3K1MfiWWUTP 32vXXFNGdIMRTR5weNKpSj9tpJQJ08tYy7FODzQZIricHNb+7nLm/NlEmcEHUZUat4+aVvWRzkbiz ZruHBv84ED5dthnKaC9V4SqK0Yq3SlaeD80X0P16qTbl5RgzuVxK7Xp1Z9JmtdzlZpwNiqopTQUez SR04HbpaphOyaR+GDCdQeqjdy2CICbldb2Fzsbp+GTvV1FLr5ojiF1w7bxi5Fvgja+sPSUoHU2akV mOqncIzg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pkWMX-0009V8-4F; Thu, 06 Apr 2023 20:37:41 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B0750300274; Thu, 6 Apr 2023 22:37:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 190072625036A; Thu, 6 Apr 2023 22:37:39 +0200 (CEST) Date: Thu, 6 Apr 2023 22:37:38 +0200 From: Peter Zijlstra To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Lai Jiangshan , "H. Peter Anvin" , Andi Kleen , Andrew Cooper , Andy Lutomirski , Asit Mallick , Cfir Cohen , Dan Williams , Dave Hansen , David Kaplan , David Rientjes , Dirk Hohndel , Erdem Aktas , Jan Kiszka , Jiri Slaby , Joerg Roedel , Juergen Gross , Kees Cook , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Linus Torvalds , Mike Stunes , Raj Ashok , Sean Christopherson , Thomas Gleixner , Tom Lendacky , Tony Luck , kvm@vger.kernel.org, linux-coco@lists.linux.dev, x86@kernel.org, Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: Re: [RFC PATCH 1/7] x86/entry: Move PUSH_AND_CLEAR_REGS out of paranoid_entry Message-ID: <20230406203738.GE405948@hirez.programming.kicks-ass.net> References: <20230403140605.540512-1-jiangshanlai@gmail.com> <20230403140605.540512-2-jiangshanlai@gmail.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230403140605.540512-2-jiangshanlai@gmail.com> On Mon, Apr 03, 2023 at 10:05:59PM +0800, Lai Jiangshan wrote: > @@ -915,11 +922,8 @@ SYM_CODE_END(xen_failsafe_callback) > * R14 - old CR3 > * R15 - old SPEC_CTRL > */ > -SYM_CODE_START(paranoid_entry) > +SYM_FUNC_START(paranoid_entry) > ANNOTATE_NOENDBR > - UNWIND_HINT_FUNC That isn't quite equivalent. SYM_FUNC_START() gets you ENDBR, while the SYM_CODE_START(); ANNOTATE_NOENDBR; UNWIND_HINT_FUNC is explicitly no ENDBR. > - PUSH_AND_CLEAR_REGS save_ret=1 > - ENCODE_FRAME_POINTER 8 > > /* > * Always stash CR3 in %r14. This value will be restored,