mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] objtool: Don't warn for intra function calls in alternative
@ 2018-02-13  0:04 Andi Kleen
  2018-02-13  0:04 ` [PATCH 2/2] x86/retpoline: Fix return buffer filling Andi Kleen
  0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2018-02-13  0:04 UTC (permalink / raw)
  To: tglx; +Cc: x86, linux-kernel, bp, dwmw2, jpoimboe, Andi Kleen

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-13 14:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13  0:04 [PATCH 1/2] objtool: Don't warn for intra function calls in alternative Andi Kleen
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

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®