Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-31 Thread Oscar Carter
Hi Steven, On Mon, Jul 27, 2020 at 09:53:06AM -0400, Steven Rostedt wrote: > On Sun, 26 Jul 2020 17:52:42 +0200 > Oscar Carter wrote: > > > > If I try to do this I will need some help. Some info that point me to the > > > right direction would be greatly appreciated. Some advice about what > > >

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-27 Thread Steven Rostedt
On Sun, 26 Jul 2020 17:52:42 +0200 Oscar Carter wrote: > > If I try to do this I will need some help. Some info that point me to the > > right direction would be greatly appreciated. Some advice about what > > functions I will need to implement would be really helpfull. Or point me > > to the rig

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-26 Thread Oscar Carter
Hi Steven, On Sat, Jul 25, 2020 at 05:09:14PM +0200, Oscar Carter wrote: > Hi Steven, > > On Fri, Jul 24, 2020 at 02:34:57PM -0400, Steven Rostedt wrote: > > On Fri, 24 Jul 2020 19:55:00 +0200 > > Oscar Carter wrote: > > > > > > Which one of the above is this patch set for? > > > > > > This patch

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-25 Thread Oscar Carter
Sorry, typo correction for the last paragraph: On Sat, Jul 25, 2020 at 05:09:14PM +0200, Oscar Carter wrote: > > I would be will to add that linker trick to remove the warning. Or we > > just use that warning as incentive to get architecture developers to > > implement this feature ;-) > > In my o

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-25 Thread Oscar Carter
Hi Steven, On Fri, Jul 24, 2020 at 02:34:57PM -0400, Steven Rostedt wrote: > On Fri, 24 Jul 2020 19:55:00 +0200 > Oscar Carter wrote: > > > > Which one of the above is this patch set for? > > > > This patch is the result of a warning obtained with the following: > > > > make allmodconfig ARCH=pow

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Steven Rostedt
On Fri, 24 Jul 2020 19:55:00 +0200 Oscar Carter wrote: > > Which one of the above is this patch set for? > > This patch is the result of a warning obtained with the following: > > make allmodconfig ARCH=powerpc > make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 > > And with the -Wcast-

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
On Fri, Jul 24, 2020 at 01:40:20PM -0400, Steven Rostedt wrote: > On Fri, 24 Jul 2020 13:36:56 -0400 > Steven Rostedt wrote: > > > Which BTW, is supported by the following architectures: > > > > arm > > arm64 > > csky > > parisc > > powerpc > > riscv > > s390 > > x86 > > And here's

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Steven Rostedt
On Fri, 24 Jul 2020 13:40:20 -0400 Steven Rostedt wrote: > On Fri, 24 Jul 2020 13:36:56 -0400 > Steven Rostedt wrote: > > > Which BTW, is supported by the following architectures: > > x86 Ah, you can lose support on x86 if you don't enable DYNAMIC_FTRACE, which is stupid to do. I only en

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Steven Rostedt
On Fri, 24 Jul 2020 13:36:56 -0400 Steven Rostedt wrote: > Which BTW, is supported by the following architectures: > > arm > arm64 > csky > parisc > powerpc > riscv > s390 > x86 And here's a list of architectures that have function tracing but need to be updated: ia64 micro

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Steven Rostedt
On Fri, 24 Jul 2020 19:14:18 +0200 Oscar Carter wrote: > > The linker trick should only affect architectures that don't implement > > the needed features. I can make it so the linker trick is only applied > > to those archs, and other archs that want more protection only need to > > add these fea

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
Hi Steven, On Fri, Jul 24, 2020 at 07:14:18PM +0200, Oscar Carter wrote: > On Fri, Jul 24, 2020 at 12:35:28PM -0400, Steven Rostedt wrote: > > On Fri, 24 Jul 2020 18:19:21 +0200 > > Oscar Carter wrote: > > > > > > The linker trick is far less intrusive, and I believe less error prone. > > > > > >

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
On Fri, Jul 24, 2020 at 12:35:28PM -0400, Steven Rostedt wrote: > On Fri, 24 Jul 2020 18:19:21 +0200 > Oscar Carter wrote: > > > > The linker trick is far less intrusive, and I believe less error prone. > > > > If we use the linker trick, the warning -Wcast-function-type dissapears, > > but in a w

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Steven Rostedt
On Fri, 24 Jul 2020 18:19:21 +0200 Oscar Carter wrote: > > The linker trick is far less intrusive, and I believe less error prone. > > If we use the linker trick, the warning -Wcast-function-type dissapears, > but in a way that makes impossible to the compiler to get the necessary > info about

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
Hi Steven, On Tue, Jul 21, 2020 at 02:05:45PM -0400, Steven Rostedt wrote: > On Sun, 19 Jul 2020 17:50:33 +0200 > Oscar Carter wrote: > > > In an effort to enable -Wcast-function-type in the top-level Makefile to > > support Control Flow Integrity builds, there are the need to remove all > > the

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-21 Thread Steven Rostedt
On Sun, 19 Jul 2020 17:50:33 +0200 Oscar Carter wrote: > In an effort to enable -Wcast-function-type in the top-level Makefile to > support Control Flow Integrity builds, there are the need to remove all > the function callback casts. > > ftrace_ops_list_func() can no longer be defined as ftrace

[PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-19 Thread Oscar Carter
In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, there are the need to remove all the function callback casts. ftrace_ops_list_func() can no longer be defined as ftrace_ops_no_ops(). The reason for ftrace_ops_no_ops() is to use that wh