* Re: [RFC Patch 1/7] kexec: Introduce multikernel support via kexec
[not found] <20250918222607.186488-2-xiyou.wangcong@gmail.com>
2025-09-20 5:33 ` [RFC Patch 1/7] kexec: Introduce multikernel support via kexec kernel test robot
@ 2025-09-20 6:48 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-09-20 6:48 UTC (permalink / raw)
To: Cong Wang; +Cc: llvm, oe-kbuild-all
Hi Cong,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.17-rc6 next-20250919]
[cannot apply to tip/x86/core powerpc/next powerpc/fixes]
[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/Cong-Wang/kexec-Introduce-multikernel-support-via-kexec/20250919-062852
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250918222607.186488-2-xiyou.wangcong%40gmail.com
patch subject: [RFC Patch 1/7] kexec: Introduce multikernel support via kexec
config: x86_64-buildonly-randconfig-003-20250920 (https://download.01.org/0day-ci/archive/20250920/202509201410.Jl6MF9DY-lkp@intel.com/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/20250920/202509201410.Jl6MF9DY-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509201410.Jl6MF9DY-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/reboot.c:736:31: warning: unused variable 'boot_args' [-Wunused-variable]
736 | struct multikernel_boot_args boot_args;
| ^~~~~~~~~
1 warning generated.
vim +/boot_args +736 kernel/reboot.c
723
724 /*
725 * Reboot system call: for obvious reasons only root may call it,
726 * and even root needs to set up some magic numbers in the registers
727 * so that some mistake won't make this reboot the whole machine.
728 * You can also set the meaning of the ctrl-alt-del-key here.
729 *
730 * reboot doesn't sync: do that yourself before calling this.
731 */
732 SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
733 void __user *, arg)
734 {
735 struct pid_namespace *pid_ns = task_active_pid_ns(current);
> 736 struct multikernel_boot_args boot_args;
737 char buffer[256];
738 int ret = 0;
739
740 /* We only trust the superuser with rebooting the system. */
741 if (!ns_capable(pid_ns->user_ns, CAP_SYS_BOOT))
742 return -EPERM;
743
744 /* For safety, we require "magic" arguments. */
745 if (magic1 != LINUX_REBOOT_MAGIC1 ||
746 (magic2 != LINUX_REBOOT_MAGIC2 &&
747 magic2 != LINUX_REBOOT_MAGIC2A &&
748 magic2 != LINUX_REBOOT_MAGIC2B &&
749 magic2 != LINUX_REBOOT_MAGIC2C))
750 return -EINVAL;
751
752 /*
753 * If pid namespaces are enabled and the current task is in a child
754 * pid_namespace, the command is handled by reboot_pid_ns() which will
755 * call do_exit().
756 */
757 ret = reboot_pid_ns(pid_ns, cmd);
758 if (ret)
759 return ret;
760
761 /* Instead of trying to make the power_off code look like
762 * halt when pm_power_off is not set do it the easy way.
763 */
764 if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !kernel_can_power_off()) {
765 poweroff_fallback_to_halt = true;
766 cmd = LINUX_REBOOT_CMD_HALT;
767 }
768
769 mutex_lock(&system_transition_mutex);
770 switch (cmd) {
771 case LINUX_REBOOT_CMD_RESTART:
772 kernel_restart(NULL);
773 break;
774
775 case LINUX_REBOOT_CMD_CAD_ON:
776 C_A_D = 1;
777 break;
778
779 case LINUX_REBOOT_CMD_CAD_OFF:
780 C_A_D = 0;
781 break;
782
783 case LINUX_REBOOT_CMD_HALT:
784 kernel_halt();
785 do_exit(0);
786
787 case LINUX_REBOOT_CMD_POWER_OFF:
788 kernel_power_off();
789 do_exit(0);
790 break;
791
792 case LINUX_REBOOT_CMD_RESTART2:
793 ret = strncpy_from_user(&buffer[0], arg, sizeof(buffer) - 1);
794 if (ret < 0) {
795 ret = -EFAULT;
796 break;
797 }
798 buffer[sizeof(buffer) - 1] = '\0';
799
800 kernel_restart(buffer);
801 break;
802
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread