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]
Date:   Mon, 8 Oct 2018 17:17:28 +0800
From:   Tianyu Lan <lantianyu1986@...il.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Tianyu Lan <Tianyu.Lan@...rosoft.com>, kys@...rosoft.com,
        haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Radim Krcmar <rkrcmar@...hat.com>,
        devel@...uxdriverproject.org,
        "linux-kernel@...r kernel org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>, Michael.H.Kelley@...rosoft.com,
        vkuznets@...hat.com, Jork.Loeser@...rosoft.com
Subject: Re: [PATCH V3 2/13] KVM/MMU: Add tlb flush with range helper function

Hi Paolo:
              Thanks for your review. Sorry for later response due to holiday.

On Mon, Oct 1, 2018 at 11:26 PM Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> On 27/09/2018 05:48, Tianyu Lan wrote:
> > +
> > +     if (range && kvm_x86_ops->tlb_remote_flush_with_range) {
> > +             /*
> > +              * Read tlbs_dirty before flushing tlbs in order
> > +              * to track dirty tlbs during flushing.
> > +              */
> > +             long dirty_count = smp_load_acquire(&kvm->tlbs_dirty);
> > +
> > +             ret = kvm_x86_ops->tlb_remote_flush_with_range(kvm, range);
> > +             cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
>
> This is wrong, because it's not the entire TLB that is flushed.  So you
> cannot do the cmpxchg here.

Yes, nice catch. Will update in the next version.


-- 
Best regards
Tianyu Lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ