Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753405AbeADOiU (ORCPT + 1 other); Thu, 4 Jan 2018 09:38:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56134 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387AbeADOiR (ORCPT ); Thu, 4 Jan 2018 09:38:17 -0500 Date: Thu, 4 Jan 2018 08:38:14 -0600 From: Josh Poimboeuf To: Andi Kleen Cc: tglx@linutronix.de, torvalds@linux-foundation.org, gregkh@linux-foundation.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, Andi Kleen Subject: Re: [PATCH v2 11/12] retpoline/objtool: Disable some objtool warnings Message-ID: <20180104143814.bhvtsjiwpyhtgjph@treble> References: <20180104020019.1173-1-andi@firstfloor.org> <20180104020019.1173-12-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180104020019.1173-12-andi@firstfloor.org> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 04 Jan 2018 14:38:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 03, 2018 at 06:00:18PM -0800, Andi Kleen wrote: > 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 > > --- > 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 NAK. We can't blindly disable objtool warnings, that will break livepatch and the ORC unwinder. If you share a .o file (or the GCC code) I can look at adding retpoline support. -- Josh