lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC][PATCH v2 12/21] x86/pti: Use PTI stack instead of trampoline stack
    Date
    On Thu, Nov 19 2020 at 20:55, Alexandre Chartre wrote:
    > On 11/19/20 8:10 PM, Thomas Gleixner wrote:
    > Sorry I mixed up a few thing; I got confused with my own code which is not a
    > good sign...
    >
    > It's not sleeping with the user page-table which, as you mentioned, doesn't
    > make sense, it's sleeping with the kernel page-table but with the PTI stack.
    >
    > Basically, it is:
    > - entering C code with (user page-table, PTI stack);
    > - then it switches to the kernel page-table so we have (kernel page-table, PTI stack);
    > - and then it switches to the kernel stack so we have (kernel page-table, kernel stack).
    >
    > As this is all C code, some of which is executed with the PTI stack, we need the PTI stack
    > to be per-task so that the stack is preserved, in case that C code does a sleep/schedule
    > (no matter if this happens when using the PTI stack or the kernel stack).

    That makes some more sense, but I'm not convinced that this dual stack
    is really a good thing.

    Thanks,

    tglx

    \
     
     \ /
      Last update: 2020-11-19 22:22    [W:3.006 / U:0.432 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site