Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
On Thu, 22 Sep 2016 22:45:14 -0400 Steven Rostedt wrote: > On Fri, 23 Sep 2016 10:04:31 +0800 > Jisheng Zhang wrote: > > > Hi Thomas, > > > > On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > > > > > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > > > > >

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
On Thu, 22 Sep 2016 22:45:14 -0400 Steven Rostedt wrote: > On Fri, 23 Sep 2016 10:04:31 +0800 > Jisheng Zhang wrote: > > > Hi Thomas, > > > > On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > > > > > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > > > > > Currently ti-32k can

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Steven Rostedt
On Fri, 23 Sep 2016 10:04:31 +0800 Jisheng Zhang wrote: > Hi Thomas, > > On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > > > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > >

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Steven Rostedt
On Fri, 23 Sep 2016 10:04:31 +0800 Jisheng Zhang wrote: > Hi Thomas, > > On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > > > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > >

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
Hi Thomas, On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > omap_32k_read_sched_clock() as notrace but we then call another > > function ti_32k_read_cycles() that

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
Hi Thomas, On Thu, 22 Sep 2016 15:58:03 +0200 Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > omap_32k_read_sched_clock() as notrace but we then call another > > function ti_32k_read_cycles() that

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Steven Rostedt
On Thu, 22 Sep 2016 15:58:03 +0200 (CEST) Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > omap_32k_read_sched_clock() as notrace but we then call another > > function

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Steven Rostedt
On Thu, 22 Sep 2016 15:58:03 +0200 (CEST) Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Jisheng Zhang wrote: > > > Currently ti-32k can be used as a scheduler clock. We properly marked > > omap_32k_read_sched_clock() as notrace but we then call another > > function ti_32k_read_cycles() that

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Thomas Gleixner
On Thu, 22 Sep 2016, Jisheng Zhang wrote: > Currently ti-32k can be used as a scheduler clock. We properly marked > omap_32k_read_sched_clock() as notrace but we then call another > function ti_32k_read_cycles() that _wasn't_ notrace. > > Having a traceable function in the sched_clock() path

Re: [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Thomas Gleixner
On Thu, 22 Sep 2016, Jisheng Zhang wrote: > Currently ti-32k can be used as a scheduler clock. We properly marked > omap_32k_read_sched_clock() as notrace but we then call another > function ti_32k_read_cycles() that _wasn't_ notrace. > > Having a traceable function in the sched_clock() path

[PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
Currently ti-32k can be used as a scheduler clock. We properly marked omap_32k_read_sched_clock() as notrace but we then call another function ti_32k_read_cycles() that _wasn't_ notrace. Having a traceable function in the sched_clock() path leads to a recursion within ftrace and a kernel crash.

[PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion

2016-09-22 Thread Jisheng Zhang
Currently ti-32k can be used as a scheduler clock. We properly marked omap_32k_read_sched_clock() as notrace but we then call another function ti_32k_read_cycles() that _wasn't_ notrace. Having a traceable function in the sched_clock() path leads to a recursion within ftrace and a kernel crash.