public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Josh Poimboeuf <jpoimboe@redhat•com>
Cc: Randy Dunlap <rdunlap@infradead•org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Peter Zijlstra <peterz@infradead•org>
Subject: Re: linux-next: Tree for Apr 14 (objtool crazy)
Date: Thu, 7 May 2020 08:50:11 +1000	[thread overview]
Message-ID: <20200507085011.6d2edf32@canb.auug.org.au> (raw)
In-Reply-To: <20200414221914.hbvp4dvh47at4nlg@treble>

[-- Attachment #1: Type: text/plain, Size: 2507 bytes --]

Hi all,

On Tue, 14 Apr 2020 17:19:14 -0500 Josh Poimboeuf <jpoimboe@redhat•com> wrote:
>
> 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 <file>, func=0xc32bf0, insn=0xc4f840) at check.c:1118
> #4  0x0000000000408242 in mark_func_jump_tables (file=0x427620 <file>, func=0xc32bf0) at check.c:1170
> #5  0x00000000004083b6 in add_jump_table_alts (file=0x427620 <file>) at check.c:1215
> #6  0x0000000000408b95 in decode_sections (file=0x427620 <file>) 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 <line_set>:
>  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.

Did this get fixed?

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-06 22:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  2:39 linux-next: Tree for Apr 14 Stephen Rothwell
2020-04-14 13:50 ` linux-next: Tree for Apr 14 (objtool crazy) Randy Dunlap
2020-04-14 22:19   ` Josh Poimboeuf
2020-05-06 22:50     ` Stephen Rothwell [this message]
2020-05-07  0:13       ` Randy Dunlap
2020-05-07  0:22         ` Stephen Rothwell
2020-04-14 14:18 ` linux-next: Tree for Apr 14 (mm/shmem.c) Randy Dunlap
2020-04-15  1:24   ` Andrew Morton
2020-04-15  6:54     ` Hugh Dickins
2020-04-15 15:34       ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507085011.6d2edf32@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=jpoimboe@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=peterz@infradead$(echo .)org \
    --cc=rdunlap@infradead$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox