tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: cd9fd78f5c11b5e165d9317ef11e613f4aef4dd1 commit: fbe4f158b0d38c5e86e61c91ff85eac994ae62c1 [11422/12895] LoongArch: Add kexec support config: loongarch-randconfig-s032-20221010 compiler: loongarch64-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fbe4f158b0d38c5e86e61c91ff85eac994ae62c1 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout fbe4f158b0d38c5e86e61c91ff85eac994ae62c1 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=loongarch If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> arch/loongarch/kernel/machine_kexec.c:69:43: sparse: sparse: cast removes address space '__user' of expression >> arch/loongarch/kernel/machine_kexec.c:70:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __user *buf @@ arch/loongarch/kernel/machine_kexec.c:70:63: sparse: expected void const * arch/loongarch/kernel/machine_kexec.c:70:63: sparse: got void [noderef] __user *buf vim +/__user +69 arch/loongarch/kernel/machine_kexec.c 55 56 int machine_kexec_prepare(struct kimage *kimage) 57 { 58 int i; 59 char *bootloader = "kexec"; 60 void *cmdline_ptr = (void *)KEXEC_CMDLINE_ADDR; 61 62 kexec_image_info(kimage); 63 64 kimage->arch.efi_boot = fw_arg0; 65 kimage->arch.systable_ptr = fw_arg2; 66 67 /* Find the command line */ 68 for (i = 0; i < kimage->nr_segments; i++) { > 69 if (!strncmp(bootloader, (char *)kimage->segment[i].buf, strlen(bootloader))) { > 70 memcpy(cmdline_ptr, kimage->segment[i].buf, COMMAND_LINE_SIZE); 71 kimage->arch.cmdline_ptr = (unsigned long)cmdline_ptr; 72 break; 73 } 74 } 75 76 if (!kimage->arch.cmdline_ptr) { 77 pr_err("Command line not included in the provided image\n"); 78 return -EINVAL; 79 } 80 81 /* kexec need a safe page to save reboot_code_buffer */ 82 kimage->control_code_page = virt_to_page((void *)KEXEC_CONTROL_CODE); 83 84 reboot_code_buffer = (unsigned long)page_address(kimage->control_code_page); 85 memcpy((void *)reboot_code_buffer, relocate_new_kernel, relocate_new_kernel_size); 86 -- 0-DAY CI Kernel Test Service https://01.org/lkp