Skip to contentSkip to conversation

vmlinux.o: warning: objtool: lkdtm_PANIC_IN_HARDIRQ(): unexpected end of section .text.lkdtm_PANIC_IN_HARDIRQ

PATCH kernel test robot 2 participants 2 messages Dec 18, 2025 – Dec 19, 2025

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   1058ca9db0edaedcb16480cc74b78ed06f0d1f54
commit: eb972eab0794dedeef5b3b1845e5f9a78793f184 [1388/2322] lkdtm/bugs: Add cases for BUG and PANIC occurring in hardirq context
config: x86_64-randconfig-161-20251218 (https://download.01.org/0day-ci/archive/20251219/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251219/[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 >>):

>> vmlinux.o: warning: objtool: lkdtm_PANIC_IN_HARDIRQ(): unexpected end of section .text.lkdtm_PANIC_IN_HARDIRQ
>> vmlinux.o: warning: objtool: lkdtm_BUG_IN_HARDIRQ(): unexpected end of section .text.lkdtm_BUG_IN_HARDIRQ
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 7 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   1058ca9db0edaedcb16480cc74b78ed06f0d1f54
commit: eb972eab0794dedeef5b3b1845e5f9a78793f184 [1388/2322] lkdtm/bugs: Add cases for BUG and PANIC occurring in hardirq context
config: x86_64-randconfig-161-20251218 (https://download.01.org/0day-ci/archive/20251219/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251219/[email protected]/reproduce)
Quoted 9 lines

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 >>):

Quoted 2 lines
Quoted 2 lines

vmlinux.o: warning: objtool: lkdtm_PANIC_IN_HARDIRQ(): unexpected end of section .text.lkdtm_PANIC_IN_HARDIRQ vmlinux.o: warning: objtool: lkdtm_BUG_IN_HARDIRQ(): unexpected end of section .text.lkdtm_BUG_IN_HARDIRQ

I think the while (...); confuses clang and objtool. I'll add this diff on top, it seems to silence it:

drivers/misc/lkdtm/bugs.c +4 -4
index fa05d77acb55..502059078b45 100644
@@ -120,8 +120,8 @@ static void lkdtm_PANIC_IN_HARDIRQ(void)
 			       CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
 	hrtimer_start(&timer, us_to_ktime(100), HRTIMER_MODE_REL_HARD);
 
-	while (wait_for_panic)
-		;
+	while (READ_ONCE(wait_for_panic))
+		cpu_relax();
 
 	hrtimer_cancel(&timer);
 }
@@ -150,8 +150,8 @@ static void lkdtm_BUG_IN_HARDIRQ(void)
 			       CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
 	hrtimer_start(&timer, us_to_ktime(100), HRTIMER_MODE_REL_HARD);
 
-	while (wait_for_bug)
-		;
+	while (READ_ONCE(wait_for_bug))
+		cpu_relax();
 
 	hrtimer_cancel(&timer);
 }

Thanks for the report.

Signature · 1 line
Catalin