From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751924AbdCBXCd (ORCPT ); Thu, 2 Mar 2017 18:02:33 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:35000 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbdCBXC0 (ORCPT ); Thu, 2 Mar 2017 18:02:26 -0500 MIME-Version: 1.0 In-Reply-To: <20170302225723.3ndbsnl4hkqbne7a@treble> References: <20161010125709.1870563-1-arnd@arndb.de> <20161011150541.opini6gbolmnpzy5@treble> <20161011155146.icyl3zewdvmms2h2@treble> <2252957.Vm1BYSSRqP@wuerfel> <20170301143135.arushx2c7q7bnyna@treble> <20170302182515.zybdzrnbf35hqzbm@treble> <20170302225723.3ndbsnl4hkqbne7a@treble> From: Arnd Bergmann Date: Fri, 3 Mar 2017 00:01:25 +0100 X-Google-Sender-Auth: sK9Ny5mluHOlwXT4Cf_o-svd28k Message-ID: Subject: Re: [PATCH] objtool: fix another gcc jump table detection issue To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Linux Kernel Mailing List , Denys Vlasenko Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 2, 2017 at 11:57 PM, Josh Poimboeuf wrote: > > Arnd Bergmann reported a (false positive) objtool warning: > > drivers/infiniband/sw/rxe/rxe_resp.o: warning: objtool: rxe_responder()+0xfe: sibling call from callable instruction with changed frame pointer > > The issue is in find_switch_table(). It tries to find a switch > statement's jump table by walking backwards from an indirect jump > instruction, looking for a relocation to the .rodata section. In this > case it stopped walking prematurely: the first .rodata relocation it > encountered was for a variable (resp_state_name) instead of a jump > table, so it just assumed there wasn't a jump table. > > The fix is to ignore any .rodata relocation which refers to an ELF > object symbol. This works because the jump tables are anonymous and > have no symbols associated with them. > > Reported-by: Arnd Bergmann > Fixes: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") > Signed-off-by: Josh Poimboeuf Tested-by: Arnd Bergmann