From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbdHJVjO (ORCPT ); Thu, 10 Aug 2017 17:39:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbdHJVjN (ORCPT ); Thu, 10 Aug 2017 17:39:13 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6F5EF8F26C 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: Thu, 10 Aug 2017 16:39:12 -0500 From: Josh Poimboeuf To: Arnd Bergmann Cc: Linux Kernel Mailing List Subject: Re: two more objtool warnings: lib/ubsan.o and fs/fs_pin.o Message-ID: <20170810213912.4wp75474p2eg7c4l@treble> References: <20170728170447.jclf2vafqy5i2hk3@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170728170447.jclf2vafqy5i2hk3@treble> 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]); Thu, 10 Aug 2017 21:39:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 28, 2017 at 12:04:47PM -0500, Josh Poimboeuf wrote: > On Fri, Jul 28, 2017 at 01:25:27PM +0200, Arnd Bergmann wrote: > > Hi Josh, > > > > I ran into two more warnings with the two patches you sent me in private, > > using gcc-7.1.1: > > > > lib/ubsan.o: warning: objtool: val_to_string.constprop.7()+0x97: leave > > instruction with modified stack frame > > .config: https://pastebin.com/dl/g04Dwdwx > > > > fs/fs_pin.o: warning: objtool: pin_kill()+0x139: stack state mismatch: > > cfa1=7+88 cfa2=7+96 > > .config: https://pastebin.com/dl/6gK6MadB > > > > I assume you are faster at analysing than me, so I have not tried to get > > to the bottom of these at all. Let me know if you need help reproducing > > the warnings. It's also possible that they are fixed by some other patches > > that you already sent but that are not in linux-next yet. > > Thanks. The first one is a relatively easy fix in objtool's drap > register handling. I have a working patch for it. > > The second one is a little trickier. > > Instead of: > > lea 0x8(%rsp), %rsp > > GCC is doing: > > lea 0x8(%rsp), %rcx > mov %rcx, %rsp > > I don't see why GCC would do that. We should probably ask some GCC > folks. Objtool isn't built to track register values, so it may be a > little tricky to deal with that pattern correctly if we can't convince > GCC to fix it. > > Anyway, I'm going to be on vacation next week, but I'll investigate > further when I get back. I posted a patch for the first issue and I'll open a GCC bug for the second issue. -- Josh