lkml.org 
[lkml]   [2018]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 04/10 v2 ] x86/fpu: eager switch PKRU state
    From
    Date
    On 18/09/2018 19:29, Rik van Riel wrote:
    > On Tue, 2018-09-18 at 18:04 +0200, Sebastian Andrzej Siewior wrote:
    >> On 2018-09-18 17:29:52 [+0200], Paolo Bonzini wrote:
    >>>> I don't think it matters what the PKRU state is
    >>>> for kernel threads, since kernel PTEs should not
    >>>> be using protection keys anyway.
    >>>
    >>> What about copy_from/to_user?
    >>
    >> This doesn't work for a kernel thread, does it? I mean they share the
    >> init's MM and never do copy_{from|to}_user.
    >
    > Indeed, copy_from/to_user only works if current->mm
    > points at an mm_struct with userspace memory.

    A kthread can do use_mm/unuse_mm.

    Paolo

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2018-09-19 07:57    [W:2.998 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site