linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: tglx@linutronix.de
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de,
	dwmw2@infradead.org, jpoimboe@redhat.com,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 1/2] objtool: Don't warn for intra function calls in alternative
Date: Mon, 12 Feb 2018 16:04:21 -0800	[thread overview]
Message-ID: <20180213000422.16916-1-andi@firstfloor.org> (raw)

From: Andi Kleen <ak@linux.intel.com>

objtool suggests to put intra function calls, like used in
stuff rsb, into alternative, but then starts warning about the
alternative section too. Avoid these warnings.

Needed for the next patch.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/objtool/check.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 2e458eb45586..ec46db0dcdc0 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -544,7 +544,8 @@ static int add_call_destinations(struct objtool_file *file)
 			insn->call_dest = find_symbol_by_offset(insn->sec,
 								dest_off);
 
-			if (!insn->call_dest && !insn->ignore) {
+			if (!insn->call_dest && !insn->ignore &&
+			    strcmp(insn->sec->name, ".altinstr_replacement")) {
 				WARN_FUNC("unsupported intra-function call",
 					  insn->sec, insn->offset);
 				WARN("If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE.");
-- 
2.14.3

             reply	other threads:[~2018-02-13  0:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  0:04 Andi Kleen [this message]
2018-02-13  0:04 ` [PATCH 2/2] x86/retpoline: Fix return buffer filling Andi Kleen
2018-02-13  1:06   ` Josh Poimboeuf
2018-02-13 11:21   ` Borislav Petkov
2018-02-13 13:18     ` Borislav Petkov
2018-02-13 13:58   ` David Woodhouse
2018-02-13 14:32     ` Andi Kleen

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=20180213000422.16916-1-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dwmw2@infradead.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).