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:	Sun, 22 Nov 2009 12:24:53 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Jason Baron <jbaron@...hat.com>
Subject: Re: [PATCH 1/4] tracing: Use the perf recursion protection from
 trace event

On Sun, 2009-11-22 at 12:22 +0100, Ingo Molnar wrote:

> > > +void perf_swevent_put_recursion_context(int *recursion)
> > >  {
> > > -       struct perf_cpu_context *cpuctx = &get_cpu_var(perf_cpu_context);
> > > -       int *recursion = perf_swevent_recursion_context(cpuctx);
> > > -       struct perf_event_context *ctx;
> > > -
> > > -       if (*recursion)
> > > -               goto out;
> > > +       (*recursion)--;
> > > +}
> > 
> > And here as well.
> 
> Global functions are in essence a barrier() to GCC but yeah.

Can't rely on that, because if the thing decides to inline this function
it looses that barrier semantic.

And it being such a small function with a few callsites in the same
translation unit, there's a fair chance it will actually inline.

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