Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-23 Thread Peter Zijlstra
On Tue, Mar 23, 2021 at 04:25:07PM +0100, Peter Zijlstra wrote: > On Tue, Mar 23, 2021 at 08:57:42AM -0400, Steven Rostedt wrote: > > > Well, from what I understand is that typecasting functions to other types > > of functions is one of the mistakes that cause security bugs to happen. And > >

Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-23 Thread Peter Zijlstra
On Tue, Mar 23, 2021 at 08:57:42AM -0400, Steven Rostedt wrote: > Well, from what I understand is that typecasting functions to other types > of functions is one of the mistakes that cause security bugs to happen. And > there's been a few of them in the kernel. Which is why the compilers have >

Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-23 Thread Steven Rostedt
On Tue, 23 Mar 2021 08:39:08 +0100 Peter Zijlstra wrote: > > index 4d8e35575549..d8fc87a17421 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -125,7 +125,7 @@ static void ftrace_ops_list_func(unsigned long ip, > > unsigned long parent_ip, > > #else > > /* See

Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-23 Thread Peter Zijlstra
On Mon, Mar 22, 2021 at 10:49:58PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > With 'make W=1', gcc warns about casts between incompatible function > types: > > kernel/trace/ftrace.c:128:31: error: cast between incompatible function types > from 'void (*)(long unsigned int, long

Re: [PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-22 Thread Steven Rostedt
On Mon, 22 Mar 2021 22:49:58 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > With 'make W=1', gcc warns about casts between incompatible function > types: > > kernel/trace/ftrace.c:128:31: error: cast between incompatible function types > from 'void (*)(long unsigned int, long unsigned

[PATCH] ftrace: shut up -Wcast-function-type warning for ftrace_ops_no_ops

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann With 'make W=1', gcc warns about casts between incompatible function types: kernel/trace/ftrace.c:128:31: error: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct