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, 22 Dec 2010 10:14:00 +0100
From:	Tejun Heo <tj@...nel.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Christoph Lameter <cl@...ux.com>, akpm@...ux-foundation.org,
	Pekka Enberg <penberg@...helsinki.fi>,
	linux-kernel@...r.kernel.org,
	Eric Dumazet <eric.dumazet@...il.com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [cpuops cmpxchg double V1 1/4] Generic support for
 this_cpu_cmpxchg_double

Hello,

On Tue, Dec 21, 2010 at 03:24:45PM -0800, H. Peter Anvin wrote:
> On 12/21/2010 02:36 PM, Christoph Lameter wrote:
> > On Sat, 18 Dec 2010, Tejun Heo wrote:
> > 
> >> pointers from the beginning.  Anyways, that's too late, so is it
> >> completely impossible to make cmpxchg_double's take a scalar value?
> >> It can take the pointer all the same, no?
> > 
> > It could take a scalar value like the others but we are then not operating
> > on the scalar alone but also on the following field.

Yes, it's weird but the operation itself is weird enough and named
accordingly, so to me it seems like a much lesser problem than
breaking interface consistency with other this_cpu_ ops.

> I'm a bit confused on this one.  The standard cmpxchg() takes a scalar
> and a pointer, and returns a scalar.  The equivalent for the "double"
> variety would be to return a compound object, basically:
> 
> struct double_ulong {
> 	unsigned long v[2];
> };
> 
> ... which can be returned in registers on both i386 and x86-64.
> 
> It's a bit clumsy from a type perspective, but I'm not sure that that is
> a bad thing.  Doing too much type genericity has caused us problems in
> the past.

Yeah, the above might be better too.  Is there any reason to use
cmpxchg_double on anything smaller?

Thanks.

-- 
tejun
--
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