lkml.org 
[lkml]   [2017]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC] x86/mm/KASLR: Remap GDTs at fixed location
    On Thu, Jan 5, 2017 at 11:03 AM, Thomas Garnier <thgarnie@google.com> wrote:
    > On Thu, Jan 5, 2017 at 10:58 AM, Arjan van de Ven <arjan@linux.intel.com> wrote:
    >> On 1/5/2017 9:54 AM, Thomas Garnier wrote:
    >>
    >>>
    >>> That's my goal too. I started by doing a RO remap and got couple
    >>> problems with hibernation. I can try again for the next iteration or
    >>> delay it for another patch. I also need to look at KVM GDT usage, I am
    >>> not familiar with it yet.
    >>
    >>
    >> don't we write to the GDT as part of the TLS segment stuff for glibc ?
    >>
    >
    > Not sure which glibc feature it is.
    >
    > In this design, you can write to the GDT per-cpu variable that will
    > remain read-write. You just need to make the remapping writeable when
    > we load task registers (ltr) then the processor use the current GDT
    > address. At least that the case I know, I might find more through
    > testing.

    Hmm. I bet that if we preset the accessed bits in all the segments
    then we don't need it to be writable in general. But your point about
    set_thread_area (TLS) is well taken. However, I strongly suspect that
    we could make set_thread_area unconditionally set the accessed bit and
    no one would ever notice.

    \
     
     \ /
      Last update: 2017-01-05 21:19    [W:3.351 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site