public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus <M4rkusXXL@web.de>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: objtool segfault with ORC unwinder enabled
Date: Wed, 03 Jan 2018 15:14:55 +0100	[thread overview]
Message-ID: <1659502.tmOLjC0cqW@markus> (raw)
In-Reply-To: <20180103135924.ajpb5kslhkwtd5gb@treble>

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

On Wed, Jan 03, 2018 at 14:59:24 CET Josh Poimboeuf wrote:
> On Wed, Jan 03, 2018 at 01:22:07PM +0100, Markus wrote:
> > On Wed, Jan 03, 2018 at 12:19:41 CET Greg Kroah-Hartman wrote:
> > > On Wed, Jan 03, 2018 at 11:49:08AM +0100, Markus wrote:
> > > > Hello!
> > > > 
> > > > ORC unwinder is enabled in stable for wider testing but still at least
> > > > one
> > > > bug is open:
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=197035
> > > 
> > > Random web links on mailing lists don't help much, please put the
> > > information here in the email.
> > 
> > Its not a random web link. Its the official kernel.org bugtracker. But
> > nobody seems to be looking at it.
> > 
> > > > objtool will segfault because a NULL pointer is dereferenced.
> > > 
> > > And how are you reproducing this?
> > 
> > Just building the kernel with ORC enabled.
> > (At least for me. Using framepointers compiles, enabling ORC again breaks
> > it.) gcc 6.4.0 (In bug report others were tested as well.)
> > elfutils 0.170
> > What else may be interesting?
> > 
> > > > Is a NULL pointer sym valid?
> > > > If a NULL pointer is invalid, it has to be checked why it is sometimes
> > > > NULL.
> > > 
> > > What .config is triggering this problem?
> > 
> > See attachment.
> > 
> > > And does this show up on 4.14.11, and 4.15-rc6?
> > 
> > Both: yes.
> > 
> > /tools/objtool/objtool orc generate --no-fp "arch/x86/kernel/irq.o"
> > 
> > => segfault.
> > 
> > Changing CFLAGS for objtool to O1 and starting from gdb:
> > 
> > (gdb) r orc generate --no-fp "arch/x86/kernel/irq.o"
> > Starting program: tools/objtool/objtool orc generate --no-fp
> > "arch/x86/kernel/ irq.o"
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x000055555555e06c in elf_rebuild_rela_section
> > (sec=sec@entry=0x7ffff690d010) at elf.c:554
> > 554                     relas[idx].r_info = GELF_R_INFO(rela->sym->idx,
> > rela-> 
> > >type);
> > 
> > (gdb) bt
> > #0  0x000055555555e06c in elf_rebuild_rela_section
> > (sec=sec@entry=0x7ffff690d010) at elf.c:554
> > #1  0x000055555555d0aa in create_orc_sections
> > (file=file@entry=0x7ffffff7d740) at orc_gen.c:210
> > #2  0x000055555555c146 in check (_objname=<optimized out>,
> > _no_fp=<optimized out>, no_unreachable=<optimized out>,
> > orc=orc@entry=true) at check.c:1971 #3  0x000055555555811f in cmd_orc
> > (argc=<optimized out>, argv=0x7fffffffd8d8) at builtin-orc.c:54
> > #4  0x000055555555f490 in handle_internal_command (argv=0x7fffffffd8d0,
> > argc=4) at objtool.c:108
> > #5  main (argc=4, argv=0x7fffffffd8d0) at objtool.c:131
> > (gdb) p rela->sym
> > $1 = (struct symbol *) 0x0
> 

> I'm unable to recreate.  Can you attach one of the .o files (like the
> above irq.o)?
Sure, see attached. (From vanilla linux-4.14.11.)

BR,
Markus

[-- Attachment #2: irq.o.xz --]
[-- Type: application/x-xz, Size: 3388 bytes --]

  reply	other threads:[~2018-01-03 14:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 10:49 objtool segfault with ORC unwinder enabled Markus
2018-01-03 11:19 ` Greg Kroah-Hartman
2018-01-03 12:22   ` Markus
2018-01-03 13:59     ` Josh Poimboeuf
2018-01-03 14:14       ` Markus [this message]
2018-01-03 16:36         ` Josh Poimboeuf
2018-01-03 17:26           ` Markus
2018-01-04 15:46             ` Josh Poimboeuf
2018-01-04 16:56               ` Markus
2018-01-04 17:32                 ` Josh Poimboeuf
2018-01-04 18:25                   ` Markus
2018-01-10 17:14                     ` Markus
2018-01-11  4:13                       ` Josh Poimboeuf
2018-01-11  4:25                         ` Josh Poimboeuf
2018-01-11 18:11                           ` Markus
2018-01-11 18:20                             ` Josh Poimboeuf
2018-01-11 18:52                               ` Markus
2018-01-11 19:38                                 ` Josh Poimboeuf
2018-01-11 20:00                                   ` Markus
2018-01-11 20:19                                     ` Josh Poimboeuf
2018-01-03 14:14     ` Greg Kroah-Hartman
2018-01-03 14:36       ` Markus

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=1659502.tmOLjC0cqW@markus \
    --to=m4rkusxxl@web.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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