Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753339AbeADOiJ (ORCPT + 1 other); Thu, 4 Jan 2018 09:38:09 -0500 Received: from merlin.infradead.org ([205.233.59.134]:46846 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753212AbeADOh2 (ORCPT ); Thu, 4 Jan 2018 09:37:28 -0500 From: David Woodhouse To: ak@linux.intel.com Cc: Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, David Woodhouse Subject: [PATCH v3 12/13] retpoline/objtool: Disable some objtool warnings Date: Thu, 4 Jan 2018 14:37:09 +0000 Message-Id: <20180104143710.8961-12-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180104143710.8961-1-dwmw@amazon.co.uk> References: <20180104143710.8961-1-dwmw@amazon.co.uk> In-Reply-To: <1515058213.12987.89.camel@amazon.co.uk> References: <1515058213.12987.89.camel@amazon.co.uk> X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Andi Kleen With the indirect call thunk enabled compiler two objtool warnings are triggered very frequently and make the build very noisy. I don't see a good way to avoid them, so just disable them for now. Signed-off-by: Andi Kleen Signed-off-by: David Woodhouse --- tools/objtool/check.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9b341584eb1b..435c71f944dc 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -503,8 +503,13 @@ static int add_call_destinations(struct objtool_file *file) insn->call_dest = find_symbol_by_offset(insn->sec, dest_off); if (!insn->call_dest) { +#if 0 + /* Compilers with -mindirect-branch=thunk-extern trigger + * this everywhere on x86. Disable for now. + */ WARN_FUNC("can't find call dest symbol at offset 0x%lx", insn->sec, insn->offset, dest_off); +#endif return -1; } } else if (rela->sym->type == STT_SECTION) { @@ -1716,8 +1721,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first, return 1; } else if (func && has_modified_stack_frame(&state)) { +#if 0 + /* Compilers with -mindirect-branch=thunk-extern trigger + * this everywhere on x86. Disable for now. + */ + WARN_FUNC("sibling call from callable instruction with modified stack frame", sec, insn->offset); +#endif return 1; } -- 2.14.3