lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2E76E38A52ABE495+b9e1827e-5180-47a3-86fd-35a8bdcc65c1@uniontech.com>
Date: Fri, 31 Oct 2025 09:35:34 +0800
From: Qiang Ma <maqianga@...ontech.com>
To: kernel test robot <lkp@...el.com>, akpm@...ux-foundation.org,
 bhe@...hat.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
 kexec@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kexec: print out debugging message if required for
 kexec_load


在 2025/10/31 03:20, kernel test robot 写道:
> Hi Qiang,
>
> 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.18-rc3 next-20251030]
> [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/Qiang-Ma/kexec-print-out-debugging-message-if-required-for-kexec_load/20251030-153807
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/20251030073316.529106-1-maqianga%40uniontech.com
> patch subject: [PATCH] kexec: print out debugging message if required for kexec_load
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251031/202510310332.6XrLe70K-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/20251031/202510310332.6XrLe70K-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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510310332.6XrLe70K-lkp@intel.com/
ok.
> All warnings (new ones prefixed by >>):
>
>>> kernel/kexec.c:160:10: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
>       159 |                 kexec_dprintk("segment[%d]: buf=0x%p bufsz=0x%zx mem=0x%lx memsz=0x%zx\n",
>           |                                        ~~
>           |                                        %lu
>       160 |                               i, ksegment->buf, ksegment->bufsz, ksegment->mem,
>           |                               ^
>     include/linux/kexec.h:531:55: note: expanded from macro 'kexec_dprintk'
>       531 |         do { if (kexec_file_dbg_print) pr_info(fmt, ##arg); } while (0)
>           |                                                ~~~    ^~~
>     include/linux/printk.h:585:34: note: expanded from macro 'pr_info'
>       585 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>           |                                 ~~~     ^~~~~~~~~~~
>     include/linux/printk.h:512:60: note: expanded from macro 'printk'
>       512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
>           |                                                     ~~~    ^~~~~~~~~~~
>     include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
>       484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
>           |                         ~~~~    ^~~~~~~~~~~
>     1 warning generated.
Yes, this is an type mismatch, will fix and update in new post, thanks.
>
> vim +160 kernel/kexec.c
>
>     141	
>     142		ret = machine_kexec_prepare(image);
>     143		if (ret)
>     144			goto out;
>     145	
>     146		/*
>     147		 * Some architecture(like S390) may touch the crash memory before
>     148		 * machine_kexec_prepare(), we must copy vmcoreinfo data after it.
>     149		 */
>     150		ret = kimage_crash_copy_vmcoreinfo(image);
>     151		if (ret)
>     152			goto out;
>     153	
>     154		kexec_dprintk("nr_segments = %lu\n", image->nr_segments);
>     155		for (i = 0; i < nr_segments; i++) {
>     156			struct kexec_segment *ksegment;
>     157	
>     158			ksegment = &image->segment[i];
>     159			kexec_dprintk("segment[%d]: buf=0x%p bufsz=0x%zx mem=0x%lx memsz=0x%zx\n",
>   > 160				      i, ksegment->buf, ksegment->bufsz, ksegment->mem,
>     161				      ksegment->memsz);
>     162	
>     163			ret = kimage_load_segment(image, i);
>     164			if (ret)
>     165				goto out;
>     166		}
>     167	
>     168		kimage_terminate(image);
>     169	
>     170		ret = machine_kexec_post_load(image);
>     171		if (ret)
>     172			goto out;
>     173	
>     174		kexec_dprintk("kexec_file_load: type:%u, start:0x%lx head:0x%lx flags:0x%lx\n",
>     175			      image->type, image->start, image->head, flags);
>     176	
>     177		/* Install the new kernel and uninstall the old */
>     178		image = xchg(dest_image, image);
>     179	
>     180	out:
>     181	#ifdef CONFIG_CRASH_DUMP
>     182		if ((flags & KEXEC_ON_CRASH) && kexec_crash_image)
>     183			arch_kexec_protect_crashkres();
>     184	#endif
>     185	
>     186		kimage_free(image);
>     187	out_unlock:
>     188		kexec_unlock();
>     189		return ret;
>     190	}
>     191	
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ