From: Borislav Petkov <bp@alien8.de>
To: Steven Rostedt <rostedt@goodmis.org>
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>
Subject: Re: [PATCH] x86: Fix export for mcount and __fentry__
Date: Mon, 24 Oct 2016 21:17:43 +0200 [thread overview]
Message-ID: <20161024191743.rsd74w2vev5efcar@pd.tnic> (raw)
In-Reply-To: <20161024150148.4f9d90e4@gandalf.local.home>
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.
next prev parent reply other threads:[~2016-10-24 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 19:01 Steven Rostedt
2016-10-24 19:17 ` Borislav Petkov [this message]
2016-10-26 10:43 ` [tip:x86/urgent] " tip-bot for Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161024191743.rsd74w2vev5efcar@pd.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nix.or.die@gmail.com \
--cc=npiggin@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®