kernel/printk/printk.o: warning: objtool: __jump_table+0x0: special: can't find orig instruction
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-6.10.y-rt-rebase head: 6d20efa57a896036453f4b061ae22601ef61b494 commit: 127f3e5b794bd6fa90d4649318dd898455efa6d7 [63/93] printk: Provide threadprintk boot argument config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240530/[email protected]/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> kernel/printk/printk.o: warning: objtool: __jump_table+0x0: special: can't find orig instruction -- >> kernel/printk/nbcon.o: warning: objtool: __jump_table+0x0: special: can't find orig instruction
objdump-func vmlinux.o __jump_table:
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 12 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-6.10.y-rt-rebase head: 6d20efa57a896036453f4b061ae22601ef61b494 commit: 127f3e5b794bd6fa90d4649318dd898455efa6d7 [63/93] printk: Provide threadprintk boot argument config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240530/[email protected]/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 5 lines
All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/printk/printk.o: warning: objtool:__jump_table+0x0: special: can't find orig instruction--
Quoted 1 line
Quoted 1 line
kernel/printk/nbcon.o: warning: objtool:__jump_table+0x0: special: can't find orig instruction
On loongarch, it looks like all users of the jump_table are causing this warning. I will assume this is something that needs to be fixed at the arch level (either in the kernel or the compiler).
John Ogness
+ Loongarch folks
Hi Huacai and Xuerui,
Could you please help take a look at this case? Thanks.
Quoted 25 lines · John Ogness
Quoted 12 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-6.10.y-rt-rebase head: 6d20efa57a896036453f4b061ae22601ef61b494 commit: 127f3e5b794bd6fa90d4649318dd898455efa6d7 [63/93] printk: Provide threadprintk boot argument config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240530/[email protected]/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/Quoted 5 lines
All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/printk/printk.o: warning: objtool:__jump_table+0x0: special: can't find orig instruction--
Quoted 1 line
Quoted 1 line
kernel/printk/nbcon.o: warning: objtool:__jump_table+0x0: special: can't find orig instructionOn loongarch, it looks like all users of the
jump_tableare causing this warning. I will assume this is something that needs to be fixed at the arch level (either in the kernel or the compiler).John Ogness
Huacai Chen
maintainerQuoted 6 lines · Yujie Liu
+ Loongarch folks
Hi Huacai and Xuerui,
Could you please help take a look at this case? Thanks.
We are attempting to solve this problem, please wait some time.
Huacai
Quoted 27 lines · John Ogness
Quoted 25 lines · kernel test robot
Quoted 12 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-6.10.y-rt-rebase head: 6d20efa57a896036453f4b061ae22601ef61b494 commit: 127f3e5b794bd6fa90d4649318dd898455efa6d7 [63/93] printk: Provide threadprintk boot argument config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240530/[email protected]/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/Quoted 5 lines
All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/printk/printk.o: warning: objtool:__jump_table+0x0: special: can't find orig instruction--
Quoted 1 line
Quoted 1 line
kernel/printk/nbcon.o: warning: objtool:__jump_table+0x0: special: can't find orig instructionOn loongarch, it looks like all users of the
jump_tableare causing this warning. I will assume this is something that needs to be fixed at the arch level (either in the kernel or the compiler).John Ogness
Quoted 32 lines · Yujie Liu
+ Loongarch folks
Hi Huacai and Xuerui,
Could you please help take a look at this case? Thanks.
Quoted 25 lines · John Ogness
Quoted 12 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-6.10.y-rt-rebase head: 6d20efa57a896036453f4b061ae22601ef61b494 commit: 127f3e5b794bd6fa90d4649318dd898455efa6d7 [63/93] printk: Provide threadprintk boot argument config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240530/[email protected]/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/Quoted 5 lines
All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/printk/printk.o: warning: objtool:__jump_table+0x0: special: can't find orig instruction--
Quoted 1 line
Quoted 1 line
kernel/printk/nbcon.o: warning: objtool:__jump_table+0x0: special: can't find orig instructionOn loongarch, it looks like all users of the
jump_tableare causing this warning. I will assume this is something that needs to be fixed at the arch level (either in the kernel or the compiler).John Ogness
Here are my thoughts, anyway it is up to the maintainers.
After commit 9cc1df421f00 ("LoongArch: Update Loongson-3 default
config file"), there exist some build regressions about objtool
warnings on LoongArch. This is because objtool does not work well
with jump tables, -fno-jump-tables is already added in Makefile,
but there are some special cases, some warnings can be reproduced
because the code has __annotate_jump_table, some warnings can not
be reproduced with unknown reason (maybe due to the lower version
of compiler toolchain). In order to avoid the warnings reported
by kernel test robot, it is better to remove CONFIG_UNWINDER_ORC=y
in defconfig for now, the proper time to enable ORC stack unwinder should after objtool supports jump tables on LoongArch.
arch/loongarch/Makefile
ifdef CONFIG_OBJTOOL
KBUILD_CFLAGS += -fno-jump-tables
endif
include/linux/compiler.h
/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(".rodata..c_jump_table")
Like this:
arch/loongarch/configs/loongson3_defconfig +0 -1
@@ -983,4 +983,3 @@ CONFIG_DEBUG_FS=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set -CONFIG_UNWINDER_ORC=y
Thanks,
Tiezhu
arch/loongarch/configs/loongson3_defconfig CONFIG_DEBUG_FS=y · line 986
Quoted 12 lines · Tiezhu Yang
Like this:
arch/loongarch/configs/loongson3_defconfig +0
-1@@ -983,4 +983,3 @@ CONFIG_DEBUG_FS=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set -CONFIG_UNWINDER_ORC=y
If ORC/objtool is broken on loongarch, shouldn't you disable it then or mask at least via
arch/loongarch/Kconfig.debug +1 -0
@@ -28,6 +28,7 @@ config UNWINDER_PROLOGUE config UNWINDER_ORC bool "ORC unwinder" + depends on BROKEN select OBJTOOL help This option enables the ORC (Oops Rewind Capability) unwinder for
instead? Removing it from defconfig makes it still available to to randconfig.
Quoted 2 lines
Thanks,
Tiezhu
Sebastian
Quoted 30 lines · Sebastian Andrzej Siewior
arch/loongarch/configs/loongson3_defconfig CONFIG_DEBUG_FS=y · line 986
Quoted 12 lines · Tiezhu Yang
Like this:
arch/loongarch/configs/loongson3_defconfig +0
-1@@ -983,4 +983,3 @@ CONFIG_DEBUG_FS=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set -CONFIG_UNWINDER_ORC=yIf ORC/objtool is broken on loongarch, shouldn't you disable it then or mask at least via
arch/loongarch/Kconfig.debug +1
-0@@ -28,6 +28,7 @@ config UNWINDER_PROLOGUE config UNWINDER_ORC bool "ORC unwinder" + depends on BROKEN select OBJTOOL help This option enables the ORC (Oops Rewind Capability) unwinder for
Quoted 2 lines
instead? Removing it from defconfig makes it still available to to randconfig.
Yes, good suggestion, I think so.
Let us wait for more comments.
Thanks,
Tiezhu
Quoted 30 lines · Sebastian Andrzej Siewior
Quoted 8 lines · Tiezhu Yang
Like this:
arch/loongarch/configs/loongson3_defconfig +0
-0@@ -983,4 +983,3 @@ CONFIG_DEBUG_FS=yQuoted 4 lines
CONFIG_SCHEDSTATS=y
#CONFIG_DEBUG_PREEMPTis not set
#CONFIG_FTRACEis not set
-CONFIG_UNWINDER_ORC=yIf ORC/objtool is broken on loongarch, shouldn't you disable it then or mask at least via
arch/loongarch/Kconfig.debug +0
-0@@ -28,6 +28,7 @@ config UNWINDER_PROLOGUE
configUNWINDER_ORC
bool "ORC unwinder"arch/loongarch/Kconfig.debug +1
-0+ depends on BROKENselect OBJTOOL
help
This option enables the ORC (Oops Rewind Capability) unwinder for
Quoted 2 lines
instead? Removing it from defconfig makes it still available to to randconfig.
I agree but...
arch/loongarch/Kconfig +1 -1
@@ -143,7 +143,7 @@ config LOONGARCH select HAVE_LIVEPATCH select HAVE_MOD_ARCH_SPECIFIC select HAVE_NMI - select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS + select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS && BROKEN select HAVE_PCI select HAVE_PERF_EVENTS select HAVE_PERF_REGS
should be better? It looks like everything depending on objtool is broken, not only ORC.
Signature · 2 lines
Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University
Quoted 50 lines · Xi Ruoyao
Quoted 30 lines · Sebastian Andrzej Siewior
Quoted 8 lines · Tiezhu Yang
Like this:
arch/loongarch/configs/loongson3_defconfig +0
-0@@ -983,4 +983,3 @@ CONFIG_DEBUG_FS=yQuoted 4 lines
CONFIG_SCHEDSTATS=y
#CONFIG_DEBUG_PREEMPTis not set
#CONFIG_FTRACEis not set
-CONFIG_UNWINDER_ORC=yIf ORC/objtool is broken on loongarch, shouldn't you disable it then or mask at least via
arch/loongarch/Kconfig.debug +0
-0@@ -28,6 +28,7 @@ config UNWINDER_PROLOGUE
configUNWINDER_ORC
bool "ORC unwinder"arch/loongarch/Kconfig.debug +1
-0+ depends on BROKENselect OBJTOOL
help
This option enables the ORC (Oops Rewind Capability) unwinder forQuoted 2 lines
instead? Removing it from defconfig makes it still available to to randconfig.
I agree but...
arch/loongarch/Kconfig +0
-0@@ -143,7 +143,7 @@ config LOONGARCHselect
HAVE_LIVEPATCH
selectHAVE_MOD_ARCH_SPECIFIC
selectHAVE_NMI
- selectHAVE_OBJTOOLifAS_HAS_EXPLICIT_RELOCS+ selectHAVE_OBJTOOLifAS_HAS_EXPLICIT_RELOCS&& BROKEN selectHAVE_PCI
selectHAVE_PERF_EVENTS
selectHAVE_PERF_REGS
Quoted 2 lines
should be better? It looks like everything depending on objtool is broken, not only ORC.
No longer needed, I've root-caused the issue:
https://lore.kernel.org/loongarch/[email protected]/
Signature · 2 lines
Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University