From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934935AbcJ0HjW (ORCPT ); Thu, 27 Oct 2016 03:39:22 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54674 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933616AbcJ0HjV (ORCPT ); Thu, 27 Oct 2016 03:39:21 -0400 Date: Thu, 27 Oct 2016 00:37:04 -0700 From: tip-bot for Josh Poimboeuf Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, jpoimboe@redhat.com, mingo@kernel.org, peterz@infradead.org, hpa@zytor.com, arnd@arndb.de Reply-To: hpa@zytor.com, arnd@arndb.de, peterz@infradead.org, mingo@kernel.org, torvalds@linux-foundation.org, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: <20161026153408.2rifnw7bvoc5sex7@treble> References: <20161026153408.2rifnw7bvoc5sex7@treble> To: linux-tip-commits@vger.kernel.org Subject: [tip:core/urgent] objtool: Fix rare switch jump table pattern detection Git-Commit-ID: 56fb2d6eb63acd48b50437b415b6f7d2fcffe75d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 56fb2d6eb63acd48b50437b415b6f7d2fcffe75d Gitweb: http://git.kernel.org/tip/56fb2d6eb63acd48b50437b415b6f7d2fcffe75d Author: Josh Poimboeuf AuthorDate: Wed, 26 Oct 2016 10:34:08 -0500 Committer: Ingo Molnar CommitDate: Thu, 27 Oct 2016 08:20:27 +0200 objtool: Fix rare switch jump table pattern detection The following commit: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") ... improved objtool's ability to detect GCC switch statement jump tables for GCC 6. However the check to allow short jumps with the scanned range of instructions wasn't quite right. The pattern detection should allow jumps to the indirect jump instruction itself. This fixes the following warning: drivers/infiniband/sw/rxe/rxe_comp.o: warning: objtool: rxe_completer()+0x315: sibling call from callable instruction with changed frame pointer Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") Link: http://lkml.kernel.org/r/20161026153408.2rifnw7bvoc5sex7@treble Signed-off-by: Ingo Molnar --- tools/objtool/builtin-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c index 4490601..e8a1f69 100644 --- a/tools/objtool/builtin-check.c +++ b/tools/objtool/builtin-check.c @@ -754,7 +754,7 @@ static struct rela *find_switch_table(struct objtool_file *file, if (insn->type == INSN_JUMP_UNCONDITIONAL && insn->jump_dest && (insn->jump_dest->offset <= insn->offset || - insn->jump_dest->offset >= orig_insn->offset)) + insn->jump_dest->offset > orig_insn->offset)) break; text_rela = find_rela_by_dest_range(insn->sec, insn->offset,