[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230131083901.ssg5huno2lhrbmzg@box.shutemov.name>
Date: Tue, 31 Jan 2023 11:39:01 +0300
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Dave Hansen <dave.hansen@...el.com>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Elena Reshetova <elena.reshetova@...el.com>, x86@...nel.org,
linux-coco@...ts.linux.dev, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] x86/tdx: Do not corrupt frame-pointer in
__tdx_hypercall()
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.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists