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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+Cz28VrLXvzhwhUmFZLPLsjv0ZrEdJ4nHT0RMg1cjAmdLw@mail.gmail.com>
Date:   Thu, 11 May 2017 08:56:45 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH] KVM: x86: Fix load damaged SSEx MXCSR register

2017-05-10 23:35 GMT+08:00 Paolo Bonzini <pbonzini@...hat.com>:
>
>
> On 10/05/2017 12:19, Wanpeng Li wrote:
>>                * with old userspace.
>>                */
>> -             if (xstate_bv & ~kvm_supported_xcr0())
>> +             if (xstate_bv & ~kvm_supported_xcr0() ||
>> +                     mxcsr & ~vcpu->arch.guest_fpu.state.xsave.i387.mxcsr_mask)
>>                       return -EINVAL;
>>               load_xsave(vcpu, (u8 *)guest_xsave->region);
>>       } else {
>> -             if (xstate_bv & ~XFEATURE_MASK_FPSSE)
>> +             if (xstate_bv & ~XFEATURE_MASK_FPSSE ||
>> +                     mxcsr & ~vcpu->arch.guest_fpu.state.fxsave.mxcsr_mask)
>>                       return -EINVAL;
>>               memcpy(&vcpu->arch.guest_fpu.state.fxsave,
>>                       guest_xsave->region, sizeof(struct fxregs_state));
>
> Hmm, thinking more about it, maybe use mxcsr_feature_mask instead of
> digging into vcpu->arch.guest_fpu?  If you send v2, please remember to

ERROR: "mxcsr_feature_mask" [arch/x86/kvm/kvm.ko] undefined. So we
should dig into vcpu->arch.guest_fpu.

Regards,
Wanpeng Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ