Re: 784d5699eddc ("x86: move exports to actual definitions")
From: Gabriel C
Date: Thu Oct 20 2016 - 17:09:09 EST
On 19.10.2016 15:45, Steven Rostedt wrote:
> On Wed, 19 Oct 2016 12:23:25 +0200
> Borislav Petkov <bp@xxxxxxxxx> wrote:
>> On Wed, Oct 19, 2016 at 02:10:04AM +0200, Adam Borowski wrote:
>>> Already being fixed, please take a look at the thread starting at
>>> 20161016002205.GA9686@vader; for your convenience I've put Nicholas Piggin's
>>> initial work, my lousy but works-for-me fix for x86, Arnd Bergmann's for arm
>>> at git@xxxxxxxxxx:kilobyte/linux.git branch kbuild-exports.
>> So you have three patches on that branch, I cherry-picked the first
>> two and it is almost fixed except the __fentry__ thing which is still
>> missing a CRC, see below.
>> Adding Steve to CC too.
>> WARNING: "__fentry__" [virt/lib/irqbypass.ko] has no CRC!
>> WARNING: "__fentry__" [sound/core/snd-hrtimer.ko] has no CRC!
>> WARNING: "__fentry__" [sound/core/seq/snd-seq.ko] has no CRC!
> [ snip repeated failures of __fentry__ ]
> Probably because of this:
> #ifdef CC_USE_FENTRY
> # define function_hook __fentry__
> # define function_hook mcount
> Then you have this:
> which most likely exported the name "function_hook" and not
> Does this patch fix things for you? If it does, I can make it more
> generic (moving the MACRO_EXPORT_SYMBOL into the export.h header). And
> submit that.
kbuild-exports+your patch makes all my warning go away and *yay* that kernel
even boots to console .. ( X mode broken but this seems to be a different issue )
> -- Steve
> diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
> index efe73aacf966..9420cd6c6dba 100644
> --- a/arch/x86/kernel/mcount_64.S
> +++ b/arch/x86/kernel/mcount_64.S
> @@ -295,7 +295,8 @@ trace:
> jmp fgraph_trace
> #endif /* CONFIG_DYNAMIC_FTRACE */
> +#define MACRO_EXPORT_SYMBOL(x) EXPORT_SYMBOL(x)
> #endif /* CONFIG_FUNCTION_TRACER */
> #ifdef CONFIG_FUNCTION_GRAPH_TRACER