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]
Message-ID: <20161013125103.GF16406@potion>
Date:   Thu, 13 Oct 2016 14:51:04 +0200
From:   Radim Krčmář <rkrcmar@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: document lock orders

2016-10-13 13:10+0200, Paolo Bonzini:
> This is long overdue, and not really hard.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> ---

Applied to kvm/queue, thanks.

>  Documentation/virtual/kvm/locking.txt | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
> index f2491a8c68b4..e5dd9f4d6100 100644
> --- a/Documentation/virtual/kvm/locking.txt
> +++ b/Documentation/virtual/kvm/locking.txt
> @@ -4,7 +4,17 @@ KVM Lock Overview
>  1. Acquisition Orders
>  ---------------------
>  
> -(to be written)
> +The acquisition orders for mutexes are as follows:
> +
> +- kvm->lock is taken outside vcpu->mutex
> +
> +- kvm->lock is taken outside kvm->slots_lock and kvm->irq_lock
> +
> +- kvm->slots_lock is taken outside kvm->irq_lock, though acquiring
> +  them together is quite rare.
> +
> +For spinlocks, kvm_lock is taken outside kvm->mmu_lock.  Everything
> +else is a leaf: no other lock is taken inside the critical sections.
>  
>  2: Exception
>  ------------
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ