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]
Date:	Wed, 27 Aug 2014 07:50:52 +0000
From:	Dexuan Cui <decui@...rosoft.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	"jeremy@...p.org" <jeremy@...p.org>,
	KY Srinivasan <kys@...rosoft.com>,
	"chrisw@...s-sol.org" <chrisw@...s-sol.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: sync_set_bit() vs set_bit()  -- what's the difference?

> -----Original Message-----
> From: Jan Beulich
> Sent: Wednesday, August 27, 2014 15:39 PM
> >>> On 27.08.14 at 09:30, <decui@...rosoft.com> wrote:
> > I'm curious about the difference. :-)
> >
> > sync_set_bit() is only used in drivers/hv/ and drivers/xen/ while set_bit()
> > is used in all other places. What makes hv/xen special?
> 
> I guess this would really want to be used by anything communicating
> with a hypervisor or a remote driver: set_bit() gets its LOCK prefix
> discarded when the local kernel determines it runs on a single CPU
> only. Obviously having knowledge of the CPU count inside a VM does
> not imply anything about the number of CPUs available to the host,
> i.e. stripping LOCK prefixes in that case would be unsafe.
> 
> Jan

Thank you, Juergen and Jan for your  quick answers!

I didn't realize LOCK_PREFIX is "" for UP. :-)

Thanks,
-- Dexuan
--
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