lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200318220114.GB52244@linux.intel.com>
Date:   Thu, 19 Mar 2020 00:01:14 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     "Xing, Cedric" <cedric.xing@...el.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Jethro Beekman <jethro@...tanix.com>,
        Nathaniel McCallum <npmccallum@...hat.com>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        linux-sgx@...r.kernel.org, akpm@...ux-foundation.org,
        dave.hansen@...el.com, Neil Horman <nhorman@...hat.com>,
        "Huang, Haitao" <haitao.huang@...el.com>,
        andriy.shevchenko@...ux.intel.com, tglx@...utronix.de,
        "Svahn, Kai" <kai.svahn@...el.com>, bp@...en8.de,
        Josh Triplett <josh@...htriplett.org>, luto@...nel.org,
        kai.huang@...el.com, David Rientjes <rientjes@...gle.com>,
        Patrick Uiterwijk <puiterwijk@...hat.com>,
        Andy Lutomirski <luto@...capital.net>,
        Connor Kuehl <ckuehl@...hat.com>,
        Harald Hoyer <harald@...hat.com>,
        Lily Sturmann <lsturman@...hat.com>
Subject: Re: [PATCH v28 21/22] x86/vdso: Implement a vDSO for Intel SGX
 enclave call

On Mon, Mar 16, 2020 at 04:56:42PM -0700, Xing, Cedric wrote:
> On 3/16/2020 3:55 PM, Sean Christopherson wrote:
> > On Mon, Mar 16, 2020 at 02:31:36PM +0100, Jethro Beekman wrote:
> > > Can someone remind me why we're not passing TCS in RBX but on the stack?
> > 
> > I finally remembered why.  It's pulled off the stack and passed into the
> > exit handler.  I'm pretty sure the vDSO could take it in %rbx and manually
> > save it on the stack, but I'd rather keep the current behavior so that the
> > vDSO is callable from C (assuming @leaf is changed to be passed via %rcx).
> > 
> The idea is that the caller of this vDSO API is C callable, hence it cannot
> receive TCS in %rbx anyway. Then it has to either MOV to %rbx or PUSH to
> stack. Either way the complexity is the same. The vDSO API however has to
> always save it on stack for exit handler. So receiving it via stack ends up
> in simplest code.

It is never C callable anyway given that not following the ABI so
who cares about being C callable anyway?

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ