Re: [RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-13 Thread Steven Rostedt
On Wed, 13 Oct 2021 16:34:53 +0800 王贇 wrote: > On 2021/10/13 下午4:25, Miroslav Benes wrote: > >>> Side note... the comment will eventually conflict with peterz's > >>> https://lore.kernel.org/all/20210929152429.125997...@infradead.org/. > >> > >> Steven, would you like to share your opinion on

Re: [RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-13 Thread 王贇
On 2021/10/13 下午4:25, Miroslav Benes wrote: >>> Side note... the comment will eventually conflict with peterz's >>> https://lore.kernel.org/all/20210929152429.125997...@infradead.org/. >> >> Steven, would you like to share your opinion on this patch? >> >> If klp_synchronize_transition() will b

Re: [RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-13 Thread Miroslav Benes
> > Side note... the comment will eventually conflict with peterz's > > https://lore.kernel.org/all/20210929152429.125997...@infradead.org/. > > Steven, would you like to share your opinion on this patch? > > If klp_synchronize_transition() will be removed anyway, the comments > will be meaningl

Re: [RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-13 Thread 王贇
On 2021/10/13 下午3:55, Miroslav Benes wrote: >> diff --git a/include/linux/trace_recursion.h >> b/include/linux/trace_recursion.h >> index a9f9c57..101e1fb 100644 >> --- a/include/linux/trace_recursion.h >> +++ b/include/linux/trace_recursion.h >> @@ -208,13 +208,29 @@ static __always_inline voi

Re: [RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-13 Thread Miroslav Benes
> diff --git a/include/linux/trace_recursion.h b/include/linux/trace_recursion.h > index a9f9c57..101e1fb 100644 > --- a/include/linux/trace_recursion.h > +++ b/include/linux/trace_recursion.h > @@ -208,13 +208,29 @@ static __always_inline void trace_clear_recursion(int > bit) > * Use this for f

[RESEND PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-12 Thread 王贇
As the documentation explained, ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock() were supposed to disable and enable preemption properly, however currently this work is done outside of the function, which could be missing by mistake. This path will make sure the preemption was di

[PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock()

2021-10-12 Thread 王贇
As the documentation explained, ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock() were supposed to disable and enable preemption properly, however currently this work is done outside of the function, which could be missing by mistake. This path will make sure the preemption was di