From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636AbdHUNFi (ORCPT ); Mon, 21 Aug 2017 09:05:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021AbdHUNFh (ORCPT ); Mon, 21 Aug 2017 09:05:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2CFA77F364 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Date: Mon, 21 Aug 2017 08:05:34 -0500 From: Josh Poimboeuf To: x86@kernel.org, Ingo Molnar Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] objtool: Fix objtool fallthrough detection with function padding Message-ID: <20170821130534.6z4ebqwjjaycu3xk@treble> References: <43e7aae9a7a7710cd6df597fa9dc501da4ba0602.1502472193.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <43e7aae9a7a7710cd6df597fa9dc501da4ba0602.1502472193.git.jpoimboe@redhat.com> 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.26]); Mon, 21 Aug 2017 13:05:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2017 at 12:24:15PM -0500, Josh Poimboeuf wrote: > When GCC adds NOP padding between functions, those NOPs aren't > associated with a function symbol, which breaks objtool's detection of a > function falling through to another function. Instead it shows > confusing errors like: > > drivers/mtd/chips/cfi_util.o: warning: objtool: cfi_qry_mode_on()+0x8b: return with modified stack frame > drivers/mtd/chips/cfi_util.o: warning: objtool: cfi_qry_mode_on()+0x0: stack state mismatch: cfa1=-4-32 cfa2=7+8 > drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: fixup_use_fwh_lock()+0x8: unknown stack-related register move > drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: fixup_use_fwh_lock()+0x0: stack state mismatch: cfa1=6+16 cfa2=7+8 > drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: do_otp_write()+0xa: unsupported stack pointer realignment > drivers/mtd/chips/cfi_cmdset_0002.o: warning: objtool: do_otp_write()+0x0: stack state mismatch: cfa1=-4-40 cfa2=7+8 > > Reported-by: kbuild test robot > Signed-off-by: Josh Poimboeuf Ping? -- Josh