Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495141

Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch to userspace

From Rik van Riel <riel@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch to userspace
Date 2016-10-04 04:20 +0200
Message-ID <sonuN-4Gn-5@gated-at.bofh.it> (permalink)
References (2 earlier) <snCcx-78R-21@gated-at.bofh.it> <snCvT-7vS-7@gated-at.bofh.it> <soivc-1li-7@gated-at.bofh.it> <soiY9-1K3-9@gated-at.bofh.it> <soj7P-1Ne-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, 2016-10-03 at 14:36 -0700, Andy Lutomirski wrote:
> 
> Anything else that tries to read task xstate from memory, i.e. MPX
> and
> PKRU.  (Although if we switch to eager-switched PKRU, then PKRU stops
> mattering for this purpose.)
> 
> Actually, I don't see any way your patches can be compatible with
> PKRU
> without switching to eager-switched PKRU.

There is one case where the in-register PKRU state matters:
- user space accesses to memory

There are several cases where the in-memory PKRU state would
suffice:
- get_user_pages(_fast) to the local task (could also use registers)
- setting VMA/PTE permission bits (could also use registers)

There is one case where only in-memory PKRU state works, where
PKRU is currently simply ignored:
- get_user_pages to another task's memory

Dave, are there major obstacles to making read_pkru and write_pkru
work with in-memory state?

Would it be better for read/write_pkru to force the FPU state
to get loaded into registers, under the assumption that if things
like get_user_pages_fast happens, we will likely switch back to
userspace soon, anyway?

Would that assumption be wrong with KVM? :)

-- 
All Rights Reversed.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch to userspace riel@redhat.com - 2016-10-01 23:00 +0200
  Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-02 01:50 +0200
    Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-02 02:10 +0200
      Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-03 23:00 +0200
        Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-03 23:30 +0200
          Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-03 23:40 +0200
            Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-04 03:30 +0200
              Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-04 04:20 +0200
                Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-04 04:50 +0200
                Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-04 05:10 +0200
                Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Ingo Molnar <mingo@kernel.org> - 2016-10-04 08:40 +0200
                Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-04 14:50 +0200
            Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-04 04:20 +0200
              Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Andy Lutomirski <luto@amacapital.net> - 2016-10-04 05:10 +0200
    Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until  switch to userspace Rik van Riel <riel@redhat.com> - 2016-10-02 02:50 +0200
      Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch  to userspace Dave Hansen <dave.hansen@linux.intel.com> - 2016-10-03 18:30 +0200

csiph-web