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] [day] [month] [year] [list]
Message-ID: <1372708530.22688.19.camel@gandalf.local.home>
Date:	Mon, 01 Jul 2013 15:55:30 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] tracing/kprobes: Turn trace_probe->files into
 list_head

On Mon, 2013-07-01 at 21:36 +0200, Oleg Nesterov wrote:
> On 07/01, Steven Rostedt wrote:
> >
> > On Thu, 2013-06-20 at 19:38 +0200, Oleg Nesterov wrote:
> >
> > > -static int
> > > -trace_probe_file_index(struct trace_probe *tp, struct ftrace_event_file *file)
> > > +static struct event_file_link *
> > > +find_event_file_link(struct trace_probe *tp, struct ftrace_event_file *file)
> > >  {
> > > -	struct ftrace_event_file **files;
> > > -	int i;
> > > +	struct event_file_link *link;
> > >
> > > -	/*
> > > -	 * Since all tp->files updater is protected by probe_enable_lock,
> > > -	 * we don't need to lock an rcu_read_lock.
> > > -	 */
> > > -	files = rcu_dereference_raw(tp->files);
> > > -	if (files) {
> > > -		for (i = 0; files[i]; i++)
> > > -			if (files[i] == file)
> > > -				return i;
> > > -	}
> > > +	list_for_each_entry(link, &tp->files, list)
> > > +		if (link->file == file)
> > > +			return link;
> >
> > Shouldn't that be list_for_each_entry_rcu()?
> 
> No.
> 
> This is the writer which modifies the list. enable/disable_trace_probe
> should be serialized wrt each other / itself anyway, otherwise they are
> buggy in any case.

Ah OK, I missed the readers of kprobe*_trace_func() and was confused by
the other rcu usage. Nevermind.

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