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: <20200410160603.GA23354@linux.intel.com>
Date:   Fri, 10 Apr 2020 09:06:04 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Qian Cai <cai@....pw>
Cc:     Marco Elver <elver@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        "paul E. McKenney" <paulmck@...nel.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        LKML <linux-kernel@...r.kernel.org>, kvm@...r.kernel.org
Subject: Re: KCSAN + KVM = host reset

On Fri, Apr 10, 2020 at 11:50:10AM -0400, Qian Cai wrote:
> 
> This works,
> 
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -3278,7 +3278,7 @@ static void svm_cancel_injection(struct kvm_vcpu *vcpu)
>  
>  bool __svm_vcpu_run(unsigned long vmcb_pa, unsigned long *regs);
>  
> -static void svm_vcpu_run(struct kvm_vcpu *vcpu)
> +static __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)
>  {
>         struct vcpu_svm *svm = to_svm(vcpu);
> 
> Does anyone has any idea why svm_vcpu_run() would be a problem for
> KCSAN_INTERRUPT_WATCHER=y?
> 
> I can only see there are a bunch of assembly code in __svm_vcpu_run() that
> might be related?

svm_vcpu_run() does all kinds of interrupt toggling, e.g. the sequence is:

  1. EFLAGS.IF == 0, from caller
  2. clgi()
  3. EFLAGS.IF <= 1
  4. __svm_vcpu_run(), i.e. enter guest
  5. EFLAGS == 0, from VM-Exit
  6. EFLAGS.IF <= 1
  7. stgi()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ