Re: [Linux v5.8-rc4] objtool warnings with gcc-10

From: Peter Zijlstra
Date: Mon Jul 06 2020 - 04:39:11 EST


On Mon, Jul 06, 2020 at 09:09:55AM +0200, Sedat Dilek wrote:
> [ Please CC me I am not subscribed to this mailing-list ]
>
> Hi Josh and Peter,
>
> today I switched over from Linux v5.7.y to Linux v5.8-rc4 and built
> the first time with GCC version 10 on Debian/testing AMD64.
>
> $ cat /proc/version
> Linux version 5.8.0-rc4-1-amd64-gcc10 (sedat.dilek@xxxxxxxxx@iniza)
> (gcc-10 (Debian 10.1.0-4) 10.1.0, GNU ld (GNU Binutils for Debian)
> 2.34) #1~bullseye+dileks1 SMP 2020-07-06
>
> I see these objtool warnings (which are new to me):
>
> $ grep warning: build-log_5.8.0-rc4-1-amd64-gcc10.txt | sort
> arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_panic()+0x118: unreachable instruction
> drivers/atm/horizon.o: warning: objtool: interrupt_handler()+0x19f: unreachable instruction
> drivers/message/fusion/mptbase.o: warning: objtool: mpt_Soft_Hard_ResetHandler()+0x33a: unreachable instruction
> drivers/scsi/aic7xxx/aic79xx_core.o: warning: objtool: ahd_intr.part.0()+0x10f: unreachable instruction
> drivers/scsi/pcmcia/aha152x_core.o: warning: objtool: run()+0x4c0: unreachable instruction
> fs/btrfs/backref.o: warning: objtool: btrfs_backref_finish_upper_links()+0x309: unreachable instruction
> fs/btrfs/extent_io.o: warning: objtool: __set_extent_bit.cold()+0xc: unreachable instruction
> fs/btrfs/relocation.o: warning: objtool: update_backref_cache.part.0()+0x1de: unreachable instruction
> kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable instruction
> net/core/skbuff.o: warning: objtool: skb_push.cold()+0x15: unreachable instruction

That's more CONFIG_LIVEPATCH=y wreckage I expect. The problem is that
GCC -flive-patching= thing wreck the propagation of the noreturn.

This really is a compiler issue and we've not managed a sensible
work-around in objtool.