From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932716AbbDNQLe (ORCPT ); Tue, 14 Apr 2015 12:11:34 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:44564 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932136AbbDNQLZ (ORCPT ); Tue, 14 Apr 2015 12:11:25 -0400 Date: Tue, 14 Apr 2015 09:11:14 -0700 From: Guenter Roeck To: Stephen Rothwell Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Quentin Casasnovas , Rusty Russell Subject: Re: linux-next: Tree for Apr 14 (crash due to modpost patch) Message-ID: <20150414161114.GA18420@roeck-us.net> References: <20150414184244.0f1d1383@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150414184244.0f1d1383@canb.auug.org.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020201.552D3C2C.05D4,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 3 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2015 at 06:42:44PM +1000, Stephen Rothwell wrote: > Hi all, > > Please do not add any v4.2 material to your linux-next included trees > until after v4.1-rc1 is released. > > Changes since 20150413: > > Dropped tree: idle (complex conflict) > > The arm-soc tree still had its build failure for which I reverted > a commit. > > The vfs tree gained conflicts against the ext4 and xfs trees. > > The pm tree lost its build failure. > > The idle tree gained a complex conflict against the pm tree so I dropped > it for today. > > The irqchip tree lost its build failure. > > The ftrace tree gained a conflict against the net-next tree. > > The rcu tree stilll had its build failure for which I reverted a commit. > > The xen-tip tree gained a build failure so I used the version from > next-20150410. > > Non-merge commits (relative to Linus' tree): 9605 > 8774 files changed, 407882 insertions(+), 199408 deletions(-) > This version results in a modpost crash when building a score target. /bin/sh: line 1: 18057 Floating point exception(core dumped) scripts/mod/modpost -o ./Module.symvers -S vmlinux.o scripts/Makefile.modpost:97: recipe for target 'vmlinux.o' failed make[1]: *** [vmlinux.o] Error 136 Makefile:949: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 2 Culprit is commit 52dc0595d540 ("modpost: handle relocations mismatch in __ex_table.). That patch has a number of problems. + if (!extable_entry_size && cur == start + 1 && + strcmp("__ex_table", sec) == 0) + extable_entry_size = r->r_offset * 2; Debugging shows that "cur - start" can be anywhere in multiples of 8 (arm, score) to 24 (alpha). I have never seen it to be 1. As a result, extable_entry_size will never be set, or at least not for the architectures I looked at. +static inline bool is_extable_fault_address(Elf_Rela *r) +{ + if (!extable_entry_size == 0) + fatal("extable_entry size hasn't been discovered!\n"); "!extable_entry_size == 0" is true if extable_entry_size is not 0. Presumably that was supposed to be "if (extable_entry_size == 0)" or "if (!extable_entry_size)". + return ((r->r_offset == 0) || + (r->r_offset % extable_entry_size == 0)); So this code will execute if extable_entry_size==0, predictably causing the observed crash. I still don't know why this is triggered when building a score image. It appears that some __ex_table entry causes the problem. Which may or may not be a problem. Personally I think it is a bit rude to abort compilation because of it. Guenter