Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1507648

Re: [PATCH] x86: Fix export for mcount and __fentry__

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86: Fix export for mcount and __fentry__
Date Mon, 24 Oct 2016 21:20:02 +0200
Message-ID <svSWS-3rd-33@gated-at.bofh.it> (permalink)
References <svSNc-3nI-43@gated-at.bofh.it>
X-Original-To Steven Rostedt <rostedt@goodmis.org>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
User-Agent NeoMutt/20161014 (1.7.1)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc LKML <linux-kernel@vger.kernel.org>, Nicholas Piggin <npiggin@gmail.com>, Al Viro <viro@ZenIV.linux.org.uk>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Gabriel C <nix.or.die@gmail.com>
X-Original-Date Mon, 24 Oct 2016 21:17:43 +0200
X-Original-Message-ID <20161024191743.rsd74w2vev5efcar@pd.tnic>
X-Original-References <20161024150148.4f9d90e4@gandalf.local.home>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1507648

Show key headers only | View raw


On Mon, Oct 24, 2016 at 03:01:48PM -0400, Steven Rostedt wrote:
> Commit 784d5699eddc5 ("x86: move exports to actual definitions") removed the
> EXPORT_SYMBOL(__fentry__) and EXPORT_SYMBOL(mcount) from x8664_ksyms_64.c,
> and added EXPORT_SYMBOL(function_hook) in mcount_64.S instead. The problem
> is that function_hook isn't a function at all, but a macro that is defined
> as either mcount or __fentry__ depending on the support from gcc.
> 
> Originally, I thought this was a macro issue, like what __stringify()
> is used for. But the problem is a bit deeper. The Makefile.build has
> some magic that does post processing of files to create the CRC
> bindings. It does some searches for EXPORT_SYMBOL() and because it
> finds a macro name and not the actual functions, this causes
> function_hook not to be converted into mcount or __fentry__ and they
> are missed.
> 
> Instead of adding more magic to Makefile.build, just add
> EXPORT_SYMBOL() for mcount and __fentry__ where the ifdef is used.
> Since this is assembly and not C, it doesn't require being set after
> the function is defined.
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Tested-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86: Fix export for mcount and __fentry__ Steven Rostedt <rostedt@goodmis.org> - 2016-10-24 21:10 +0200
  Re: [PATCH] x86: Fix export for mcount and __fentry__ Borislav Petkov <bp@alien8.de> - 2016-10-24 21:20 +0200
  [tip:x86/urgent] x86: Fix export for mcount and __fentry__ tip-bot for Steven Rostedt <tipbot@zytor.com> - 2016-10-26 12:50 +0200

csiph-web