Re: [PATCH] x86_64/bug: Handle __WARN_printf() trap in early_fixup_exception()
From: kernel test robot
Date: Fri Jan 09 2026 - 21:46:34 EST
Hi Hou,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.19-rc4 next-20260109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Hou-Wenlong/x86_64-bug-Handle-__WARN_printf-trap-in-early_fixup_exception/20260109-204012
base: linus/master
patch link: https://lore.kernel.org/r/97dd5c5b5e92d48ffbc95fb1357dfbbbf0d12a1e.1767960698.git.houwenlong.hwl%40antgroup.com
patch subject: [PATCH] x86_64/bug: Handle __WARN_printf() trap in early_fixup_exception()
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260110/202601100329.ndS6mKRm-lkp@xxxxxxxxx/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/20260110/202601100329.ndS6mKRm-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601100329.ndS6mKRm-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> arch/x86/mm/extable.c:414:7: error: call to undeclared function 'handle_bug'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
414 | if (handle_bug(regs))
| ^
1 error generated.
vim +/handle_bug +414 arch/x86/mm/extable.c
376
377 /* Restricted version used during very early boot */
378 void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
379 {
380 /* Ignore early NMIs. */
381 if (trapnr == X86_TRAP_NMI)
382 return;
383
384 if (early_recursion_flag > 2)
385 goto halt_loop;
386
387 /*
388 * Old CPUs leave the high bits of CS on the stack
389 * undefined. I'm not sure which CPUs do this, but at least
390 * the 486 DX works this way.
391 * Xen pv domains are not using the default __KERNEL_CS.
392 */
393 if (!xen_pv_domain() && regs->cs != __KERNEL_CS)
394 goto fail;
395
396 /*
397 * The full exception fixup machinery is available as soon as
398 * the early IDT is loaded. This means that it is the
399 * responsibility of extable users to either function correctly
400 * when handlers are invoked early or to simply avoid causing
401 * exceptions before they're ready to handle them.
402 *
403 * This is better than filtering which handlers can be used,
404 * because refusing to call a handler here is guaranteed to
405 * result in a hard-to-debug panic.
406 *
407 * Keep in mind that not all vectors actually get here. Early
408 * page faults, for example, are special.
409 */
410 if (fixup_exception(regs, trapnr, regs->orig_ax, 0))
411 return;
412
413 if (trapnr == X86_TRAP_UD) {
> 414 if (handle_bug(regs))
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki