linux-kernelorg-stable/drivers/misc/lkdtm
Catalin Marinas f4ea8e05f2 lkdtm/bugs: Do not confuse the clang/objtool with busy wait loop
Since commit eb972eab07 ("lkdtm/bugs: Add cases for BUG and PANIC
occurring in hardirq context"), building with clang for x86_64 results
in the following warnings:

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

caused by busy "while (wait_for_...);" loops. Add READ_ONCE() and
cpu_relax() to better indicate the intention and avoid any unwanted
compiler optimisations.

Fixes: eb972eab07 ("lkdtm/bugs: Add cases for BUG and PANIC occurring in hardirq context")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512190111.jxFSqxUH-lkp@intel.com/
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-12-19 15:09:09 +00:00
..
Makefile stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00
bugs.c lkdtm/bugs: Do not confuse the clang/objtool with busy wait loop 2025-12-19 15:09:09 +00:00
cfi.c kcfi: Rename CONFIG_CFI_CLANG to CONFIG_CFI 2025-09-24 14:29:14 -07:00
core.c
fortify.c lkdtm: fortify: Fix potential NULL dereference on kmalloc failure 2025-09-08 20:15:36 -07:00
heap.c
kstack_erase.c stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00
lkdtm.h
perms.c objtool: Validate kCFI calls 2025-08-18 14:23:09 +02:00
powerpc.c
refcount.c
rodata.c
usercopy.c