Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363349 > unrolled thread

drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction

Started bykbuild test robot <fengguang.wu@intel.com>
First post2016-03-23 12:20 +0100
Last post2016-03-24 09:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  drivers/target/iscsi/iscsi_target.o: warning: objtool:  iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction kbuild test robot <fengguang.wu@intel.com> - 2016-03-23 12:20 +0100
    Re: drivers/target/iscsi/iscsi_target.o: warning: objtool:  iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-23 22:20 +0100
      Re: drivers/target/iscsi/iscsi_target.o: warning: objtool:  iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-23 22:20 +0100
        Re: drivers/target/iscsi/iscsi_target.o: warning: objtool:  iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction Ingo Molnar <mingo@kernel.org> - 2016-03-24 09:20 +0100

#1363349 — drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction

Fromkbuild test robot <fengguang.wu@intel.com>
Date2016-03-23 12:20 +0100
Subjectdrivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction
Message-ID<rfOZr-2wg-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a24e3d414e59ac76566dedcad1ed1d319a93ec14
commit: d4883d5d6b146fd65f762c462b2c6d4a327c7d50 objtool: Enable stack metadata validation on 64-bit x86
date:   3 weeks ago
config: x86_64-randconfig-x014-03231738 (attached as .config)
reproduce:
        git checkout d4883d5d6b146fd65f762c462b2c6d4a327c7d50
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbce: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbd1: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbd6: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbd9: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbdf: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbe3: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbe9: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbec: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbf0: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbf2: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbf6: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbfc: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbff: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xc06: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xc09: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xc0e: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xc12: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x1148: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x114b: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x1152: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x1155: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x115a: function has unreachable instruction
   drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x115e: function has unreachable instruction

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [next] | [standalone]


#1363702

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2016-03-23 22:20 +0100
Message-ID<rfYm6-S2-23@gated-at.bofh.it>
In reply to#1363349
On Wed, Mar 23, 2016 at 07:15:08PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   a24e3d414e59ac76566dedcad1ed1d319a93ec14
> commit: d4883d5d6b146fd65f762c462b2c6d4a327c7d50 objtool: Enable stack metadata validation on 64-bit x86
> date:   3 weeks ago
> config: x86_64-randconfig-x014-03231738 (attached as .config)
> reproduce:
>         git checkout d4883d5d6b146fd65f762c462b2c6d4a327c7d50
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction

Ingo,

FYI, I'm aware of this issue but I'm not yet sure about the best way to
fix it.  I'll be on vacation next week but will try to get to it in a
couple of weeks.

It only seems to manifest itself in certain randconfigs which include
CONFIG_PROFILE_ALL_BRANCHES=y.

more details:

The issue is caused by a sloppy gcc optimization.  It looks like gcc
created a jump table for a switch statement, but then decided not to use
it, and failed to clean up its mess.  So it

   10094:       ff 25 00 00 00 00       jmpq   *0x0(%rip)        # 1009a <iscsit_handle_task_mgt_cmd+0x36a>
                           10096: R_X86_64_PC32    .rodata+0x3c


There's no


-- 
Josh

[toc] | [prev] | [next] | [standalone]


#1363707

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2016-03-23 22:20 +0100
Message-ID<rfYm7-S2-31@gated-at.bofh.it>
In reply to#1363702
On Wed, Mar 23, 2016 at 04:11:04PM -0500, Josh Poimboeuf wrote:
> On Wed, Mar 23, 2016 at 07:15:08PM +0800, kbuild test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   a24e3d414e59ac76566dedcad1ed1d319a93ec14
> > commit: d4883d5d6b146fd65f762c462b2c6d4a327c7d50 objtool: Enable stack metadata validation on 64-bit x86
> > date:   3 weeks ago
> > config: x86_64-randconfig-x014-03231738 (attached as .config)
> > reproduce:
> >         git checkout d4883d5d6b146fd65f762c462b2c6d4a327c7d50
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64 
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction
> 
> Ingo,
> 
> FYI, I'm aware of this issue but I'm not yet sure about the best way to
> fix it.  I'll be on vacation next week but will try to get to it in a
> couple of weeks.
> 
> It only seems to manifest itself in certain randconfigs which include
> CONFIG_PROFILE_ALL_BRANCHES=y.
> 
> more details:
> 
> The issue is caused by a sloppy gcc optimization.  It looks like gcc
> created a jump table for a switch statement, but then decided not to use
> it, and failed to clean up its mess.  So it
> 
>    10094:       ff 25 00 00 00 00       jmpq   *0x0(%rip)        # 1009a <iscsit_handle_task_mgt_cmd+0x36a>
>                            10096: R_X86_64_PC32    .rodata+0x3c
> 
> 
> There's no

Grrr, accidentally hit send too soon, sorry!

The gist is that when gcc does this optimization, it doesn't cleanup the
unused switch table and it can also leave around one or more
instructions which can't be executed.

It's a very rare issue (this is the only known occurrence).  It's almost
certainly triggered by the complexity of the
iscsit_handle_task_mgt_cmd() function.

I'm not sure if the best way to fix it is to simplify the function,
whitelist it, or make objtool smarter somehow.  I'll try to figure it
out in a couple of weeks after my vacation.

-- 
Josh

[toc] | [prev] | [next] | [standalone]


#1364001

FromIngo Molnar <mingo@kernel.org>
Date2016-03-24 09:20 +0100
Message-ID<rg8EN-8ea-1@gated-at.bofh.it>
In reply to#1363707
* Josh Poimboeuf <jpoimboe@redhat.com> wrote:

> On Wed, Mar 23, 2016 at 04:11:04PM -0500, Josh Poimboeuf wrote:
> > On Wed, Mar 23, 2016 at 07:15:08PM +0800, kbuild test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   a24e3d414e59ac76566dedcad1ed1d319a93ec14
> > > commit: d4883d5d6b146fd65f762c462b2c6d4a327c7d50 objtool: Enable stack metadata validation on 64-bit x86
> > > date:   3 weeks ago
> > > config: x86_64-randconfig-x014-03231738 (attached as .config)
> > > reproduce:
> > >         git checkout d4883d5d6b146fd65f762c462b2c6d4a327c7d50
> > >         # save the attached .config to linux build tree
> > >         make ARCH=x86_64 
> > > 
> > > All warnings (new ones prefixed by >>):
> > > 
> > > >> drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0xbcb: function has unreachable instruction
> > 
> > Ingo,
> > 
> > FYI, I'm aware of this issue but I'm not yet sure about the best way to
> > fix it.  I'll be on vacation next week but will try to get to it in a
> > couple of weeks.
> > 
> > It only seems to manifest itself in certain randconfigs which include
> > CONFIG_PROFILE_ALL_BRANCHES=y.
> > 
> > more details:
> > 
> > The issue is caused by a sloppy gcc optimization.  It looks like gcc
> > created a jump table for a switch statement, but then decided not to use
> > it, and failed to clean up its mess.  So it
> > 
> >    10094:       ff 25 00 00 00 00       jmpq   *0x0(%rip)        # 1009a <iscsit_handle_task_mgt_cmd+0x36a>
> >                            10096: R_X86_64_PC32    .rodata+0x3c
> > 
> > 
> > There's no
> 
> Grrr, accidentally hit send too soon, sorry!
> 
> The gist is that when gcc does this optimization, it doesn't cleanup the
> unused switch table and it can also leave around one or more
> instructions which can't be executed.
> 
> It's a very rare issue (this is the only known occurrence).  It's almost
> certainly triggered by the complexity of the
> iscsit_handle_task_mgt_cmd() function.
> 
> I'm not sure if the best way to fix it is to simplify the function,
> whitelist it, or make objtool smarter somehow.  I'll try to figure it
> out in a couple of weeks after my vacation.

Ok, sounds good to me!

My preference would be to simplify the function, and it would also make sense to 
report this to the GCC guys.

Thanks,

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web