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]
Date:	Thu, 27 Mar 2014 16:31:53 +0800
From:	Jet Chen <jet.chen@...el.com>
To:	Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org
CC:	fengguang.wu@...el.com, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: vmx: fix MPX detection

Hi Paolo,

I helped to test for your patch on our LKP system. It fixes the bug reported by Fengguang.

I applied your patch based on commit 93c4adc7afedf9b0ec190066d45b6d67db5270da.

commit e0d58133c21fd445e029fb43752998384fa4df5c
Author: Jet Chen <jet.chen@...el.com>
Date:   Thu Mar 27 13:15:34 2014 +0800

     Test patch from Paolo Bonzini

     Signed-off-by: Jet Chen <jet.chen@...el.com>

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index aa98695..ce2b572 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5594,9 +5594,10 @@ int kvm_arch_init(void *opaque)
                 goto out_free_percpu;

         kvm_set_mmio_spte_mask();
-       kvm_init_msr_list();

         kvm_x86_ops = ops;
+       kvm_init_msr_list();
+
         kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
                         PT_DIRTY_MASK, PT64_NX_MASK, 0);

And here is test result on our LKP system

93c4adc7afedf9b  e0d58133c21fd445e029fb437
---------------  -------------------------
          1 ~ 0%    -100.0%          0 ~ 0%  TOTAL dmesg.BUG:unable_to_handle_kernel_NULL_pointer_dereference
          1 ~ 0%    -100.0%          0 ~ 0%  TOTAL dmesg.Oops:SMP
          1 ~ 0%    -100.0%          0 ~ 0%  TOTAL dmesg.RIP:kvm_arch_init
          1 ~ 0%    -100.0%          0 ~ 0%  TOTAL dmesg.Kernel_panic-not_syncing:Fatal_exception

Legend:
      ~XX%    - stddev percent
      [+-]XX% - change percent

Kernel oops messages disappear after applying your patch.

Thanks,
-Jet

On 03/26/2014 10:54 PM, Paolo Bonzini wrote:
> kvm_x86_ops is still NULL at this point.  Since kvm_init_msr_list
> cannot fail, it is safe to initialize it before the call.
>
> Reported-by: Fengguang Wu <fengguang.wu@...el.com>
> Cc: kvm@...r.kernel.org
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> ---
>   arch/x86/kvm/x86.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 39c28f09dfd5..49b514f76b5d 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -5537,9 +5537,10 @@ int kvm_arch_init(void *opaque)
>   		goto out_free_percpu;
>
>   	kvm_set_mmio_spte_mask();
> -	kvm_init_msr_list();
>
>   	kvm_x86_ops = ops;
> +	kvm_init_msr_list();
> +
>   	kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
>   			PT_DIRTY_MASK, PT64_NX_MASK, 0);
>
>

View attachment "dmesg" of type "text/plain" (331049 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ