Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp603745ybz; Wed, 15 Apr 2020 14:59:28 -0700 (PDT) X-Google-Smtp-Source: APiQypLOVAJN825/yxPTjyU1g0byBW5wXJIiqyqENsB2W2NPgArjUxyQYKN78iF+NIG2aDiKp8HK X-Received: by 2002:a50:c112:: with SMTP id l18mr28280284edf.37.1586987968086; Wed, 15 Apr 2020 14:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586987968; cv=none; d=google.com; s=arc-20160816; b=ieXwFXrWExuNRjlVnMDdN8ohZfI0zHUXCfnYDc8nNsiHbNRVqPXhxgAfauMVf1xNug WCJCIqXhSavjArz5vjP52jbdxuMLwMAPda0C20q6HAp5Qik+Thk+lb+WFHb9xjmuqBsX e+AKiVxGrvIHo389NsRKyEbrcca8mo7B4YTBKrpWvlGWqVu4+bGZnrDB3WjZoOoRZchN ltmjJgg6kcRlF7bsansj5+thW9CuosBD9G0ba4uQDs+jFwm6Rs9c/21bz9vb1XGyo4uq MC1aG2a96QonZQ9XsHzFffo53zyYIwQGMtxwZk19Omp5PMbaegrcZ6zNZqZ50FcxubyU /I7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=yL6cjrdLQOUSqErBo6QoCuDORXmlrgCzzoA47tfOvfU=; b=w/XRRDSkiJQlDXdB5/AqjpGF1EEcC2W34k37/fFaWqBAwejGhNHS5lQX3rjp8LXSqi 8xCZyPOKg4yN3Z/u1CfV9E8F89RrUbaEG9LXKeA3tsBQ3DWy1ACv3joBfoQFEkw01ZWg Qy/meWi9v7JiOA7aRgY4ilCW1acN2RbYIssj33zGt74hSPjTmV8+dhJbJfQhzX6ppS/z WAW+htKM2vV6pLN5dCIx+wUqbZA+wLmfOcenN5NE2+GJWiVLfKMNooCjijjNtUJ2sNoN S1pI1gCqFkG2/p+0NNj61tlY2kisd6vojDp4TMkTEiRmR2lcNwLM2BB1Dm3GMC50Rp35 /+0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FIO5vamY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si10943690edy.204.2020.04.15.14.59.04; Wed, 15 Apr 2020 14:59:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FIO5vamY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387597AbgDNWTe (ORCPT + 99 others); Tue, 14 Apr 2020 18:19:34 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:40298 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728100AbgDNWTX (ORCPT ); Tue, 14 Apr 2020 18:19:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586902762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yL6cjrdLQOUSqErBo6QoCuDORXmlrgCzzoA47tfOvfU=; b=FIO5vamYSj1cLgaGv1rAx89r5GlbvetVCjCNGZZsD0alzcO6hrHbgZ+v0L2rS9WTLzizsy i+5r1yZbBfT6V/tw0xHy4L0/vFWKrKUEko6hnuqNfSKJ82vKTucG5VR6PTl06ktTJ1cQpy 7dvy4ZnfrSvy3oeS0sSy5GrUywaQrHA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-j6syM9dhMDOsGPla-pJb0g-1; Tue, 14 Apr 2020 18:19:20 -0400 X-MC-Unique: j6syM9dhMDOsGPla-pJb0g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03F5519067E3; Tue, 14 Apr 2020 22:19:19 +0000 (UTC) Received: from treble (ovpn-116-146.rdu2.redhat.com [10.10.116.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 928009F9B0; Tue, 14 Apr 2020 22:19:17 +0000 (UTC) Date: Tue, 14 Apr 2020 17:19:14 -0500 From: Josh Poimboeuf To: Randy Dunlap Cc: Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Peter Zijlstra Subject: Re: linux-next: Tree for Apr 14 (objtool crazy) Message-ID: <20200414221914.hbvp4dvh47at4nlg@treble> References: <20200414123900.4f97a83f@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2020 at 06:50:15AM -0700, Randy Dunlap wrote: > On 4/13/20 7:39 PM, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20200413: > > > > > I killed objtool after 49 minutes of CPU time: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 6159 rdunlap 30 10 42756 8028 0 R 100.0 0.099 49:19.02 objtool > > > /bin/sh: line 1: 6159 Terminated ./tools/objtool/objtool orc generate --no-fp --no-unreachable --uaccess drivers/i2c/busses/i2c-parport.o I took an initial look at this one. I can dig more tomorrow unless Peter beats me to it. (gdb) bt #0 0x000000000040df55 in sec_offset_hash (sec=0xc30930, offset=4334561216) at elf.h:104 #1 0x000000000040e907 in find_rela_by_dest_range (elf=0x7ffff64a4010, sec=0xc30930, offset=18446744073709551608, len=1) at elf.c:227 #2 0x000000000040ea67 in find_rela_by_dest (elf=0x7ffff64a4010, sec=0xc30710, offset=18446744073709551608) at elf.c:246 #3 0x0000000000408038 in find_jump_table (file=0x427620 , func=0xc32bf0, insn=0xc4f840) at check.c:1118 #4 0x0000000000408242 in mark_func_jump_tables (file=0x427620 , func=0xc32bf0) at check.c:1170 #5 0x00000000004083b6 in add_jump_table_alts (file=0x427620 ) at check.c:1215 #6 0x0000000000408b95 in decode_sections (file=0x427620 ) at check.c:1413 #7 0x000000000040bf44 in check (_objname=0x7fffffffceff "drivers/i2c/busses/i2c-parport.o", orc=true) at check.c:2508 #8 0x0000000000405580 in cmd_orc (argc=1, argv=0x7fffffffc9d8) at builtin-orc.c:41 #9 0x0000000000411297 in handle_internal_command (argc=6, argv=0x7fffffffc9d0) at objtool.c:96 #10 0x0000000000411349 in main (argc=6, argv=0x7fffffffc9d0) at objtool.c:119 It's an infinite loop in find_rela_by_dest_range() because offset is -8. That comes from find_jump_table(): table_offset = text_rela->addend; table_sec = text_rela->sym->sec; ... table_rela = find_rela_by_dest(file->elf, table_sec, table_offset); which comes from this gem: 00000000000001fd : 1fd: 48 b8 00 00 00 00 00 movabs $0x0,%rax 204: 00 00 00 1ff: R_X86_64_64 .rodata-0x8 So objtool is getting confused by that -0x8 rela addend. -- Josh