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: <1371227607.9844.335.camel@gandalf.local.home>
Date:	Fri, 14 Jun 2013 12:33:27 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"yrl.pp-manager.tt@...achi.com" <yrl.pp-manager.tt@...achi.com>
Subject: Re: [PATCH] tracing/uprobes: Support ftrace_event_file base
 multibuffer

On Fri, 2013-06-14 at 09:21 -0700, Paul E. McKenney wrote:

> > > > @@ -548,15 +556,35 @@ static void uprobe_trace_print(struct trace_uprobe *tu,
> > > >  /* uprobe handler */
> > > >  static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
> > > >  {
> > > > -	if (!is_ret_probe(tu))
> > > > -		uprobe_trace_print(tu, 0, regs);
> > > > +	struct ftrace_event_file **file;
> > > > +
> > > > +	if (is_ret_probe(tu))
> > > > +		return 0;
> > > > +
> > > > +	file = rcu_dereference_raw(tu->files);
> > 
> > Why are you using rcu_dereference_raw() and not rcu_dereference(). The
> > _raw() is a bit special, and unless you know what you are doing with RCU
> > here, don't use it.
> > 
> > As I see you using rcu_dereference_raw() all over this patch, along with
> > mutexes, I believe that you are not using RCU correctly here.
> 
> If irqs and preempt are disabled, I suggest using rcu_dereference_sched().
> That is what it is there for.  ;-)
> 

I believe this just copied what kprobes did, where irqs and preemption
is disabled. I don't believe that these probes have that same luxury.

But that begs the question. Should we convert the rcu_dereference_raw()
in the kprobe code to rcu_dereference_sched()?

-- Steve


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