Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
On Fri, 7 Dec 2018 20:48:47 +0100 Borislav Petkov wrote: > On Fri, Dec 07, 2018 at 11:42:10PM +0900, Masami Hiramatsu wrote: > > Hmm, I just thought that the symbol only referred from inline asm should > > be visible. But if it is OK for any version of supported gcc and clang, > > I'm good to

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
On Fri, 7 Dec 2018 20:48:47 +0100 Borislav Petkov wrote: > On Fri, Dec 07, 2018 at 11:42:10PM +0900, Masami Hiramatsu wrote: > > Hmm, I just thought that the symbol only referred from inline asm should > > be visible. But if it is OK for any version of supported gcc and clang, > > I'm good to

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Borislav Petkov
On Fri, Dec 07, 2018 at 11:42:10PM +0900, Masami Hiramatsu wrote: > Hmm, I just thought that the symbol only referred from inline asm should > be visible. But if it is OK for any version of supported gcc and clang, > I'm good to remove it. :-) (IOW, I just concerned about older gcc) I just tried

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Borislav Petkov
On Fri, Dec 07, 2018 at 11:42:10PM +0900, Masami Hiramatsu wrote: > Hmm, I just thought that the symbol only referred from inline asm should > be visible. But if it is OK for any version of supported gcc and clang, > I'm good to remove it. :-) (IOW, I just concerned about older gcc) I just tried

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
On Wed, 5 Dec 2018 15:24:48 +0100 Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > > since that is locally used. > > Done. > > > Should we declare prototypes for __weak

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
On Wed, 5 Dec 2018 15:24:48 +0100 Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > > since that is locally used. > > Done. > > > Should we declare prototypes for __weak

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
Hi, On Wed, 5 Dec 2018 18:15:47 +0100 Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 05:25:26PM +0100, Ingo Molnar wrote: > > Also, preferably the prototype should be eliminated via proper ordering > > of functions from lower level to higher levels. > > Well, that trampoline_handler() is

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-07 Thread Masami Hiramatsu
Hi, On Wed, 5 Dec 2018 18:15:47 +0100 Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 05:25:26PM +0100, Ingo Molnar wrote: > > Also, preferably the prototype should be eliminated via proper ordering > > of functions from lower level to higher levels. > > Well, that trampoline_handler() is

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
On Wed, Dec 05, 2018 at 05:25:26PM +0100, Ingo Molnar wrote: > Also, preferably the prototype should be eliminated via proper ordering > of functions from lower level to higher levels. Well, that trampoline_handler() is special as we call it from inline asm and I see Masami has marked it

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
On Wed, Dec 05, 2018 at 05:25:26PM +0100, Ingo Molnar wrote: > Also, preferably the prototype should be eliminated via proper ordering > of functions from lower level to higher levels. Well, that trampoline_handler() is special as we call it from inline asm and I see Masami has marked it

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Ingo Molnar
* Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > > since that is locally used. > > Done. Also, preferably the prototype should be eliminated via proper ordering of

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Ingo Molnar
* Borislav Petkov wrote: > On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > > since that is locally used. > > Done. Also, preferably the prototype should be eliminated via proper ordering of

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > since that is locally used. Done. > Should we declare prototypes for __weak functions? Anyway, we should remove > __weak from the prototypes. And done.

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote: > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c, > since that is locally used. Done. > Should we declare prototypes for __weak functions? Anyway, we should remove > __weak from the prototypes. And done.

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Masami Hiramatsu
Hi Borislav, On Wed, 5 Dec 2018 11:11:31 +0100 Borislav Petkov wrote: > From: Borislav Petkov > > ... with the goal of eventually enabling -Wmissing-prototypes by > default. At least on x86. > > Make functions static where possible, otherwise add prototypes or make > them visible through

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Masami Hiramatsu
Hi Borislav, On Wed, 5 Dec 2018 11:11:31 +0100 Borislav Petkov wrote: > From: Borislav Petkov > > ... with the goal of eventually enabling -Wmissing-prototypes by > default. At least on x86. > > Make functions static where possible, otherwise add prototypes or make > them visible through

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Rafael J. Wysocki
On Wed, Dec 5, 2018 at 11:11 AM Borislav Petkov wrote: > > From: Borislav Petkov > > ... with the goal of eventually enabling -Wmissing-prototypes by > default. At least on x86. > > Make functions static where possible, otherwise add prototypes or make > them visible through includes. > >

Re: [PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Rafael J. Wysocki
On Wed, Dec 5, 2018 at 11:11 AM Borislav Petkov wrote: > > From: Borislav Petkov > > ... with the goal of eventually enabling -Wmissing-prototypes by > default. At least on x86. > > Make functions static where possible, otherwise add prototypes or make > them visible through includes. > >

[PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
From: Borislav Petkov ... with the goal of eventually enabling -Wmissing-prototypes by default. At least on x86. Make functions static where possible, otherwise add prototypes or make them visible through includes. asm/trace/ changes courtesy of Steven Rostedt . Signed-off-by: Borislav Petkov

[PATCH] x86/kernel: Fix more -Wmissing-prototypes warnings

2018-12-05 Thread Borislav Petkov
From: Borislav Petkov ... with the goal of eventually enabling -Wmissing-prototypes by default. At least on x86. Make functions static where possible, otherwise add prototypes or make them visible through includes. asm/trace/ changes courtesy of Steven Rostedt . Signed-off-by: Borislav Petkov