Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756245AbcJTVJG (ORCPT ); Thu, 20 Oct 2016 17:09:06 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36262 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756152AbcJTVJE (ORCPT ); Thu, 20 Oct 2016 17:09:04 -0400 Subject: Re: 784d5699eddc ("x86: move exports to actual definitions") To: Steven Rostedt , Borislav Petkov References: <20161018202304.sksoxuoll4uy3uwg@pd.tnic> <20161018202915.GA307@x4> <20161019001004.GA27544@angband.pl> <20161019102325.32nfqbess2kbtcrx@pd.tnic> <20161019094507.7c780449@gandalf.local.home> Cc: Adam Borowski , Markus Trippelsdorf , Al Viro , lkml , npiggin@gmail.com From: Gabriel C Message-ID: <02ef0824-3208-7532-596c-043433a5f7c5@gmail.com> Date: Thu, 20 Oct 2016 23:07:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161019094507.7c780449@gandalf.local.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2095 Lines: 71 On 19.10.2016 15:45, Steven Rostedt wrote: > On Wed, 19 Oct 2016 12:23:25 +0200 > Borislav Petkov 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@github.com:kilobyte/linux.git branch kbuild-exports. >> >> Thanks. >> >> 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__ > #else > # define function_hook mcount > #endif > > [..] > > Then you have this: > > EXPORT_SYMBOL(function_hook) > > which most likely exported the name "function_hook" and not > "__fentry__". > > 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 > END(function_hook) > #endif /* CONFIG_DYNAMIC_FTRACE */ > -EXPORT_SYMBOL(function_hook) > +#define MACRO_EXPORT_SYMBOL(x) EXPORT_SYMBOL(x) > +MACRO_EXPORT_SYMBOL(function_hook) > #endif /* CONFIG_FUNCTION_TRACER */ > > #ifdef CONFIG_FUNCTION_GRAPH_TRACER > Best Regards