lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <756023cd-5ba5-bb31-c7cc-7c91b6201632@redhat.com>
Date:   Thu, 16 Nov 2017 14:39:50 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Quan Xu <quan.xu0@...il.com>, Rik van Riel <riel@...hat.com>,
        "quan.xu04@...il.com" <quan.xu04@...il.com>
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        david@...hat.com, borntraeger@...ibm.com, tglx@...utronix.de,
        rkrcmar@...hat.com
Subject: Re: [PATCH 1/2] x86,kvm: move qemu/guest FPU switching out to
 vcpu_run

On 16/11/2017 14:35, Quan Xu wrote:
> but we introduce another method:
> 
>       -- When the VCPU thread is scheduled back in, the context
>          switch code will restore current->thread.fpu to the FPU
>          registers.
> 
> 
> there is still a window to restore current->thread.fpu to the FPU
> registers before enter guest mode and
> 
> preempt_disable().

That will always use the host PKRU.  The guest PKRU is _never_ visible
to the context switch code, because it's only ever used in a section
that runs with preemption disabled.

It's actually much simpler than before.

Paolo

> on target machine, after migration, the pkru value is source_host_pkru
> in current->thread.fpu.
> 
> in case,
> 
>             source_host_pkru_value != guest_pkru_value,
>             target_host_pkru_value == guest_pkru_value..
> 
> source_host_pkru_value may be restored to PKRU.. make pkru status
> inconsistent..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ