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:	Thu, 08 Oct 2009 16:45:51 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Gregory Haskins <gregory.haskins@...il.com>
CC:	Gregory Haskins <ghaskins@...ell.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"alacrityvm-devel@...ts.sourceforge.net" 
	<alacrityvm-devel@...ts.sourceforge.net>,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH v2 2/4] KVM: introduce "xinterface" API for external	interaction
 with guests

On 10/07/2009 02:48 PM, Gregory Haskins wrote:
>
>> If f() can cause another agent to write to p (by freeing
>> it to a global list, for example), then it is its responsibility to
>> issue the smp_rmb(), otherwise no calculation that took place before f()
>> and accessed p is safe.
>>
>>      
> IOW: David is right.  You need a cpu-barrier one way or the other.  We
> can either allow ->release() to imply one (and probably document it that
> way, like we did for slow-work), or we can be explicit.

No, ->release() must do it or it becomes impossible to program.  And in 
fact it will, to place the freed structure on a global list it must take 
a lock which implies an smp_rmb().

> I chose to be
> explicit since it is kind of self-documenting, and there is no need to
> be worried about performance since the release is slow-path.
>    

It's so self-documenting I had no idea what it was there for.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ