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: <56C6088A.5080207@redhat.com>
Date:	Thu, 18 Feb 2016 19:08:10 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Radim Krčmář <rkrcmar@...hat.com>,
	linux-kernel@...r.kernel.org
Cc:	kvm@...r.kernel.org, Yuki Shibuya <shibuya.yk@...s.nec.co.jp>
Subject: Re: [PATCH v2 08/14] KVM: x86: remove notifiers from PIT discard
 policy



On 17/02/2016 20:14, Radim Krčmář wrote:
> +	/* pit->pit_state.lock was overloaded to prevent userspace from getting
> +	 * an inconsistent state after running multiple KVM_REINJECT_CONTROL
> +	 * ioctls in parallel.  Use a separate lock if that ioctl isn't rare.
> +	 */
> +	mutex_lock(&pit->pit_state.lock);
> +	kvm_pit_set_reinject(pit, control->pit_reinject);
> +	mutex_unlock(&pit->pit_state.lock);

... so in patch 7 concurrent _writes_ of reinject are protected by the
lock, but reads are done outside it (in pit_timer_fn).  WDYT about
making reinject an atomic_t?

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ