lkml.org 
[lkml]   [2018]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 1/2] x86/entry/64: Use the TSS sp2 slot for rsp_scratch
On Mon, Jul 23, 2018 at 5:38 AM, Dave Hansen
<dave.hansen@linux.intel.com> wrote:
> On 07/22/2018 10:45 AM, Andy Lutomirski wrote:
>> + /*
>> + * sp2 is scratch space used by the SYSCALL64 handler. Linux does
>> + * not use rung 2, so sp2 is not otherwise needed.
>> + */
>> u64 sp2;
>
> Could we call out the actual thing that we use this slot for, and the
> symbol name so folks can find the corresponding code that does this?
> While I know the spot in entry_64 you're talking about, it might not be
> patently obvious to everyone, and it's also a bit more challenging to
> grep for than normal C code.
>
> Maybe:
>
> /*
> * Since Linux does not use ring 2, the 'sp2' slot is unused.
> * entry_SYSCALL_64 uses this as scratch space to stash the user
> * %RSP value.
> */

I'll improve this for v2.

\
 
 \ /
  Last update: 2018-07-24 04:37    [W:0.139 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site