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:	Thu, 11 Nov 2010 10:57:50 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Dongdong Deng <dongdong.deng@...driver.com>, dzickus@...hat.com,
	peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: avoid calling arch_trigger_all_cpu_backtrace() at
 the same time on SMP


* Eric Dumazet <eric.dumazet@...il.com> wrote:

> Le jeudi 11 novembre 2010 à 10:23 +0100, Ingo Molnar a écrit :
> 
> > Also, variables that cmpxchg or test_and_set operates on need to be long, not int.
> 
> Hmm, ok for test_and_set(), it operates on a long.
> 
> cmpxchg() is ok on an int AFAIK. If not we have to make some changes :(
> 
> btrfs_orphan_cleanup() for example does this :
> 
> 	if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEANUP_STARTED))
> 		...
> 
> 
> Same in build_ehash_secret() (net/ipv4/af_inet.c)
> 
> 	cmpxchg(&inet_ehash_secret, 0, rnd);

You are right - cmpxchg() auto-detects the word size and thus should work on int 
too.

Thanks,

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