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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 7 Jan 2019 17:20:30 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <sean.j.christopherson@...el.com>,
        lantianyu1986@...il.com
Cc:     kvm@...r.kernel.org, rkrcmar@...hat.com, catalin.marinas@....com,
        will.deacon@....com, linux-kernel@...r.kernel.org,
        paulus@...abs.org, hpa@...or.com, kys@...rosoft.com,
        kvmarm@...ts.cs.columbia.edu, mpe@...erman.id.au, x86@...nel.org,
        linux@...linux.org.uk, michael.h.kelley@...rosoft.com,
        mingo@...hat.com, benh@...nel.crashing.org, jhogan@...nel.org,
        linux-mips@...r.kernel.org, Lan Tianyu <Tianyu.Lan@...rosoft.com>,
        marc.zyngier@....com, kvm-ppc@...r.kernel.org, bp@...en8.de,
        tglx@...utronix.de, linux-arm-kernel@...ts.infradead.org,
        christoffer.dall@....com, ralf@...ux-mips.org,
        paul.burton@...s.com, vkuznets@...hat.com,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 7/11] KVM: Remove redundant check in the
 kvm_get_dirty_log_protect()

On 04/01/19 16:50, Sean Christopherson wrote:
> Tangentially related, does mmu_lock actually need to be held while we
> walk dirty_bitmap in kvm_{clear,get}_dirty_log_protect()?  The bitmap
> itself is protected by slots_lock (a lockdep assertion would be nice
> too), e.g. can we grab the lock iff dirty_bitmap[i] != 0?

Yes, we could avoid grabbing it as long as the bitmap is zero.  However,
without kvm->manual_dirty_log_protect, the granularity of
kvm_get_dirty_log_protect() is too coarse so it won't happen in
practice.  Instead, with the new manual clear,
kvm_get_dirty_log_protect() does not take the lock and a well-written
userspace is not going to call the clear ioctl unless some bits are set.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ