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 3D0F5808 for ; Tue, 31 Jan 2023 09:40:00 +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=TEMzv2O8BYSGCOG0+HTjK/rsBEzpwSVr8/h4IJVt9VU=; b=Vl9DrjCUeKAjshZoY+VFjv/exa KONhmY/KvnY72jQ45ZWE5XjZpQ3Rgz4eAdWnOOVULOOmZbeTf8U+cyt1dgm8ZVfyQh9kdbsYSOwU/ xEv+4aQEZ202+Hah2rKHKhdMEVFCdCf529erkupx8oLxZWtjnmK3lqf9vaQob170rmm6qudvYzjiv q4IqoH5Gmbx5IG4O/elwfaTGbaHGGjwd/nKGX6lMa4IPIFnX3te5WozAwdMoCgLOrm9ya9zpg53rH JKA7jKEDace6azx28pWEY3P2sRl194EgvF7pP7nAEpzxrpyvINEgky1HjD0bRiDpjxKa1VGrS4uYv cSh5T+bg==; 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 1pMn7E-00BCAX-MV; Tue, 31 Jan 2023 09:39:49 +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 8C6763002BF; Tue, 31 Jan 2023 10:39:48 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6C6FB23CB3344; Tue, 31 Jan 2023 10:39:48 +0100 (CET) Date: Tue, 31 Jan 2023 10:39:48 +0100 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Dave Hansen , Borislav Petkov , Andy Lutomirski , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Elena Reshetova , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall() Message-ID: References: <20230130135354.27674-1-kirill.shutemov@linux.intel.com> <20230131083901.ssg5huno2lhrbmzg@box.shutemov.name> 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: <20230131083901.ssg5huno2lhrbmzg@box.shutemov.name> On Tue, Jan 31, 2023 at 11:39:01AM +0300, Kirill A. Shutemov wrote: > On Tue, Jan 31, 2023 at 09:34:12AM +0100, Peter Zijlstra wrote: > > On Mon, Jan 30, 2023 at 04:53:54PM +0300, Kirill A. Shutemov wrote: > > > If compiled with CONFIG_FRAME_POINTER=y, objtool in not happy that > > > __tdx_hypercall() messes up RBP. > > > > > > objtool: __tdx_hypercall+0x7f: return with modified stack frame > > > > > > Rework the function to store TDX_HCALL_ flags on stack instead of RBP. > > > > Also, on IRC you mentioned that per TDX spec, BP is a valid argument > > register too and you were going to raise this and get it fixed, TDX > > hypercalls must not use BP to pass data. > > I've raised the question yesterday. No progress so far. It will take time > to get it into the public spec. Sure, just making sure it's not forgotten about. Thanks!