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: <1365473805.25498.44.camel@gandalf.local.home>
Date:	Mon, 08 Apr 2013 22:16:45 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	WANG Chao <chaowang@...hat.com>,
	Greg KH <gregkh@...uxfoundation.org>, stable@...r.kernel.org
Subject: Re: [PATCH 3/3] ftrace: Do not call stub functions in control loop

On Tue, 2013-04-09 at 10:08 +0800, zhangwei(Jovi) wrote:
> On 2013/4/9 4:49, Steven Rostedt wrote:
> > From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> > 
> > The function tracing control loop used by perf spits out a warning
> > if the called function is not a control function. This is because
> > the control function references a per cpu allocated data structure
> > on struct ftrace_ops that is not allocated for other types of
> > functions.
> > 
> > commit 0a016409e42 "ftrace: Optimize the function tracer list loop"
> > 
> > Had an optimization done to all function tracing loops to optimize
> > for a single registered ops. Unfortunately, this allows for a slight
> > race when tracing starts or ends, where the stub function might be
> > called after the current registered ops is removed. In this case we
> > get the following dump:
> > 

> Involve stable? 3.8 kernel user would need this fix.

Why? commit 0a016409e42 "ftrace: Optimize the function tracer list loop"
was added for 3.9. 3.8 has:

        op = rcu_dereference_raw(ftrace_control_list);
        while (op != &ftrace_list_end) {
                if (!ftrace_function_local_disabled(op) &&
                    ftrace_ops_test(op, ip))
                        op->func(ip, parent_ip, op, regs);

                op = rcu_dereference_raw(op->next);
        };

The stub function will never get called.

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