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: <1201682801.28547.162.camel@lappy>
Date:	Wed, 30 Jan 2008 09:46:41 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Gregory Haskins <ghaskins@...ell.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tim Bird <tim.bird@...sony.com>,
	Sam Ravnborg <sam@...nborg.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	John Stultz <johnstul@...ibm.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 02/22 -v7] Add basic support for gcc profiler
	instrumentation


On Tue, 2008-01-29 at 22:15 -0500, Steven Rostedt wrote:

> +int register_mcount_function(struct mcount_ops *ops)
> +{
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&mcount_func_lock, flags);
> +	ops->next = mcount_list;
> +	/* must have next seen before we update the list pointer */
> +	smp_wmb();

That comment does not explain which race it closes; this is esp
important as there is no paired barrier to give hints.

> +	mcount_list = ops;
> +	/*
> +	 * For one func, simply call it directly.
> +	 * For more than one func, call the chain.
> +	 */
> +	if (ops->next == &mcount_list_end)
> +		mcount_trace_function = ops->func;
> +	else
> +		mcount_trace_function = mcount_list_func;
> +	spin_unlock_irqrestore(&mcount_func_lock, flags);
> +
> +	return 0;
> +}


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